Skip to main content

Hi,

 

Trying to build out a GI and needing some help on an IF statement.

 

Here’s the scenario. 

If Qty in APTran more than 0 (red check), it will return data Inventory acc ID (yellow checks) else will return AP Acc ID (Blue Check).

 

So, here is my formula:

Receipt Account=IIf( nAPTran.Qty]>0,tInventoryItem.InvtAcctID], AAPTran.AccountID])

 

and  when applied it on Receipt Account field, it revert to “something else” value which shown above did not return as well as they taken individually.

 

Need your advice on this problem.

Thank you in advance.

Set your schema field on Receipt Account to APTran.AccountID. 

 

Let us know the results. 
If more help is needed upload your GI’s XML here and we can assist further.  
 

This happens because the column is returning the Account’s ID rather than the Accounts CD.  Setting the schema field lets Acumatica know the format of your result and will correctly translate the ID → CD


@satwikh1  Please share your XML format of your GI here. 


Hi all,

 

Thanks for your reply. 

applied APTran.AccountID on Schema Field also produce the same result.

please find attached the XML for further assist.

 

 


@satwikh1  I have modified your GI by adding additional JOINS. Now, it is showing the right Receipt Account based on the conditions. Please find the attached GI here.

 

 


@satwikh1  I have modified your GI by adding additional JOINS. Now, it is showing the right Receipt Account based on the conditions. Please find the attached GI here.

 

 

Now it’s worked well, with simple modification. Thanks @Naveen Boga  


@satwikh1  Great 🙂 Thanks for sharing the update.


Reply