0

Count items (all) in a dynamic multi choice field

There is probably a simple answer, but I've been scratching my head here....

I create a MultiChoice (dynamic) field and the contents come from a "select" statement filtering records from a table.

I know how to count and get the Ids of CHOSEN elements using NUMBERS (not chosen)

But...how do I count the number of listed items - chosen and not chosen? Documentation would appear to suggest using "length(MCD)" - but that does not work at script approval level.

Platform MacOS

 

Thanks in advance....

8 replies

null
    • John_Halls
    • 6 days ago
    • Reported - view

    You could repeat the select in a formula field and count the members of the resulting array.

    count(select table where field1 = value1)

    All other options seem to give the number of selected items

    Regards John

      • Keeping the grey cells active…..at 70+
      • Graham
      • 6 days ago
      • Reported - view

       - Thanks John - thought about that, but I am referencing an MCD where there is a choice of "select" functions and addressing the field from another routine. So this routine doesn't know the criteria used in the select statement.

      I love to make life difficult!!

    • Fred
    • 5 days ago
    • Reported - view
     said:
    but I am referencing an MCD where there is a choice of "select" functions and addressing the field from another routine.

     I think  was talking about is to put the same code you have in the dMC field into another formula field but instead of returning an array, put count() or length() around it. 

      • John_Halls
      • 5 days ago
      • Reported - view

        Fred is right. Should work Graham

      • Keeping the grey cells active…..at 70+
      • Graham
      • 5 days ago
      • Reported - view

       I see the logic, and will probably end up there...I was just searching for a neater answer than using a dummy field. But I've found in Ninox that workarounds are fairly common!

      Thanks both.

      • Fred
      • 5 days ago
      • Reported - view

       I would say that it is not really a "dummy field" as you had to create a 2nd formula field anyways.

      • Keeping the grey cells active…..at 70+
      • Graham
      • 5 days ago
      • Reported - view

       and thanks both. I've gone what you suggested and it does the job. Thanks for the help here. Seems I was trying to find so that didn't exist!

      plodding on.....

    • Keeping the grey cells active…..at 70+
    • Graham
    • 4 days ago
    • Reported - view

    and - I shall retype my last, with autocorrect OFF!

    Season's Greetings.🎄

    Thanks both. I've done what you suggested and it does the job. Thanks for the help here. Seems I was trying to find something that didn't exist!

    plodding on.....

Content aside

  • Status Answered
  • 4 days agoLast active
  • 8Replies
  • 32Views
  • 3 Following