Bug? -- Dynamic Value Name not working for Radio Buttons view
Background: dynamic choice field.
- The value is the name of the fields plus the sum of an "Amount" field
Error and Symptons
- when the dynamic choice is displayed as Radio Buttons the sums are not updated dynamically... one has to **explicitly** select/deselect one item and de-seletc/re-select again for the label to update!
-
it works perfectly when the object is shown as Switch
Code
Here is an example:
Tables: Items, Acquisitions.
'Items' contains only ItemA, ItemB, etc
'Acquisitions' has a table with the acquired items and an overview of the items and the acquired quantities ---> this is the dynamic choice
1) After entering some items
2) now lets enter a new Acquisition with eg item C,
As can be seen: Item C is NOT reflected in the dynamic name in the Overview. Same, if I change the Qty in an item....
---> to update the value one has to **manually** actuate on any enter of the 'Overview' object.
But if I choose the Switch view there is no problem.
The code for the 'Overview' Object
select Items
The code for the Name of the 'Overview' object
let theItemName := text(Name);
let theTotal := sum((select AcquiredHistory)[text(theItem) = theItemName].Qty);
theItemName + ": " + theTotal
Anyone has other experience?
I tried this in several DBs....
As a workaround I could try to manually actuate on the 'Overview"... eg by reading the selected value and reselecting them (but I have not found a good way to do it)
4 replies
-
Hi Luis
Are your tables joined together so that your code can become
let theItemName := text(Name); let theTotal := sum(AcquiredHistory.Qty); theItemName + ": " + theTotal
This will work far better than using a select statement.
Regards John
-
Hi Luis
Using a select outside a button or trigger will always be problematic. The select outside of this needs some action on the record, like a field update, to cause it to trigger and I guess displaying the radio buttons are not enough to do this. Are you able to have the figure you need as a formula in the parent table and access it from there?
Regards John
Content aside
- 2 yrs agoLast active
- 4Replies
- 115Views
-
2
Following