0

How to get a dynamic multi choice field to update

Hi all -

I'm using the MacOS app.

So I have this code in the Dynamic value section of a field called dMC2:

let prevDMC := numbers(dMC);
(select Table1)[(var t := this;
        count(prevDMC[= t])) > 0]

It takes the selection of a dynamic multi-choice field and shows only the choices from the first.

It works fine when I click OK and the system updates the field. But when I change dMC it is not reflected in dMC2. I have to force the system to update for it to show the new selection. I guess the system only does the select once.

What are some good options for it to update dMC2 when dMC is modified?

Thanks,

4replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • I think if you put your code in the After Update trigger of the DMC field, it should work.

    Like
    • Fred
    • Fred
    • 2 mths ago
    • Reported - view

    I tried it and it doesn't work. Plus I don't see how the trigger after update can push the correct data into the Dynamic value part of dMC2.

    Like
  • Oh yes, I didn't understand what you wanted to do 😁. It's two DynamicMultipleChoice in cascade.

    It seems to work if you use the Switch or Combobox display

    However, in Radio buttons, the field is not refreshed. I managed to do it with JavaScript code, but it only works if dMC2 has already been initialized, if it is not null. This is a bug to be reported to Ninox I think.

    Like
    • Fred
    • Fred
    • 2 mths ago
    • Reported - view

    Right, didn't think of changing the input format, or whatever that is called. I'll have to send it to Ninox. Thanks Jacques.

    Like
Like Follow
  • Status Answered
  • 2 mths agoLast active
  • 4Replies
  • 56Views
  • 2 Following