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,

4 replies

null
    • Jacques_TUR
    • 1 yr ago
    • Reported - view

    I think if you put your code in the After Update trigger of the DMC field, it should work.

    • Fred
    • 1 yr 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.

    • Jacques_TUR
    • 1 yr ago
    • Reported - view

    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.

    • Fred
    • 1 yr 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.

Content aside

  • Status Answered
  • 1 yr agoLast active
  • 4Replies
  • 94Views
  • 2 Following