1 of 1 people found this helpful
It might be better to store these numbers and their province abbr. within individual records instead of putting them all into one field; but if you (have to) put them into one field, you should use a carriage return as delimiter; it's more robust and obvious than a blank.
And speaking of which: if you have two carriage-delimited lists, you can simply filter one through the other. Here an example using fixed-value lists; the expression
zoneOriginal = "1 2 3 901 902 903 1015 2045" ;
zoneAsList = substitute ( zoneOriginal ; " " ; ¶ ) ; // when/if you use a carriage-returned list, this assignment is unnecessary
ON_Stores = List ( 901 ; 902 ; 903 )
FilterValues ( zoneAsList ; ON_Stores )
you'll need to use FilterValues ( )
v = Substitute ( Zone Filtered ; " " ; ¶ ) ;
Substitute ( FilterValues ( "901¶902¶903¶1¶2¶3" ; v ) ; ¶ ; " " )
Thank you very much. this is exactly what I am looking for.