0

Automated Multiple Choice: Is it possible?

Is it possible to automate Multiple Choice field based on trigger/update from another fields – which is two or more fields.

 

See situation below:

Multiple Choice (MC): where there are 3 choices indicating step 1, step 2 and step 3.

Table 1 status field: if “Yes” then MC Step 1 will be automatically checked.

Table 2 status field: if “Yes” then MC Step 2 will be automatically checked ALSO (aside from Step 1 which is ticked already)

Table 3 status field: if “Yes” then MC Step 3 will be automatically checked ALSO (aside from Step 1 and Step 2 which are ticked already)

 

I’ve successfully tried the Table 1 scenario but I cannot do Tables 2 and 3 scenarios. Is this possible?

This will be used for automation and process tracking using multiple choice. I’d appreciate if you could send sample if this is doable.

Greatly appreciate your feedback.

7 replies

null
    • Ninox partner
    • RoSoft_Steven.1
    • 9 mths ago
    • Reported - view

    I supose your code in your first table would be something like

    MultipleChoice := 1

    Now if you want to select the other choices you could use this in your second table:

    MultipleChoice := [1,2]

    Same for the third table:

    MultipleChoice := [1,2,3]

    and so on.

    Hope this helps.

      • Ram_Vidanes
      • 9 mths ago
      • Reported - view

        Many thanks! This is helpful but I forgot to mention, if the case is it's not sequential or in no particular order and it's not dependent on the other option, like:

      Table 3 first then Table 1 then Table 2  or

      Table 2 then Table 1 then Table 3

      and MultipleChoice should mark options based on updated field/s from those tables (without affecting the other marked/unmarked option/s.

      If that make sense. :) 

    • Alain_Fontaine
    • 9 mths ago
    • Reported - view

    To set the option identified by "Number" without touching the state of the other options:

    'Multiple choice' := array(numbers('Multiple choice'), [Number])
    

    To clear the option identified by "Number"without  touching the state of the other options:

    let o := numbers('Multiple choice');
    let i := index(o, Number);
    if i >= 0 then
        'Multiple choice' := array(slice(o, 0, i), slice(o, i + 1, length(o)))
    end
    

    One word of caution: if "Number" designates an option that does not exist, Ninox will nevetheless happily set or clear it.

      • Ram_Vidanes
      • 9 mths ago
      • Reported - view

        very helpful but I think I'm missing something on how to use the 2nd coding (to clear the option) could you help me check this simple and straightforward database I created? See the attached. Thank you very much! :) 

      • Alain_Fontaine
      • 9 mths ago
      • Reported - view

       Does this in "Table 3" do what you need:

      if Choice != null then
          'Table1 (Multiple Choice)'.('Progress Status' := array(numbers('Progress Status'), [2]))
      else
          'Table1 (Multiple Choice)'.('Progress Status' := numbers('Progress Status')[!= 2])
      end
      
      • Ram_Vidanes
      • 9 mths ago
      • Reported - view

        This is what I would need! I missed that null (!) code; I didn't know it could do it. Thanks a million! Appreciate it. 

    • Alain_Fontaine
    • 9 mths ago
    • Reported - view

    For the record: I did just build a better mousetrap (for the "reset" function):

    'Multiple choice' := numbers('Multiple choice')[!= Number]
    

    Yet another one-liner!

Content aside

  • Status Answered
  • 9 mths agoLast active
  • 7Replies
  • 123Views
  • 3 Following