Unable to pass Query String to page include

  • 2
  • Question
  • Updated 12 months ago
  • Answered
I'm running into a problem similar to the one identified in this post:

https://community.skuid.com/skuid/topics/page-include-inside-a-page-include-query-string-issue

However, after reading the post, the solution wasn't mentioned, just that the problem was solved.

Here is my issue:

I'm trying to load a Child Page for a Case from a Parent Page for a Case using the PageInclude component.  However, it seems that it cannot pass the Id of the Parent Page's object to the Child Page using any of the following Query Strings:

id={{$Model.CaseParent.Id}}  <---doesn't work

id={{$Param.Id}} < --- doesn't work

id=5001400000xSWNn  <--- works if I key in the exact Id i'm trying to load in the Page Include.


I thought I understood how PageIncludes work, but this is really throwing me for a loop.  

Photo of Gary Bailey

Gary Bailey

  • 1,628 Points 1k badge 2x thumb

Posted 3 years ago

  • 2
Photo of Gary Bailey

Gary Bailey

  • 1,628 Points 1k badge 2x thumb
Actually, in the course of typing out and documenting my issue, I was able to resolve the problem.  I wanted to post it anyway for anyone else who may run into this problem (and for when I forget the solution!)

The issue was with the syntax of my Query String.  

INCORRECT SYNTAX:  id={{$Model.CaseParent.Id}}

CORRECT SYNTAX:  id={{$Model.CaseParent.data.0.Id}}

Photo of Gary Bailey

Gary Bailey

  • 1,628 Points 1k badge 2x thumb
I SPOKE TOO SOON!  It works fine when I use the "Page Preview" button from the Page Builder.  However, when I click on a Case Record it no longer works!
Photo of Gary Bailey

Gary Bailey

  • 1,628 Points 1k badge 2x thumb
Quick update (sorry for all the thread replies).   I created problem when the Parameter Name for the Parent Page was changed from "id" to "ParentId".  When I did that, it couldn't read the id that was being fed in the Page.  

So, despite the warnings in other threads, my Parameter Names for both my Parent and Child pages are the same and everything is working just fine.
Photo of Michael L Barnes

Michael L Barnes

  • 176 Points 100 badge 2x thumb
Thank you for going through the trouble.  This was a huge help.  Tutorial left a huge gap, namely on syntax for the Query String which is not obvious.  Following your example, I was able to fix my page.  Thanks!!