I cannot seem to work out the correct syntax for using “Is In” in a GI condition. For example pColumnX] is IN (‘ValueA’, ‘ValueB’, ‘ValueC’).
For ‘Value 1’ in the GI condition tab I have tried:
(‘ValueA’, ‘ValueB’, ‘ValueC’)
‘ValueA’, ‘ValueB’, ‘ValueC’
“ValueA”, “ValueB”, “ValueC”
ValueA, ValueB, ValueC
I have even tried creating a COMBOBOX parameter and assigning that as the Value.
Nothing works, the resultant SQL in the Trace is not want I am expecting and there is nothing returned.
Any know what to do?
Page 1 / 1
While a bit delayed, I came across a similar situation and wanted to share my solution. I am on Acumatica 2023 R2.
I have been able to accomplish your expected functionality by using the “Contains” condition instead of “Is In”. The syntax for the list of values is only comma delimited, not comma-space, and all one string. You can also use a combo box parameter (I have mine called eBrand] in below picture) if you wish to dynamically select which values are to match.
I have found all of these to be equivalent for returning results that have a value of ValueA OR ValueB OR ValueC
Note that if a field can have multiple values, then the condition will match if any of the values are present. To elaborate, say we have the below three items with the multi-value attribute of Brand: SKU Brand ItemA ValueA ItemB ValueB ItemAB ValueA,ValueB
With the condition of “InventoryItem.BRAND_Attributes Contains ValueA”, the result will be ItemA and ItemAB. With the condition of “InventoryItem.BRAND_Attributes Contains ValueA,ValueB”, the result will be ItemA and ItemB and ItemAB.
Thanks @stephenbologna39 , I have been using the OR conditions in my GIs to get around this. However had hoped there was a better way, there are many use cases for the ‘Is In’ condition, I would hope that one day Acumatica can inform us of the correct way to use it.
Hi @MarkOM
I’ve also tried using ‘Is In’ like that on a few occasions, but have never gotten it to work either. The only documentation I’ve ever found on it comes from the Generic Inquiry’s built-in help page. This following comes from the help page under Conditions -> Value 1:
From what I can tell, it works with workgroups. I don’t know if it works for other scenarios.
Generally whenever I need to match a field against more than one possible values, I have just used multiple condition lines connected with ‘Or’.
For example:
Hi @MarkOM If possible, can you please share the GI, which you created?