I want to randomly select related contacts of a accounts from pop up window how can i achive it?

  • 1
  • Question
  • Updated 1 year ago
  • Answered
I like open a pop the pop will render all related contacts of a accounts and from that i want randomly select 2-3 contacts and save it
Photo of Matrix

Matrix

  • 590 Points 500 badge 2x thumb

Posted 1 year ago

  • 1
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Hmmm... I think we'll need a little more clarity on what you're asking.
Photo of Matrix

Matrix

  • 590 Points 500 badge 2x thumb
hi i like to view all related contacts of a acoounts as list view on skuid page and i like to  select randomly 2-3 contacts then there is a button on that skuid page when i click on that button  a pop window will open and it will render all that selected contacts info
(Edited)
Photo of Matrix

Matrix

  • 590 Points 500 badge 2x thumb
mB please give a reply 
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Basically, you'd like to select a few records and display those in another model/component?
Photo of Matrix

Matrix

  • 590 Points 500 badge 2x thumb
yeah
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Then create a mass action button that adopts the records into a new model, "SelectedContacts", and display those in your popup.
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Pat's right.

Alternatively, if you don't want all of the fields in your Contacts list view model, you could have your mass action set the value of an "Id" condition on the Selected Contacts model and then query it for "more" rows instead of a standard query. The SelectedContacts would load more slowly, but the Contacts list would load slightly faster.

[Pat, et al. --- am I understanding that correctly?]
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
If only my ex wife said I was right...
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Ouch.