Skip to main content
Solved

Correct syntax for the "Is In" condition in GI

  • October 14, 2021
  • 4 replies
  • 633 views

I cannot seem to work out the correct syntax for using “Is In” in a GI condition. For example [ColumnX] 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?

 

 

Best answer by stephenbologna39

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:

 

 

View original
Did this topic help you find an answer to your question?

4 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3407 replies
  • October 14, 2021

Hi @MarkOM  If possible, can you please share the GI, which you created?


Forum|alt.badge.img+1

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:

 

 


  • Author
  • Freshman I
  • 2 replies
  • October 17, 2021

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.


plambert
Freshman II
  • Freshman II
  • 6 replies
  • December 20, 2024

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 [Brand] 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.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings