Trying to setup an array rather than a giant list of string of's

So I am trying to grab a few specific computers in a specific region property and I want to rather than using that last whose line where I need to write out every single region one by one would like to setup an array of regions something like “0078, 0048, 0019 etc…” Is there a way to produce this sort of array that will be more efficient than a ton of whose lines?

exists (if (name of operating system as lowercase starts with "win") 
	then (if (exists key "HKEY_LOCAL_MACHINE\Software\StoreNet" of registry) 
	then (if (exists value "Region" of key "HKEY_LOCAL_MACHINE\Software\StoreNet" of registry) 
	then (value "Region" of key "HKEY_LOCAL_MACHINE\Software\StoreNet" of registry as string) 
	else ("undefined-test")) else ("N/A")) 
else (if ((name of operating system as lowercase starts with "linux suse") 
	and (computer name as lowercase contains "-cr")) 
	then (if (exists file "/dg/tmp/storeinfo.txt") 
	then (substring after ":" of line 3 of file "/dg/tmp/storeinfo.txt") 
	else ("no file")) else ("N/A")) ) whose (it as string as lowercase contains "0078" as lowercase)

If I’m reading this correctly you could use

whose (exists (it, ("0078" ; "0048"; "0019")) whose (item 0 of it as string as lowercase contains item 1 of it as lowercase) )

I use this a lot
EMSID is a unique ID our customers have.

(("|" & value of setting "EMSID" of client as string & "|") is contained by "|0078|0048|0019|")
1 Like