Skip to main content

We have a Generic Inquiry that has the Customer.ParentAccountID and not all of the parent accounts have that that number all by itself (the account number also, in some cases, has the name of the customer). I was thinking in that case to use a SWITCH similar to the one here:

=IIF([Customer.ParentBAccountID] = ' ', [Customer.AcctCD]) but that is not working also. Also I am not sure if the Customer.ParentAccountID is empty or NULL. I know that the Customer.ParentAccountID should be showing up because when I do a CRTL+ALT the Element property shows the field as Customer.AcctCD. I also thought about getting just the number portion of the AcctCD but that seems more work then necessary. I could use any suggestions that the Community may have.There are accounts whereby the Customer.ParentBAccountID is showing up correctly on that column.

In this case the Customer.ParentBAccountID = ‘ ‘ or NULL and the customer.AcctCD is 16310 - Grainer.

 

Hi @wmatthews1877! I would recommend to just add a field and see what the output of [Customer.ParentBAccountID] is.

You can add the Len() function to it to see if there is some blank character or something

I don’t know if it matters or not, but using ‘ ‘ instead of ‘’ might make a difference also (omitting the space between the single quotes).


I’m not sure I follow but if you’re trying to have a column that displays the Customer.AcctCD except when there is a parent account and in that case display the Parent’s Customer.AcctCD, then I think your trouble might be that the Customer.ParentAccountID is not the same as the Customer.AcctCD of the parent account

 

Try joining PX.Objects.CR.BAccount to the PX.Objects.AR.Customer table where parentBAccountID equals bAccountID

 

And then use =isNull(

 


 

 


That worked perfectly. Thank you and stay safe!


Reply