Hello,
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
iif(Misc/@LanguageId=‘de’,
replace(SalesConfirmHeader/@MarkupGroup_RLN,‘Verp’,‘Verpackungspauschale’),
replace(SalesConfirmHeader/@MarkupGroup_RLN,‘Verp’,‘packaging fee’))
IIf and replace works, but not in this combination. How can I achieve this?
Thanks and regards
Stefan
JernejV
(Jernej Valic)
2
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:
iif(Misc/@LanguageId=‘de’,
replace(data-source('MainData')/SalesConfirmHeader/@MarkupGroup_RLN,‘Verp’,‘Verpackungspauschale’),
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 Like