Is it possible to find out what is the filtering dimension on Javascript Code? | Community
Skip to main content
Level 2
February 12, 2021
Solved

Is it possible to find out what is the filtering dimension on Javascript Code?

  • February 12, 2021
  • 1 reply
  • 2124 views

I noticed that vars.schema returns the targeting dimension name on Javascript Code, but I would like to know if it is possible to find out which is the Filtering Dimension on Javascript Code. Thank you!

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 Jonathon_wodnicki

Hi,

 

It's not stored to vars, no.

Crude approach is to search the workflow's xml, looking for query transition target = your activity, then retrieve [query/where/@filteringSchema] from it.

This can be done in 1 line using E4X filtering, doc here:

 

Thanks,

-Jon

1 reply

Jonathon_wodnicki
Community Advisor
Jonathon_wodnickiCommunity AdvisorAccepted solution
Community Advisor
February 16, 2021

Hi,

 

It's not stored to vars, no.

Crude approach is to search the workflow's xml, looking for query transition target = your activity, then retrieve [query/where/@filteringSchema] from it.

This can be done in 1 line using E4X filtering, doc here:

 

Thanks,

-Jon

Jonathon_wodnicki
Community Advisor
Community Advisor
February 21, 2021
There's xtk.workflow.get(instance.id), which also returns wppObject. Would have to use queryDef or sqlGetString for the data clob (or specifically [activities/query] for queryDef) and run it through new XML(). Cheaper to iterate over the wppObject in hand.