Skip to main content
Nintex Community Menu Bar
Question

Can I do conditional rendering based on a query string ($Param) value?

  • July 9, 2024
  • 4 replies
  • 4 views
  • Translate

Forum|alt.badge.img+7

Is it possible to do conditional rendering using something other than a model - in particular using a query string via $Param? What I’m really trying to do is to pass a value into a shared Page Include to slightly alter it’s behavior (it’s a commonly used and somewhat complex page used in a popup window via page include, and having slight variations based on the query string would allow me to disable or change some simple functionality of the page based on which buttons opens it). So another answer may be to find a snippet that looks at the query string and adjusts the page content … which in this case is to hide some fields. As discussed on another forum topic (https://community.skuid.com/t/conditional-rendering-based-on-a-secondary-model) the complexity is then in stopping the field validators from requiring field values when the fields are hidden. If I can use a query string in conditional rendering, the problem goes away. But if not, I still need a way to do conditional rendering or eliminate field validation from within a snippet. Thanks … and in case you didn’t know, we became an official customer today! - Chris

Did this topic help you find an answer to your question?
This topic has been closed for comments

4 replies

Forum|alt.badge.img+13

Hi Chris, What parts of the content of your Page Include do you want to conditionally render based on the value in the URL Parameter? Sounds like Fields in a Field Editor, but I just wanted to check. Also, what sort of different values are you passing in? I think that your idea about basing the rendering on something other than Model data definitely makes sense, we’ve been thinking about this for a future release. However, in the meantime, you could achieve this through a “hack” approach that is fully supported and should work fine: base your Conditional Rendering on a “dummy” Model with a dummy row with one field that gets fed the value of the $Param. So in your included Page(s), add a Model on some object that all users will always have access to, and then pull in one text field on that object that your users should have edit permissions on. Check the “Create a Default Row” property for that Model (in the Model’s “Advanced” properties), and uncheck the “Load model data…” property. Then add one Condition to the Model, on the dummy text field you pulled in, and have its Value be set to pull from the URL Parameter you send in. Then you should be able to use this Model to do Conditional Rendering.

Translate

Forum|alt.badge.img+17
  • Nintex Employee
  • 3763 replies
  • July 9, 2024

Chris… Welcome aboard.  We are really glad to have you as a customer.  We’d love for you to give us some feedback on our app exchange listing.  What do you love?  What could we do better?   We want to hear the voices of our customer.  Here is the URL for that listing.

Zach… That “hack” approach is so devious it is probably illegal in 30 states.  Well done…  

Translate

Forum|alt.badge.img+7
  • Author
  • 50 replies
  • July 9, 2024

That is quite a hack … but it does work!  Thanks!

Translate

Forum|alt.badge.img+9
  • 135 replies
  • July 9, 2024

Can someone post more details or screenshots on the model & page element rendering options I have to use to make this work? I’m passing a URL param into my page that populates a model filter, and I want to show text at the top of the page that says what the page is filtering on. I also want to NOT render that text when there is nothing passed into the page (i.e., there is no active filter). I can’t seem to make this work, though. I’m probably just setting one of the many options incorrectly, but I can’t figure out which.

Translate

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings