0

How do I place specific text (in one box) depending on value in another box?

I have the following field:   CLASS TYPE

Within the CLASS TYPE, I have the following choices:

50 COMPUTER
08 PHOTO
12 TOOLS
08 OTHER
ADDED TO DB

I have an empty filed:   CLASS NUMBER

Once I choose one of the (5) choices from CLASS TYPE, I would like the CLASS NUMBER to automatically show up.   If I choose:

 

"50 COMPUTER", then I would like to see "50" in CLASS NUMBER

"08 PHOTO", then I would like to see "08" in CLASS NUMBER

"12 TOOLS", then I would like to see "12" in CLASS NUMBER

"08 OTHER", then I would like to see "08" in CLASS NUMBER

"ADDED TO DB", then I would like to see "DB" in CLASS NUMBER

4 replies

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

    Assuming you're using a choice field : 

    • danlap333
    • 4 yrs ago
    • Reported - view

    Thank you, I finally Figured it out

    • Mconneen
    • 4 yrs ago
    • Reported - view

    @danlap333.. .Why are you combining "Class Number" and "Class Type" into one field?   Which field is the key value vs. which is the descriptive value?   Or.. are they both "key values" ? 

    Let us assume that they are both key values.. and a user either knows 50 as the Class Number .. OR . Computer as the Class Type.. You could also create TWO choice boxes.. one for each.. and keep them in the same order.. then use a Trigger After Update to set the other value.. Here are a few snapshots.. 

    classType

    classNumber

    theView

    Note.. You could also use a static array in a formula field to hold the Class Number.. and keep them in sync there too..  something like

    let classNumber := ["50", "08", "12", "08", "DB"];

    item(classNumber, number('Class Type');

    • Mconneen
    • 4 yrs ago
    • Reported - view

    ooops.. forgot that item is zero based.. and the choice is not.. SOOO
    let classNumber := ["50", "08", "12", "08", "DB"];
    item(classNumber, number('Class Type') - 1)

Content aside

  • 4 yrs agoLast active
  • 4Replies
  • 2023Views