Create token in Bridge Parameter script

I want to create a Bridge Parameter Script that checks for a certain value and if the value is included in the filter selection returns the All token. I am struggling however to create this All token. Can you help me with this. My script looks something like this:

...
if (member == "test") {return All Token}
...
1 Like

Howdy,

You’ll need to do something like this:
return new SingleStringValue( PredefinedToken.All.Id, PredefinedToken.All);

The constructor used will need to change to match what the Bridge Parameter supports: Bridge Parameter Types

The PredefinedToken Class (found here) gives you the full list of tokens you can use.
The ParameterToken Class can also be used, if needed.

Thanks,
Mark

Howdy Mark

This is helpful for me too.

Which (if any) token can I use to get all the children of a particular item in a hierarchy?
For example, I have a country/city hierarchy and put that in a parameter hierarchy picker on the dashboard. If the user selects ‘US’ (US.B) then I would need to select all the countries below it (e.g. Washington.A, New York.A etc)
I’m using a hard coded array in my bridge parameter code, but if there was a token to get this, that would be great.

Thanks

Howdy David,

My first choice would be the Script Token, but I’m not sure if that would solve your question. I’d recommend reaching out to support with this one to see if there is anything they could recommend.

Thanks,
Mark

Hi Mark

My question was, which script token?

Hey David,

After some trial and error, it turns out a token that’ll let us select all of the children for the item selected in the hierarchy doesn’t exist. I was hoping a custom Script Token would work, but that didn’t pan out either.

Thanks,
Mark

Thanks for trying Mark. I’ll have to stay with my hard coded array.