Skip to main content
Solved

Report Designer Expression

  • Oct 23, 2026 4:50 PM UTC
  • 5 replies
  • 42 views
  • Translate All

Forum|alt.badge.img

On the Project Cost History Report we have an invoice field in which we want to navigate to either the AP invoice or AR invoice depending on the transaction. Trying to do an IF statement =IIf([PMTran.TranType]='AP',[APTran.RefNbr],[ARTran.RefNbr]) but no matter what the hyperlink only works and navigates to the invoice that is the True part of the statement.

If I have AP ref nbr mentioned in true part it successfully navigates to the invoice when you select the hyperlink in the report. When selecting a AR line it does not navigate to it:

'object reference not set to an instance of an object’

Best answer by BenjaminCrisman

​@Garbhanm4 I think what might work better would be to have overlapping fields with visibility function which only displays if the tran type matches. That way the Navigation parameter can be specific to the field and not worry about deciphering a function. Have you already tried that?

View original

5 replies

BenjaminCrisman
Acumatica Employee
Forum|alt.badge.img+4
  • Acumatica Support Team
  • Answer
  • Oct 23, 2026 4:56 PM UTC

​@Garbhanm4 I think what might work better would be to have overlapping fields with visibility function which only displays if the tran type matches. That way the Navigation parameter can be specific to the field and not worry about deciphering a function. Have you already tried that?

Translate

Forum|alt.badge.img
  • Author
  • Freshman I
  • Oct 23, 2026 5:07 PM UTC

do you mean have two separate fields in the same spot and have APTran.RefNbr in one field and ARTran.RefNbr in the other and have the PMTran = ‘AP’/’AR’ in visible expression?

Translate

BenjaminCrisman
Acumatica Employee
Forum|alt.badge.img+4

Yeah, that way it’s only displaying one field

Translate

lauraj46
Captain II
Forum|alt.badge.img+9
  • Captain II
  • Oct 23, 2026 5:26 PM UTC

Hi ​@Garbhanm4 ,

Unless I’m misunderstanding your explanation, the AP invoice (AP301000) and the AR invoice (AR301000) are housed in different Acumatica screens.  If you set the Navigation method to Client then you could build the NavigateURL accordingly, something like:

=’main?Screenid=’ & iif([PMTran.TranType]=’AP’,’AP301000’, ‘AR301000’) & ‘&DocType=Invoice&RefNbr=’ & IIf([PMTran.TranType]='AP',[APTran.RefNbr],[ARTran.RefNbr]) 

Hope this helps!

Laura

Translate

Forum|alt.badge.img
  • Author
  • Freshman I
  • Oct 23, 2026 5:50 PM UTC

Hi Laura - it’s not letting me paste screenshot or attach for some reason here but yes they are different screens but in the report designer if just ‘=[ARTran.RefNbr]’ is the value in the field it becomes a hyperlink in the report navigating you to the invoice. 

 

I feel it doesn’t make sense why the if statement (=IIf([PMTran.TranType]='AP',[APTran.RefNbr],[ARTran.RefNbr])) doesn’t work but I just did what Benjamin suggested and created two fields and put the if part ([PMTran.TranType]='AP') into the VisibleExpr and have the value just be [APTran.RefNbr] and the same for the AR field.

 

 

 

Translate