Combining Xpath functions


I have the ID of a field in my ddsp where I need to print the translated description, but the field has no description. I tried this

replace(SalesConfirmHeader/@MarkupGroup_RLN,‘Verp’,‘packaging fee’))

IIf and replace works, but not in this combination. How can I achieve this?

Thanks and regards

Hello Stefan, thank you for your question.

The XPath expression does not work because it references two data sections (MainData and GeneralData) in the same expression.

To overcome this, we need to use the data-source function as described in the following forum post: Xpath functions: data-source

I believe the following XPath using the GeneralData as the binding source should do the job:

replace(data-source('MainData')/SalesConfirmHeader/@MarkupGroup_RLN,‘Verp’,‘packaging fee’))

Please test the above expression and let me know if it works as expected :+1:

1 Like

Hi Jernej,

it works. Thanks a lot :+1:


1 Like