Skip to main content

In certain model configurations, model fields on page includes configured to use query string parameters are not being properly established.


Note - Given this issue and the fact that there is no reliable way currently to retrieve querystring parameter values on a page include other than using a model, you MUST use a salesforce model to get querystring parameter values. However, in many cases, a UI Only model is all that is required because all that is needed is a way to “capture” the querystring values for use later on in the included page lifetime.


Steps to reproduce:


  1. Create Main page using XML below

  2. Create Include page using XML below

  3. Preview page

  4. Optional - Change the text in the “Include Param Value” field

  5. Click “Open Popup”

Expected Behavior

All 4 fields should have the value specified on the textbox from the containing page


Actual Behavior


  1. The UI Only field on a UI Only model configured with a Default Item has a blank value

  2. The UI Only field on a salesforce model configured with a default item has a blank value

Sample Page XML - Main Page


<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" useviewportmeta="true" showheader="true">    <models>
<model id="IncludeDriver" query="true" createrowifnonefound="true" datasource="Ui-Only" processonclient="true" unloadwarningifunsavedchanges="false">
<fields>
<field id="IncludeParamValue" displaytype="TEXT" label="Include Param Value" defaultvaluetype="fieldvalue" defaultValue="defaultValue"/>
</fields>
<conditions/>
<actions/>
</model>
</models>
<components>
<grid uniqueid="sk-2shrGY-185">
<divisions>
<division behavior="flex" minwidth="100px" ratio="1" verticalalign="top">
<components>
<basicfieldeditor showheader="true" showsavecancel="false" showerrorsinline="true" model="IncludeDriver" buttonposition="" uniqueid="sk-2shqYg-174" mode="edit">
<columns>
<column width="100%">
<sections>
<section title="Section A" collapsible="no" showheader="false">
<fields>
<field id="IncludeParamValue" valuehalign="" type=""/>
</fields>
</section>
</sections>
</column>
</columns>
</basicfieldeditor>
</components>
</division>
<division behavior="flex" verticalalign="top" minwidth="100px" ratio="1">
<components>
<buttonset uniqueid="sk-2sh8R7-85" model="IncludeDriver" position="left">
<buttons>
<button type="multi" label="Open Popup">
<actions>
<action type="showPopup">
<popup title="New Popup" width="90%">
<components>
<includepanel type="skuid" uniqueid="sk-2shQpz-136" pagename="PageIncludeQSParamsNotCorrectInclude" module="" querystring="myparam={{$Model&#46;IncludeDriver&#46;data&#46;0&#46;IncludeParamValue}}"/>
</components>
</popup>
</action>
</actions>
</button>
</buttons>
</buttonset>
</components>
</division>
</divisions>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</grid>
</components>
<resources>
<labels/>
<javascript/>
<css/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>

Sample Page XML - Include Page


<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" useviewportmeta="true" showheader="true">    <models>
<model id="QSTrackerUIOnlyModel" query="true" createrowifnonefound="true" datasource="Ui-Only" processonclient="true" unloadwarningifunsavedchanges="false">
<fields>
<field id="UIOnlySetUsingDefaultItem" displaytype="TEXT" defaultvaluetype="param" defaultValue="myparam" enclosevalueinquotes="true" label="UI Only Set Using Default Item"/>
</fields>
<conditions/>
<actions/>
</model>
<model id="QSTrackerAccountModel" limit="1" query="false" createrowifnonefound="true" datasource="salesforce" type="" sobject="Account" doclone="" unloadwarningifunsavedchanges="false" processonclient="true">
<fields>
<field id="UIOnlySetUsingDefaultItem" uionly="true" displaytype="TEXT" defaultvaluetype="param" defaultValue="myparam" enclosevalueinquotes="true" label="UI Only Set Using Default Item"/>
<field id="UIOnlySetUsingCondition" uionly="true" displaytype="TEXT" label="UI Only Set Using Condition" defaultvaluetype="fieldvalue"/>
<field id="Name"/>
</fields>
<conditions>
<condition type="param" value="myparam" field="UIOnlySetUsingCondition" operator="=" enclosevalueinquotes="true" novaluebehavior=""/>
<condition type="param" value="myparam" field="Name" operator="=" enclosevalueinquotes="true" novaluebehavior=""/>
</conditions>
<actions/>
</model>
</models>
<components>
<basicfieldeditor showheader="true" showsavecancel="false" showerrorsinline="true" model="QSTrackerUIOnlyModel" buttonposition="" uniqueid="sk-2sjXB1-339" mode="read">
<columns>
<column width="100%">
<sections>
<section title="QSTrackerUIOnlyModel" collapsible="no">
<fields>
<field id="UIOnlySetUsingDefaultItem" valuehalign="" type=""/>
</fields>
</section>
</sections>
</column>
</columns>
<renderconditions logictype="and"/>
</basicfieldeditor>
<basicfieldeditor showheader="true" showsavecancel="false" showerrorsinline="true" model="QSTrackerAccountModel" buttonposition="" uniqueid="sk-2si_b5-221" mode="read">
<columns>
<column width="100%">
<sections>
<section title="QSTrackerAccountModel" collapsible="no">
<fields>
<field id="UIOnlySetUsingDefaultItem" valuehalign="" type=""/>
<field id="UIOnlySetUsingCondition" valuehalign="" type=""/>
<field id="Name" valuehalign="" type="">
<label>Account Name Set Using Condition</label>
</field>
</fields>
</section>
</sections>
</column>
</columns>
</basicfieldeditor>
</components>
<resources>
<labels/>
<javascript/>
<css/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>

Hi Barry, I’ve set up these two pages as you’ve described. If my preview URL doesn’t have the URL parameter, the UI-only UIOnlySetUsingDefaultItem field does indeed show blank. However, if I preview my main page and add &myparam=anything to the URL, the empty UIOnlySetUsingDefaultItem field takes on the param value as they should. I may be misunderstanding your example, but here is the screenshot of the page, if previewed with the URL param included. The end of my URL is /apex/** skuid__ui?page=PageIncludeQueryTest-ParentPage&myparam=twelve **.



Edit: I am testing this in “Brooklyn Update 1 - Iteration 4”, number: “9.5.4”


Hi Mark -

Thanks for looking in to this.  Sorry for any confusion in my OP.

In the scenario I outlined, there is no need nor should you be manually adding a QS param to the preview URL.  The querystring for the page include is generated dynamically on the popup based on the model value in the model “Include Driver”.  When the page include displays, the value for all 4 fields should be the value from the QS param passed to the page include, however 2 of the fields aren’t set properly based on the QS param passed to the include (2 of them are however).

In short, when the page include loads, all 4 fields should have the value that was passed to the page include.  The param and value passed to the page include are dynamically generated - no manual manipulation of the URL is necessary.

That all said, given your application of the QS param manually, you can see in your screenshot that 2 of the fields have “twelve” while 2 of the fields have “thirteen.”  This is another sign that something is wrong because all 4 fields should have the same value.

Let me know if that helps clear up the confusion.  Thanks again!


Ah, thank you for the clarification. I see the behavior you’re describing now, and will pass this along to our dev team. We’ll update this post when the issue has been addressed. 


Thanks Mark!


Reply