Jump to content
We've recently updated our Privacy Statement, available here ×

collection parameter


mohammad_awadat

Recommended Posts

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

If the parameter you pass in is of type collection, then you need to use $X{IN, param}.

So if you have a parameter called testCollection of type Collection, your SQL would be:

Code:
... 
WHERE PATIENT_NO $X{IN, testCollection}
...

 

Alternatively, you can use Strings for everything and hard put the SQL. So if you had a parameter called testCollection of type String to which you pass in the value "22222,2223322,22224562", your SQL would be

 

Code:
[code]...
WHERE PATIENT_NO IN ($P!{testCollection})
...
Link to comment
Share on other sites

For the former, I'm sorry, I provided you with the wrong syntax. It should be $X{IN, <column>, <param>}, so:

Code:
WHERE $X{IN,PATIENT_NO, testCollection}

 

For the latter, the parameter type must be String. So your backend java code would be:

Code:
[code]
String testCollection = "22222";
testCollection += ",2223322";
testCollection += ",22224562";

This would all you to properly use

Code:
[code]WHERE PATIENT_NO IN ($P!{testCollection})
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...