How to use a property's value from another class
Hi All,
I have a requirement where we need to have a numeric price field which will display the price of a product with a certain amount of decimal symbols when you enter the price in the product form. (ex. Product A - Price 12.12, Product B - Price 12.1234, etc.). In the requirement it is stated that certain users should be able to configure how many decimal symbols should be displayed for certain products thru the UI.
What was done for the moment is that we've delegated the Data Type that contains the list of products and we have set a Integer property there called .DecimalNumber which will contain the value of decimal positions that should be displayed. This data type is stored in class ApplicationX-Data-Products.
The form and the price field are located in another class (ApplicationX-Work-ProductLine1). I've set a data transform to run every time the field is changed. The data transform sets my property .NumericPrice to be equal to @divide(.NumericPrice,1,4,"half_up"). So for now all the prices are rounded up to 4 positions after the decimal.
I want to modify the above @divide to take the value from the .DecimalNumber property in class -Data-Products.
I tried with setting up a data page, but it did not work. I'm also unable to locate the .DecimalNumber property in the Clipboard. I explored the option to use Declare expression, but I don't think it will suite my case.
Hi All,
I have a requirement where we need to have a numeric price field which will display the price of a product with a certain amount of decimal symbols when you enter the price in the product form. (ex. Product A - Price 12.12, Product B - Price 12.1234, etc.). In the requirement it is stated that certain users should be able to configure how many decimal symbols should be displayed for certain products thru the UI.
What was done for the moment is that we've delegated the Data Type that contains the list of products and we have set a Integer property there called .DecimalNumber which will contain the value of decimal positions that should be displayed. This data type is stored in class ApplicationX-Data-Products.
The form and the price field are located in another class (ApplicationX-Work-ProductLine1). I've set a data transform to run every time the field is changed. The data transform sets my property .NumericPrice to be equal to @divide(.NumericPrice,1,4,"half_up"). So for now all the prices are rounded up to 4 positions after the decimal.
I want to modify the above @divide to take the value from the .DecimalNumber property in class -Data-Products.
I tried with setting up a data page, but it did not work. I'm also unable to locate the .DecimalNumber property in the Clipboard. I explored the option to use Declare expression, but I don't think it will suite my case.
What are the steps that I need to follow in order to obtain the value entered for .DecimalNumber in the other class?
P.S. The two classes are separate and they don't have child-parent relationship with one another.