Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula evaluating a list of 50 values that are strings.

Status
Not open for further replies.

nerdygirlgear

Programmer
Mar 31, 2020
8
US
Hello everyone!

I created a formula to evaluate a string field. The * can be any number of characters including (),A-Z,., or other numbers.
My current formula is returning a 0 for all records, even though there are some that meet the criteria.

if {field1.flagcheck} in ["940.01*", "940.02*", "940.03*", "940.05*","940.06*", "940.07*", "940.08*", "940.09*", "940.1**",
"940.19*", "940.195*", "940.2*", "940.21*", "940.22*", "940.235*", "940.285*", "940.29*",
"940.295", "940.3*", "940.302*", "940.305*", "940.31*", "940.32*", "940.43*", "940.45*",
"941.2*", "941.26*", "941.32*", "941.325*", "941.327*", "941.38*", "943.1*", "943.23*",
"943.32*", "943.87*", "946.01*", "946.03*", "946.41*", "946.43*", "947.013*", "948.02*",
"948.03*", "948.05*", "948.06*", "948.07*", "948.08*", "948.09*", "948.095*","948.3*", "948.51*"]
then 1 else 0

Is there a better way to do this?
Thanks!
 
If your going to use wildcards asterisk you need to use “LIKE” and not “IN”.

IN doesn’t accept wildcards.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top