Filtering by Event XML | Community
Skip to main content
Heku_
Level 5
December 27, 2023
Solved

Filtering by Event XML

  • December 27, 2023
  • 1 reply
  • 597 views

Hello, i want to filter by the "Event XML" (ctx) field for the events coming, it contains data like <ctx> <age>50</age> <ctx>. I want to create a filter for the age in that field, but the field "ctx" doesn't appear in the filter, I think because it's declared with xml="true".

I can list for it but not filter:

Any idea of how can I filter for this field?

@Manoj_Kumar_ @ParthaSarathy @Parvesh_Parmar @DavidKangni

Thank you in advance.

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Heku_

I've found a way, by parsing the xml with this filter I could get de value so i can filter with the equals to, greater than... operators.

Substring(ToString(data) , Charindex(data , '<var1>') + Length('<var1>') , Charindex(data , '</var1>') - (Charindex(data , '<var1>') + Length('<var1>')))

1 reply

Heku_
Heku_AuthorAccepted solution
Level 5
December 28, 2023

I've found a way, by parsing the xml with this filter I could get de value so i can filter with the equals to, greater than... operators.

Substring(ToString(data) , Charindex(data , '<var1>') + Length('<var1>') , Charindex(data , '</var1>') - (Charindex(data , '<var1>') + Length('<var1>')))