If Then Else Statement

Hi, I would like to create a simple IF Statement, if value from field like example Payment_XLNVIRI=“Vorkasse” then print “VK-Rechnung”, else “Rechnung”.

I tried like this, but I can see it does not work.
iif(FreeTextInvoiceHeader/ExtensionFields/@Payment_XLNVIRI=“Vorkasse”,“VK-Rechnung”, “Rechnung”)

Thank you.
Kind regards
Admir

Hi @Admir,

From what I see and have tested, this XPath expression is correct and produces the expected result.

Could you provide more information on where the problem is?

Hi @AmirO thank you for your respond.
In my case the result would not be expected, as I get XPath Result:

Hi Admir,

Could you please try formatting it like this?

It looks like the quotes at the beginning and end of the string in your XPath expression are not correct.