Is there a shapesheet function to parse arrays?

Started by healthNut, December 09, 2012, 01:10:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

healthNut

I'm trying to check if a Shape Data  choice (Prop.Specialty) is a match in an existing list of strings (User.Specialties).

Currently, I would have to do:
OR( STRSAME ( "Prop.Specialty", string1 ), STRSAME( "Prop.Specialty" , string2 ), ... )
This is tedious due to the
-Repeated STRSAME calls
-the manual string entries
-this check is repeated in multiple places

It is ideal if I could:
OR ( Iterate through Specialties Array (STRSAME ( "Prop.Specialty", Specialties[ i ] ) ) )

This could be done in Code but I'm trying to stick to shapesheet formulas to keep it optimized

healthNut

Found Index() which helps but still have to manually iterate through list

Jumpy

The trick is to use INDEX together with LOOKUP.

healthNut


HRGunn

Quote from: healthNut on December 10, 2012, 02:40:44 PM
Thanks for lookup, playing with it right now.

Hello healthNut,

Did you find a solution for this?

healthNut

Yes

=IF(-1<LOOKUP(User.Specialty,User.Specialties),TRUE,FALSE)

Yacine

Yacine

healthNut