Skip to main content
Answer

Adding condition in calculated field generic inquiry

  • September 20, 2022
  • 2 replies
  • 731 views

brendan91
Semi-Pro III
Forum|alt.badge.img+1

Is something like this possible? I wanted to avoid excel by making a calculated field that summarizes a single or group of inventory IDs through GI or report designer. So a calculated field would look like this...

=IIf((( [POLine.InventoryID] = 'DULS001') OR ([POLine.InventoryID] = 'DULS002')), [POLine.LineAmt], '')

Results would look like this...

    Calculated Field Calculated Field
Inventory ID Line Amt Dulse Kelp
DULS001 200 200  
KELP001 500   500
DULS002 300 300  

Best answer by BenjaminCrisman

Hi @brendan91 ! Are you grouping these results or displaying all the lines?

There won’t be a way to SUM all the lines unless it’s grouped I suspect, unless you create a SQL view which already SUMS these, then this could be displayed instead of a calculation.

But your calculation should work based on the way it looks.

I did a quick mock up using SOOrder and Order Type and found it looks exactly like you’re showing:

=IIF([SOOrder.OrderType]= 'CS' OR [SOOrder.OrderType]='IN', CStr([SOOrder.CuryOrderTotal]), '')

Again though, if you are wanting a summary of these amounts you’ll need to group by the Order Nbr or Inventory ID maybe

2 replies

BenjaminCrisman
Acumatica Employee
Forum|alt.badge.img+4
  • Acumatica Support Team
  • Answer
  • September 23, 2022

Hi @brendan91 ! Are you grouping these results or displaying all the lines?

There won’t be a way to SUM all the lines unless it’s grouped I suspect, unless you create a SQL view which already SUMS these, then this could be displayed instead of a calculation.

But your calculation should work based on the way it looks.

I did a quick mock up using SOOrder and Order Type and found it looks exactly like you’re showing:

=IIF([SOOrder.OrderType]= 'CS' OR [SOOrder.OrderType]='IN', CStr([SOOrder.CuryOrderTotal]), '')

Again though, if you are wanting a summary of these amounts you’ll need to group by the Order Nbr or Inventory ID maybe


brendan91
Semi-Pro III
Forum|alt.badge.img+1
  • Author
  • Semi-Pro III
  • September 26, 2022

@BenjaminCrisman I think I was trying it easier for an excel export, or was hoping I could figure out how to summarize this in report designer. The issue I was having with getting this formula to work was around data types and I just figured it out.

I was having a bad day when I wrote this apparently. Thanks!