Currently, the only workshop dropdown widgets are String Selector and Object Selector. It would be great if you could add a Number Selector. We have a use case where we have a predetermined (via a function) list of valid numbers (in this case, years) that we want to present to the user for selection. The result is stored in an Integer array. The only way we can implement this right now is to use the Inline Action Form. If there were a Numeric Selector widget, we would happily use it for this purpose.
Yes, I know we can create custom widgets. But I think this is a valid use case for inclusion in the product itself.
Hi @marcia-schulman is it an Option for you to return your custom array of years as string array and then do the casting into numeric only on the selected string variable? I am only on my phone so I can’t share a screenshot, but the vanilla variable transformations offers a cast that works fine on str to int.
On double I observed it not handling the localization of , and . properly (3.1415 vs 3,1415). If I remember correctly it was failing on localizations that use ,
Unfortunately, I’m not sure that would work because the user is allowed to select multiple years from the list. So we need to be able to store an integer array as well.
I understand, you have a multi select.
Alternative option is you write a simple ts function that just casts all str values within your selected array into int. To use this function you create a new function-backed numeric array variable. The input to this function is the str array of your year string selector.