
Hello,
I have the following XML:
I am trying to create a power automate flow that returns the IdProduct value, if i know the "Code" value.
I created a compose action with this code and it worked:
xpath(xml(outputs('Compose')), 'string(//Product[@Code=''1078'']/@IdProduct)')
But i want to create an input (variable,compose) and return it. for example:
xpath(xml(outputs('Compose')), string(concat("//Product[@Code=''", variables('var'), "'']/@IdProduct")))
and i get expression invalid.
Can someone help? thanks.
<tns:rowset xmlns:tns="http://1.1.1.1/test">
<tns:row>
<tns:_xFFFF_xmlresponse><Products NrDoc="68">
<Product IdProduct="1561" Code="1078" Date="2023-03-03 09:57:59.374"/>
<Product IdProduct="1562" Code="1079" Date="2023-03-04 09:57:59.374"/>
</Products></tns:_xFFFF_xmlresponse>
</tns:row>
</tns:rowset>
"
Hi @czx ,
Please try this: