I am trying to update our PSAProjInvoice with an iif statement on TransactionOrigin to display varying text but am running into some issues. I basically want to have TransTxt display if the category meets any of the conditions listed but I get a function error. Any help is appreciated!
I’m not sure I understand what output you are trying to achieve with the expression (because the same value is returned for each TransactionOrigin/@Name value), but an iif() function requires three parameters - the first is the expression that is evaluated, the second one is returned if the expression is true, and the third one is returned if the expression is false.
So, the expression with nested iif() functions would look something like this:
So, if TransactionOrigin/@Name is HourJournal, it returns someValue1, otherwise, it will evaluate if TransactionOrigin/@Name equals FeeJournal, and return someValue2 if it does, otherwise it will evaluate if TransactionOrigin/@Name equals ItemJournal and will return someValue3 if it does, and finally, it will return an empty string if none of these conditions are met.
Please replace the someValue placeholders with the actual expressions you need.
I want the item category to return if the journal was a fee or hours whereas if it was neither of those, then return the ItemName BUT instead of it saying PARTS then have the ItemName.
This is getting me closer but now I cannot get @ItemName to return:
Could you please clarify what you mean by ‘return the ItemName BUT instead of it saying PARTS then have the ItemName’ ?
Could you send us a screenshot of the values of the @ItemName field in the data source, or send us your template and DDSP file? If it contains sensitive data you don’t want to share publicly, you can send us an email at support@docentric.com.
I sent my template over to support but realized we needed to add additional fields to the DDSP to achieve the end result which is the following using this iif statement: