I’m trying to avoid creating different versions of the same Skuid page that each have different table filters set by default. I was hoping to create a single page that I could pass table filters through the URL. Is this even possible?
For example:
1. I have Skuid page that lists my Produce Inventory that includes a filterable table. The user can filter by Fruit Color (yellow, orange, green). This is easily created.
2. On a separate “Dashboard” page I would like to have a list of all available Fruit Colors. If the user clicked on a “Yellow”, they would be taken to the Produce Inventory page with the table filter “Yellow” set automatically.
3. Once they are on the Produce Inventory page they change the table filters to view other Fruit Colors (again, this isn’t a problem).
How can I accomplish Step 2 so that I don’t have to create multiple pages?
Thanks!!
Gary
Gary,
You can’t filter directly with URL parameters, but you can get around it with ui-only fields.
Create a ui-only field (called “colors” or some such) and set up a url/param condition on that field. Then, set up a 'field from another model" condition to point to the value of your ‘colors’ field.
Make sure both are set to ignore the condition if there’s no value.
Then, you’ll have to set your filter to deactivate that second condition when the user selects a different option.
Actually Matt, you can pass a url that activates a filter. Here is the format of the URL that would be passed:
/apex/skuid__ui?page=PageName&ToggleFilterConditionName=-on-&SelectFilterConditionName=ValuePassedToCondition
Notice difference in syntax for toggle conditions and for conditions that recieve values.
Sweet! Thanks, Rob!
I’m actually having a hard time getting this to work.
I’ve got my filter set up and it is working correctly when I enter the parameter in the Skuid model builder. However, when I try and pass the parameter through the URL, it doesn’t apply the filter.
Then I type in this URL:
https://buildrealty--skuid.na79.visual.force.com/apex/skuid\_\_ui?page=4.1\_MyProspects\_child&ToggleFilterConditionContactStatus=-on-&SelectFilterConditionContactStatus=Qualified
Which gives me the above result.
Am I missing something obvious here? That tends to happen!
Name of Filter: ContactStatus
Value I’m trying to pass: “Qualified”
Ok, I’m actually embarrassed that I couldn’t figure it out. Looking back on my reply, the answer is obvious.
https://buildrealty--skuid.na79.visual.force.com/apex/skuid__ui?page=4.1_MyProspects_child&ContactStatus=Qualified
That works perfectly.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.