Jump to content

Smart Rule


 Share

Recommended Posts

I'm trying to work on the condition for a smart rule on an item when it is created.

If the item is non-inventory, non-investory (sales only), or non-inventory (purchase only) the user must not be able to pick a GL Group in the following range:

13000 to 22020 (currently 9 in the range)

or

Equipment, Merchandise, Parts, Shop Supplies

or in the range:

SYS_ITEMGLGRP_13000 to SYS_ITEMGLGRP_22020 (currently 8 in the range)

 

I can't seee a straightforward way of doing this.

 

 

Link to comment
Share on other sites

Hi Lee, 

It sounds like you may want to clean up the Item GL Groups a bit, but understanding that in reality that might not be an option, I think the following will work, or at least I couldn't break it in my testing, though there are probably scenarios not covered which would:

{!ITEM.GLGROUP!} != ""
AND (
  LEFT({!ITEM.ITEMTYPE!}, 3) != "Non"
  OR ( 
    (RIGHT({!ITEM.GLGROUP!},5) < "13000"
      OR RIGHT({!ITEM.GLGROUP!}, 5) > "22020" )
    AND {!ITEM.GLGROUP!} != "Equipment"
    AND {!ITEM.GLGROUP!} != "Merchandise"
    AND {!ITEM.GLGROUP!} != "Parts"
    AND {!ITEM.GLGROUP!} != "Shop Supplies" 
    )
)

Testing details here for reference: https://docs.google.com/document/d/1AujylHf5smB5tEoW6LDcE0InWswD8-BxzWBx6qTaHTQ/edit?usp=sharing 

Link to comment
Share on other sites

 Share

×
×
  • Create New...