0

How to assign a value to a choice popup field?

Within a Ninox script, how can I assign a value to a choice popup field?

5 replies

null
    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view

    Do you mean a popup dialog within a script? 
    In this example i have a number field "Tablefc and a button with the code below.
    Table := dialog("Table", "Table number ?", ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"])

    Steven

    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view

    Oops, there should be an edit option in this forum.

    Not Tablefc but Table

    • Choices_Software_Dean
    • 4 yrs ago
    • Reported - view

    For example, with a Ninox choice popup field named "Choose a Letter" with popup values "A", "B", "C", how do I assign "B" to the "Choose a Letter" popup field using code?

    • Nick
    • 4 yrs ago
    • Reported - view

    Assuming Popup Values are

    1 = A

    2 = B

    3 = C

     

    'Choose a Letter' := 1 

    or

    'Choose a Letter' := text("A")

    • Choices_Software_Dean
    • 4 yrs ago
    • Reported - view

    Yes, the 1 or text("A") does seem logical and does work. After some more testing it also seems like if the popup contains letters that are an exact match with the letter(s) being submitted, then the assignment will work, without requiring text("A"). Thank you for your replies.

Content aside

  • 4 yrs agoLast active
  • 5Replies
  • 1501Views