So, I have put some time into this problem before writing this question, but I find myself getting farther and farther from home.
I have a UX Component. In that component there is a control with a lookup function that gets a value from a grid. Several fields in the UX are then filled from the corresponding fields in the grid record selected in the lookup.
That all works, and the fields are filled correctly.
Now, the UX's calculated fields are executed on init of the UX component. I know that much. Which means, the calculated field is set to 0 because on init there has not been any record selected in the lookup yet.
Once the record is selected in the lookup, the value of the fields filled changes.
One of those changed fields is used in the calculated field. The latter one does not recompute automatically when the value of one of the used fields in the calculated field changes.
So how do I "refresh" the calculated field?
I have tried to do it with Javascript action scripting on the OnChange event of the used field, but no cigar.
Before I take a really really deep dive into this and spend hours and hours of time, maybe one of you guys can point me into the right direction on how to solve this? Hopefully.
So, example:
(1) Lookup: "choose your package". It provides records of packages available in a grid by means of a lookup.
Shown:
Record 1:
Name: package A
Price: $10
Record 2:
Name: package B
Price: $20
(2) UX Controls:
(a) UX Control: "Chosen Package" -> value inserted from lookup
(b) UX Control: "Price p/package" -> value inserted from lookup
(c) UX Control: quantity -> input from user
(d) UX calculated field: COST (quantity * Price p/package)
Problem: on selecting the package in the lookup field, (a), (b) get filled in correctly. (d) is still 0.
Once the quantity (c) is entered by the user, (d) does not recompute and remains 0.
How to recompute / refresh (d) ??
Any help on this is highly appreciated.
I have a UX Component. In that component there is a control with a lookup function that gets a value from a grid. Several fields in the UX are then filled from the corresponding fields in the grid record selected in the lookup.
That all works, and the fields are filled correctly.
Now, the UX's calculated fields are executed on init of the UX component. I know that much. Which means, the calculated field is set to 0 because on init there has not been any record selected in the lookup yet.
Once the record is selected in the lookup, the value of the fields filled changes.
One of those changed fields is used in the calculated field. The latter one does not recompute automatically when the value of one of the used fields in the calculated field changes.
So how do I "refresh" the calculated field?
I have tried to do it with Javascript action scripting on the OnChange event of the used field, but no cigar.
Before I take a really really deep dive into this and spend hours and hours of time, maybe one of you guys can point me into the right direction on how to solve this? Hopefully.
So, example:
(1) Lookup: "choose your package". It provides records of packages available in a grid by means of a lookup.
Shown:
Record 1:
Name: package A
Price: $10
Record 2:
Name: package B
Price: $20
(2) UX Controls:
(a) UX Control: "Chosen Package" -> value inserted from lookup
(b) UX Control: "Price p/package" -> value inserted from lookup
(c) UX Control: quantity -> input from user
(d) UX calculated field: COST (quantity * Price p/package)
Problem: on selecting the package in the lookup field, (a), (b) get filled in correctly. (d) is still 0.
Once the quantity (c) is entered by the user, (d) does not recompute and remains 0.
How to recompute / refresh (d) ??
Any help on this is highly appreciated.
Comment