Page preview asks for a parameter but doesn't let me enter anything

  • 1
  • Problem
  • Updated 2 years ago
  • Solved
I have a page model with conditions on the Id field and the Name field of the underlying custom sObject. The values for each condition are supplied by URL parameters.

When I use page preview, I am prompted for both parameters. The Id parameter allows/requires me to enter a Name value which skuid autocompletes with the associated Record Id value. 

However, the Name parameter does not allow entry or selection of anything. There is only a prompt where the label is the parameter name but there is no input field.

What's up with this? :)
Photo of Mike Dwyer

Mike Dwyer

  • 3,390 Points 3k badge 2x thumb

Posted 2 years ago

  • 1
Photo of Peter Kong

Peter Kong, Employee

  • 440 Points 250 badge 2x thumb
Hi Mike! :)

By any chance is the Name field a Formula field of sorts, similar to the Contact sObject's Name field which adds First Name + Last Name? 

If so, then while launching a Page Preview from the Composer the Name parameter will indeed choke up, but on the actual Page Preview itself, having the query string in the URL will still work as anticipated!

Let me know if your situation is otherwise!

Thanks,
Peter
Photo of Mike Dwyer

Mike Dwyer

  • 3,390 Points 3k badge 2x thumb
Name IS the sObject's standard Name field. In this case it is an Auto-number datatype.
Photo of Peter Kong

Peter Kong, Employee

  • 440 Points 250 badge 2x thumb
Hi Mike, is this still an issue? I apologize for the delayed response. 

We might need to work around the fact that it's an Auto-number datatype. If I may ask, what use-case are we shooting for by having both the Record Id and the Name value in the query's parameter? 
Photo of Mike Dwyer

Mike Dwyer

  • 3,390 Points 3k badge 2x thumb
This is not a show-stopper, we have workarounds -- and the use-case is no longer required. If an auto-number datatype exhibits this behavior, that may be all we need to know.

The underlying issue, however, is that parameters passed in a call to a Page Include are not available on the client side. I added a Condition to a model, "where Name = {{$Param.someoption}}" This would allow rendering rules based on "model has data rows" or "model doesn't have data rows" instead of the Page/URL Parameter value.

I used Name for the new Condition because 1) it would never equal the parameter value passed to the Page Include, and 2) there was an existing Condition on Id (ironically using a URL parameter defined for the parent page).
Photo of Peter Kong

Peter Kong, Employee

  • 440 Points 250 badge 2x thumb
Phew, good to hear it's not a show stopper!

Just for the sake of my own edification...

I understand that you want to translate the param info into a Model and have rendering be based off from said Model, however I don't quite get why you would want the "Name for the new condition because it would never equal the parameter value passed to the Page Include" - did you want this particular condition to be false? 


 
Photo of Mike Dwyer

Mike Dwyer

  • 3,390 Points 3k badge 2x thumb
Exactly right! If the parameter is present, the condition fails, the model contains no data, and a certain button on the page does not get rendered.

(This model was already using the Id field as an indicator in a very similar way. No data from the model is actually used on the page.)
Photo of Peter Kong

Peter Kong, Employee

  • 440 Points 250 badge 2x thumb
Sweet, thanks Mike :)