A conditional statement, or more commonly known as an IF-THEN statement, is a useful tool in many areas of Acumatica. Writing this blogpost made me think of the ‘conditional statements’ I encountered when I was younger:
Dad: Son, if you study, then you’ll get good grades.
Me: Dad, if I get good grades, then can we go to Disneyland?
While I didn’t end up going to Disneyland, I become well verse in the IF-THEN logic.
In Acumatica, we can use conditional statements to filter data, setup approval/assignment maps and validate records amongst other applications. In this blog post, I’ll demonstrate using conditional statements to filter data in 2 different ways.
In the example below, I want to narrow down my search for ‘Sales Order’ documents for ‘Westwood Manor’ in Q3 of 2019 from over 4,600 records.
Figure 1. Sales Orders summary screen
One way to approach this is to set quick filters for the Customer, Order Type and Date columns. To filter by Customer, we are effectively stating that IF customer ID on the sales order document is WESTWOOD, THEN display the record. Similarly, the Order Type filter returns records IF it is equal to SO and the Date filter applies to SO date between July 1 and September 30 (see Figure 2 & 3).
Figure 2. Quick filters applied to Customer, Order Type and Document Date
Figure 3. Results matching filter conditions
Commonly used filters can also be setup and shared using the Filter Settings function (Figure 4). The same filtering conditions are listed in Figure 5.
Figure 4. Access the Filter Settings function
Figure 5. Applied Customer, Order Type and Document Date conditions to Filter Settings
In summary, conditional statement is an extremely useful tool in Acumatica. In part 2 of this series, we will discuss using conditional statements to validate CRM records.
Eric.