Hi all,
I need help connecting Workshop filters to a function. I have a Function that calculates a percentage and a Workshop filter panel (filtering on Division, City, etc.).
How do I pass the user’s selections from the filter panel (which can be multiple values, e.g., two Divisions selected) into my TypeScript Function as parameters? I believe I can do it via the variables inside workshop but it doesn’t seem to let me as it says “undefined” value even when values are selected.
Thank you!
Hey, if you’re using the Filter List widget, there’s unfortunately no way (at the moment) to extract the user-selected values into dedicated variables that you can then pass in as arguments to your function. However, a workaround for string properties is to use a string selector widget. It outputs a workshop variable you can use to 1) apply the same filters on the relevant property to your filtered object set variable, and 2) pass those as arguments.
1 Like
Hi @UmbertoAzeglioP have you tried to embedd a variable in the object set filter variable with enabled “update used variable on filter value change”? This will update the variable to the user selection. This feature is available since a couple of weeks and to me it sounds like it should solve your needs 
https://www.palantir.com/docs/foundry/workshop/object-set-filter-variables
3 Likes
Hi @UmbertoAzeglioP one addition I just learned myself. Updating variables does not work with every filter widget. E.g. pivot tables are unfortunately not properly supported. But if you have the default filter widget you are perfectly fine
1 Like