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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Case statement in Record Selection Editor 1

Status
Not open for further replies.

kj27

Programmer
Mar 16, 2010
30
US
Hi All,

I have a parameter prompting the user to select a name, and in my record selection formula, I want to interpret that selection for the query (like an IN inside the WHERE clause):

{Table1.Field} = "Something" AND
{Table2.Field} in

Select {?User Parameter}
Case "Value1": "["6001", "6002"]"
Case "Value2": "["6005", "6008"]"
Default: ""

(i.e. I'd want the selection to be something like: {Table2.Field} in ["6001", "6002"]).

When hardcoding the statement like this, there are no errors. But I think because of the double-quotes, I get an error in the formula.

Any help is greatly appreciated.
 
{Table1.Field} = "Something" AND
(
Select {?User Parameter}
Case "Value1": {Table2.Field} in
["6001", "6002"]
Case "Value2": {Table2.Field} in
["6005", "6008"]
)

-LB
 
Thanks LB! I came up with a different solution - but this one is much cleaner. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top