Use variabels in Xpath query

Is it possible to add a variable into a Xpath for example: //record[@Name='This should be a variable']/expr0 This way it's way more efficient to build period or user related dashboards.


  • 0
    Brian Moore
    This would be huge for our needs. There are often times where we could have the need for 100 or more if statements, while using a variable in the Xpath would be much more efficient.
  • 0
    Matt Mah
  • 3
    Arshad Hayat
    You may want to try this through DATASOURCE function: DATASOURCE( "abcd12345" , CONCAT( "//record[@name='" , variable, "']/expr0" ) ) ) You can set the variable through drop-down Here "abcd12345" is the data source id More on the function: http://klipfolio.uservoice.com/knowledgebase/articles/131145-datasource-function
Please sign in to leave a comment.