cancel
Showing results for 
Search instead for 
Did you mean: 

Content Filter XPath compare Header Value

nairanoop
Explorer
0 Kudos

HI All,

I want to filter the content comparing date with a date node in the content. The date to compare is saved in one of the header variable. Can we access the header variable in the XPath expression? When I used ${header.lastModified} gives me InvalidXPathExpression exception. Tried without curly braces, but the comparison is not working.

Regards,

Anoop

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Anoop,

Could you please refer below blog.

https://blogs.sap.com/2017/06/01/sap-cloud-platform-integration-content-filter-in-detail/

hope this helps !

thanks and regards,

Praveen T

Answers (1)

Answers (1)

nitindeshpande
Active Contributor
0 Kudos

Hello Anoop,

Considering, your input structure is in below way -

<recordset>

<record>

<date>20180314</date>

</record>

</recordset>


Then you can write the Xpath expression as /record/recordset[contains(date,$header.lastmodified)]


Regards,

Nitin Deshpande

nairanoop
Explorer
0 Kudos

Hi Nitin,

I tried with that approach itself, but was not succesful. I removed header and used $lastModified directly and it worked. 🙂

Regards,

Anopo