0

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

null
    • John_Halls
    • 1 yr ago
    • Reported - view

    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

      • Luis
      • 1 yr ago
      • Reported - view

      John Halls 

      Hi John

      thanks for responding. 

      Regarding your suggestion: doesn't work inside the dynamic object (for the name) probably because the context is hidden for it (the formula can't 'find it' - although ''AcquiredHistory" is a subtable...)

      but this still doesn't solve the problem reported i.e. the behaviour is not correct when using the display as Radio Buttons instead  of Switch.

      Thanks

    • John_Halls
    • 1 yr ago
    • Reported - view

    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

      • Luis
      • 1 yr ago
      • Reported - view

      John Halls Hi John,

      I did get the info through other ways ev compact views, etc... but I was looking for a nice and elegant way of displaying info that can change dynamically

      the thin is: if one doesn't know how may entries there are, it is not possible to create the number of "formula" fields that could show the results in a nice way.... 

      Similarly, the Switch view does work.. but it doesn't scroll right if the space allocated to show the entries is not enough....

      I was looking for a dynamic way.

      thanks!.

       

      I still think this a bug.... because it really works for the other view forms..

Content aside

  • 1 yr agoLast active
  • 4Replies
  • 96Views
  • 2 Following