tomwhittaker
tomwhittaker

Reputation: 381

How can I set a variable in my workshop module via URL?

I currently have a workshop module that allows users to view a set of objects and then filter them according to a filter widget.

I would like my users to be able to set which filters are applied via URL such that they can quickly apply their default filters.

How can I achieve this?

Upvotes: 0

Views: 271

Answers (2)

Logan Rhyne
Logan Rhyne

Reputation: 601

In addition to using the promoted variables described in the answer above, specifically for the case of saving and re-using Filter state, you can enable the State Saving feature for users of your app, which allows them to snapshot and save specific application state as a separate Foundry resource. You can then share the link or bookmark or re-open from a folder without worrying about the "wiring" of variables and URL parameters.

Upvotes: 0

tomwhittaker
tomwhittaker

Reputation: 381

  1. Create a variable for each filter you would like the user to be able to apply via URL.
  2. Promote the variable so that it can be update via the URL. enter image description here
  3. Update the filter output to use the variables you created above. enter image description here

Upvotes: 1

Related Questions