Use Query String in Page Include to set value for conditional rendering of button

edited December 23, 2017 in Questions
I'm trying to do this: 

https://community.skuidify.com/skuid/topics/can_i_do_conditional_rendering_based_on_a_query_string_p...

....but it seems like it should be doable now using standard Skuid functionality.  I just want to make sure I"m not missing something!

I have a page that I use over and over again as a Page Include.  This page has a button labeled "Save and Close".  I want to display this button only if my page is being displayed within a Page Include. 

In the query string for my Page Include I have: 
  • popup=true
In my page, I am using the following conditional render conditions on my button: 
  • Page/URL Parameter Value; popup = true
Will this work?  Or should I use the hack described in the post linked above?  

Comments

  • Rob HatchRob Hatch 💎💎💎
    edited September 1, 2016
    No need to use the hack.  The solution should work as you describe.   (If you are on a fairly recent version of Skuid, that is....)
  • edited February 15, 2017
    I can't get this to work.  (I'm on version 6.8.7.)  

    I have a decent workaround, though - the page I'm working with overrides a Salesforce object called MedRec__c.  So, if the page is displayed primarily, the parameter 'sfdc.override' contains 'MedRec__c'.  If the page is displayed in a popup with a page include, then the parameter 'sfdc.override' does NOT contain MedRec__c.  I can use this to control whether or not my "Save and Close" button is displayed. 

    It seems that the render conditions access the URL I see in my browser and not the query string in the page include.  
  • edited December 23, 2017
    I am also having the problem with conditional rendering on tabs in Included page based on the parameter provided through query string. And it seems that the render conditions access the URL I see in the browser and not the query string in the page include.  

    Any Idea?

  • Rob HatchRob Hatch 💎💎💎
    edited September 1, 2016
    Ok I take all that back.  Page includes cannot currently read query strings for processing things in the page like conditional rendering, using the global merge {{$Param.name}} syntax etc. They are effective for server side processing (like model conditions).  But once the page is "included"  it looks to the parameters that are set for the parent page, and not for any parameters you sent along in the page include query string.  This is a known issue,  but I'm not sure when we are going to be able to fix it. 

    Our reccomendation is to use model data to control your client side processing rather than using URL parameters.  Have a parameter effect a model condition and then show the data from the model,  or conditionally render based on the model. 

    Sorry about the inconvienence. 
  • Matt SonesMatt Sones 💎💎💎
    edited February 10, 2017
    Circling back on this. I'm not able to find a way to make this work. 

    On my page to be included I have a ui-only boolean field called "IsInclude" in a model. I have a param condition on that model which looks for the url parameter 'isinclude'

    When 'isinclude=true' is in the URL passed to the include, shouldn't my IsInclude field be set to true?

    No matter what I do, it's false.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!