Passing URL Query String to Page Includes Broken (8.15.7)

  • 1
  • Problem
  • Updated 2 years ago
  • Solved
  • (Edited)
I've seen a number of other posts with a similar issue (e.g. https://community.skuid.com/skuid/topics/passing-url-parameters-to-a-page-include). They are however much older, and I believe this error to be introduced in the latest version as I'm only experiencing this now.

To Elaborate:

Providing a query string to a page include like this:


or this

or this


All yield the same result, that value NOT being available as {{$Param.example}} in the page include.

What's more interesting is that if I manually add `&example=test` to the parent page (the page that includes the page include)'s URL, the page include now registers the value in the $Param merge.

It is as though the Merge syntax on the include no longer references the included page's url. Has something to cause this been introduced in 8.15.17?

What's interesting is the distinction in the url that is 'GET' requested.

https://skuid.na11.visual.force.com/apex/skuid__ui?page=Page -> Standard Page
https://skuid.na11.visual.force.com/apex/include?example=test -> Included Page
Photo of Henry Goddard

Henry Goddard

  • 776 Points 500 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,490 Points 10k badge 2x thumb
I'm pretty sure this is how page includes have always behaved. I agree that this is not the best behavior, but I don't think this is a regression. The {{$Param}} global merge syntax reads from the parent page's parameters, not the parameters of the page include even if it is inside a page include. I know I've seen workarounds using UI-Only fields to store this information and that be accessed through global merge syntax. If anyone has examples of this working differently in previous versions, I'd love to hear about it.
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
As far as I remember, this is the way it's always worked.
Photo of David Giger

David Giger

  • 1,758 Points 1k badge 2x thumb
Agreed, Ben and Matt. I never experience the behaviour any different.
Photo of Henry Goddard

Henry Goddard

  • 776 Points 500 badge 2x thumb
We use a number of Page Includes in pop ups, and prefer to have one common page for all pop ups of a given type. Querying models with URL parameters was half of the battle, we also needed access to that value elsewhere. I figured out a workaround for the time being.


1) Create a new model on the parent page, and add a UI only text field (called 'value'). We happened to have a 'Setup' model already defined on our master page, so I used it.

2) Create a new model + UI Only text field (also called 'value') on the child page include. 

3) Create a new Inline javascript snippet on the child page. It is important that it's inline as it needs to happen on page load. Enter the following code:


The model names and variable names can be anything, so long as they're appropriately updated in the snippet. Also, I assume the interested data is in the first row of each model.

(function(skuid){	var $ = skuid.$;
$(document.body).one('pageload',function(){
   //get the two models
var ParentModel = skuid.model.getModel('ParentModel');
var ChildModel = skuid.model.getModel('ChildModel');
//get the first row of each model
var ParentModel_Row = ParentModel.getFirstRow();
var ChildModel_Row = ChildModel.getFirstRow();

        //Set the inherted value
ChildModel.updateRow(ChildModel_Row, {value : Setup.getFieldValue(ParentModel_Row, 'value')});
});
})(skuid);

The model names and variable names can be anything, so long as they're appropriately updated in the snippet. Also, I assume the interested data is in the first row of each model.
(Edited)