Wrong ID in Multiple Choice?

I have a multiple choice field where I write a Note, and then assign it a Note Type. I'm trying to make a view where I can see what the Note is for ones that are "Issues". In the back end, it says that the id for "Issue" is 9.

But when I try to filter by that with this code:

concat(NOTES['Note Type' = 9].Note)

Nothing shows up. Then when I change the 'Note Type' to 1, all of my notes tagged "Issue" pop up like they were supposed to when filtering with Note Type 9. Any idea why this is happening? Thanks.

2 replies

    • Fred
    • 1 yr ago
    • Reported - view

    Try putting numbers() around 'Note Type'.

    concat(NOTES[numbers('Note Type') = 9].Note)

    This is only find records with only the 9th choice selected. Since it is a multiple choice field, when you choose more than 1 choice then Ninox creates an array. So if you want to find all records that have selected the 9th choice as at least one of the choices then you can use the contains() function.

    concat(NOTES[contains(numbers('Note Type'),9)].Note)

    Thanks to Jacques TUR  for informing us of changes to Ninox, we can now use an array in the contains() function. Which makes this an easier bit of coding.

      • Jordine_De_Guzman
      • 1 yr ago
      • Reported - view

      Fred This worked perfectly, thanks so much!

Content aside

  • Status Answered
  • 1 yr agoLast active
  • 2Replies
  • 72Views
  • 2 Following