Activate & set value model condition with url parameter


Have not used this in years, but we use to be able to activate a model condition via url parameter & set it’s value.

Has this been removed?

I’m trying to apply this logic and it’s not filtering

I have a model named note, i created a filterable condition and made it default off

Now if i try to use this with a sf record with added parameter sb=Sales%20Notes, it does not activate condition, even tried as a page include, same results

If i turn on condition by default then yes, it filters.
It looks liek it can set the value but not activate the condition

Anything i’m doing wrong?

Hi @Dave,
I think what you’ll want to do is set the condition to be active by default, then set the If this Parameter is not provided, then... setting to Deactivate this condition. That way the condition will only be applied if a parameter has been passed to the page.

Thank you, I knew i was missing something!

I was not seeing that option when had it as default on/off, so did not think of it!

Thank you for quick response.

If i wanted to pass multiple values, i can use contain and separate values in parameter by commas? so example &name=David,Elena ?

Thank you

Great! Glad that worked for you.

To pass multiple values in the parameter, you’ll want to use a semicolon between values in the URL and, in order to force the condition to evaluate the parameter as multiple values, you’ll need to update the page XML for the condition to use the in operator instead of = .

For example:

<condition type="param" value="names" field="Name" operator="in" inactive="false" enclosevalueinquotes="true" novaluebehavior="deactivate"/>

Hi Elena,
We just go to the part where we try to use multiple values, but everytime i change from = to ‘in’ in the xml, the condition does not work

here’s what I used which is the same as what you showed, so kind of lost?

<condition type="param" value="subd" field="Subject_Detail__c" operator="in" enclosevalueinquotes="true" novaluebehavior="deactivate" state="filterableon" inactive="false" name="Subject_Detail__c"/>

I tried always on, filterable default on… all the same

I tried sending 1 value or multiple in parameter and all the same

With same condition if i use = it works with 1 value only.

Let me know please

Anyone has any idea pls? I’m stuck on this issue since 2 days and cannot move forward without it.
I tried everything i can on our side, but same results.

Hi Dave,
Sorry for the delayed response. I’m afraid the solution I suggested wasn’t quite complete - the condition isn’t interpreting the parameter as multiple values for some reason.

To get it to work I made the following adjustments:

  • Update the condition value setting to multiple specified values, and set it to filterable default off
  • Then create an Event triggered action sequence (triggered on the Skuid Page: Rendered event) that activates your condition and sets the value to the parameter string (using {{$Param.paramName}} merge syntax) and then re-query the model.
  • You also probably want to include a branch in that action sequence to only activate the condition if a parameter was passed into the page.

Here’s the XML for a test page where I got this working if you want to see it in action.

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true">
		<model id="acct" limit="20" query="true" createrowifnonefound="false" processonclient="true" datasource="salesforce" sobject="Account">
				<field id="Name"/>
				<field id="Id"/>
				<condition type="multiple" value="" field="Name" operator="in" enclosevalueinquotes="true" state="filterableoff" inactive="true" name="Name">
		<skootable showconditions="true" showsavecancel="true" showerrorsinline="true" searchmethod="server" searchbox="true" showexportbuttons="false" hideheader="false" hidefooter="false" pagesize="10" alwaysresetpagination="false" createrecords="true" model="acct" buttonposition="" mode="read" allowcolumnreordering="true" responsive="true" uniqueid="sk-2P8p-456">
				<field id="Name" uniqueid="fi-2P8p-457"/>
				<field id="Id" uniqueid="fi-2P8p-458"/>
				<action type="edit"/>
				<action type="delete"/>
			<massactions usefirstitemasdefault="true">
				<action type="massupdate"/>
				<action type="massdelete"/>
				<view type="standard"/>
		<actionsequences uniqueid="sk-2P8e-369">
			<actionsequence id="ddca6bc1-9f3a-4d69-aa51-4db41be9f582" label="Activate and Set Param Condition" type="event-triggered" event-scope="component" event-name="page.rendered">
					<action type="branch" whenfinished="stop" label="Param has values">
							<action type="setCondition" model="acct" value="{{$Param.names}}" condition="Name"/>
							<action type="requeryModel" model="acct" behavior="standard"/>
		<styleitem type="background" bgtype="none"/>