I’m curious to see if there is a way to pass parameters to actionSheet.open() so that you can build an action sheet programmatically using Run Script/Javascript Queries. When you run a script with the actionSheet.open() function, it does open a sheet at the bottom, but it’s blank. I haven’t found a way to pass parameters, but i’m also still learning javascript lol!
I just checked our docs here on action sheets, and after testing it out, it doesn't appear to be possible to dynamically pass in values to an action sheet.
It looks like we set up the action sheet to be primarily statically defined.
As @DavidD pointed out, the best way to have some elements of dynamic optionality would be to use some javascript logic to chose different action sheets.
With the same ternary logic possible for any places you are able to use {{ }} to run JavaScript if you want to dynamically chose what appears in the action sheet/buttons based on the value of a variable.
Let us know more about your use case to see if we can think of some possible work arounds