hi, if i choose existing object, i need to autopopulate the associated object fields

  • 1
  • Problem
  • Updated 3 years ago
i have employer object associating to contact. in my skuid edit page, if i choose an existing contact, i need to auto populate the employer details which is already created whenever i am saving the new contact. can any one help me out from this problem. thanks in advance...
Photo of raj

raj

  • 840 Points 500 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
I think I understand what you are trying to accomplish. You could try having a model for contact and a model for employer. Put a condition on the employer model that sets the related contact's id field equal to a field on another model. Choose the contact model as the other model and the contact model's id field as the field.
Add a field editor to the page connected to the contact model. Add the field contact reference field so that you can select the contact you want. Add a second field editor connected to the employer model add the fields that you want.
Set a model action on the contact model to requery the employer model when a row is updated.
Photo of raj

raj

  • 840 Points 500 badge 2x thumb
when i make "Set a model action on the contact model to requery the employer model when a row is updated"", Employer model fields are not appear in Edit page.
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
Sounds like you either have a setting wrong on the employer model or you have a condition wrong on the employer model. As a test you can deactivate all conditions on the employer model. Then it should return records. If it doesn't, then there is probably some the wrong with your model settings.
(Edited)
Photo of raj

raj

  • 840 Points 500 badge 2x thumb
when i make "Set a model action on the contact model to requery the employer model when a row is updated"", Employer model fields are not appear in Edit page.
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,260 Points 5k badge 2x thumb
Hi Raj~

Just wondering if my answer to your other post (https://community.skuidify.com/skuid/topics/pre-populating-the-same-contct-fields-when-i-selecting-the-contact-object-through-lookup) helps to answer this question as well. 

Thanks!
Karen