0

Dynamic multi-selection in the subform: Display of selected and unselected items.

I have an inspection form that needs to ensure all items are selected at least once. I would like to know which items are missing from the inspection in the subform. How should I handle selectedItems and unselectedItems? Thank you."

2 replies

null
    • Fred
    • 13 hrs ago
    • Reported - view

    Is the Muliple Choice field in Table1 a simple or dynamic field?

    • Fred
    • 8 hrs ago
    • Reported - view

    Well that was dumb of me, you said so in your post.

    First step is to get a list of selected choices. You can try:

    unique(Table1.text(multichoicefield))
    

    This will show you the dynamic value name of all the selected choice from the dynamic choice.

    Now to figure out the not selected then you will need to create two variables, an array of selected records and another array of all possible choices. You will then subtract the selected from the all possible.

    Try:

    let selected := unique(Table1.numbers(multichoicefield));
    let allPossible := select tableroot;
    allPossible[(var v := this; not selected[= v])];
    

    Line 2, you will need to put in the table name that is at the root of the dynamic multichoice field with any modifiers that are appropriate.

Content aside

  • 8 hrs agoLast active
  • 2Replies
  • 22Views
  • 2 Following