how to auto populate values in popup box in skuid based on another model

  • 2
  • Question
  • Updated 4 years ago
  • Answered
HI all 
I have a requirment of which i need to autopopulate values in pop up box where ill create a new record. i want to populate values of another model can anyone plese help me out on this 
Photo of nanda kishore nidadavolu

Posted 4 years ago

  • 2
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
If the fields are present in a model that is on the page,  all you have to do is create conditions on the "new record" model that retrieve the value of those fields.   In a "new record" scenario - conditions act to prepopulate data,  while in a "load data from server" scenarion - conditions act to filter data.  

You might look at these two forum posts for more information on how to prepopulate data in new record scenarios:  
https://community.skuidify.com/skuid/topics/how_do_i_build_a_create_new_record_page

https://community.skuidify.com/skuid/topics/help-with-emulating-the-new-button-on-a-related-list-in-...
Thanx Rob 
ill tell you the scenario, i have to get the grand parent information, auto populate in the new record creation page, like im creating a new contact and i need to get the Plant information to be auto populate on that page, and Plant is the parent of Account , and im passing the AccountId in the URL Parameter.

As i am new to Skuidfy, Can you please help me out on this scenario

Thanx 

Nanda Kishore
(Edited)
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
In your new contact page, you will have a Account model - which is populated by a URL paramater that will come from the prior page.   The Account model can include parent data (information about the Plant).  When you are choosing fields for your model,  any parent reference field will have a link icon next to the selection checkbox.  It will take you to the fields of the parent object which you can select to include in your model.

Then on your NewContact model you will create conditions using the "field from another model" value category and do the same sort of traversal to get to the selected "grandparent" field.  In the field picker popup - the same icon is avialable to get you to parent data.

 
Thanks Rob,
that worked.