1

Confirm whether all multi-choice in the subtable are selected

How can I confirm that all multiple choice in the subtable are selected?Thanks

5 replies

null
    • cyan_silver
    • 9 mths ago
    • Reported - view

    How can I confirm that all multiple choice in the subtable are selected? Thanks

    • Fred
    • 9 mths ago
    • Reported - view

    You want a way to see that all choices in a choice field have been selected at least once in a record in the subtable?

    Just to confirm:

    Is the choice field a multiple choice or single choice field?

    Is it a dynamic or regular choice field?

    Do you want the check field to happen at the parent level?

    • cyan_silver
    • 9 mths ago
    • Reported - view

    HI Fred:

    Just to confirm:

    yes ,no matter how many pieces of data there are in the subtable, as long as 1.2.3 are selected once, it will be completed

    Is the choice field a multiple choice or single choice field?
    multiple choice

    Is it a dynamic or regular choice field?
    dynamic

    Do you want the check field to happen at the parent level?
    YES

    Thanks

    • Fred
    • 9 mths ago
    • Reported - view

    Here is something that will show you which choice have not been selected.

    let allChoices := (select TableA).number(Id);
    for loop1 in allChoices do
        let choiceCheck := InvoiceItem[contains(numbers(dMC1), loop1)];
        if choiceCheck = 0 then loop1 end
    end

    Replace:

    TableA with the table that your dMC is based on

    dMC1 with the name of your dMC field

    Since we are dealing with record Ids, but need just the value and not their record reference we need to use the number() command in line 1.

    Spent a few moments trying to figure out why the correct results were not showing up and that is where debugValueInfo() came in handy. I showed me that I was getting "C1" which is nid info, so Ninox doesn't like showing nid without some other command.

    • Alain_Fontaine
    • 9 mths ago
    • Reported - view

    In the sample database provided with the question, the multiple choice field is indeed static, not dynamic. In this context, the following formula computes the percentage of options selected.

    let a := [1, 2, 3];
    let b := '數據表2'.numbers('多項選擇');
    100 * cnt(a[contains(b, this)]) / cnt(a)
    

Content aside

  • 1 Likes
  • 9 mths agoLast active
  • 5Replies
  • 77Views
  • 3 Following