web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Obtain power apps cust...
Power Apps
Unanswered

Obtain power apps custom form values from secondary data source for based on the selection of another field also coming from the secondary data source

(0) ShareShare
ReportReport
Posted on by 35

I have a power apps custom form that is getting the directorship values from a secondary data source where the name in the form = name in secondary data source.  Can I also get the values for 1 choice field and 4 person group fields from this secondary data source from the connection used to get the directorship?  If so, how would this be accomplished?  Thanks for any guidance.  This used to be very easy with InfoPath.  We are finding extraordinarily more difficult to accomplish the same functionality in Power apps custom forms.

Categories:
  • Gerard Simpson Profile Picture
    2,987 Moderator on at

    Hi, you could add a button in your form, which is visible after an initial name is entered into say textInput1.

     

    Then in the onselect of the button set a variable of the record with the info you want to grab from the second list as follows:

     

    Set(varSecondaryData, LookUp(SecondSource, name = textInput1.Text))

     

    Now that you have the full record from the lookup, you can just add any property from the variable into the other fields in the form i.e. varSecondaryData.ChoiceField.Value  and varSecondaryData.Person1.DisplayName etc etc

     

    You can also condition the defaults based on whether or not IsBlank(varSecondaryData)...i.e.  If(IsBlank(varSecondaryData), Parent.Default, varSecondaryData.ChoiceField.Value)

     

    Hope this helps

  • GardenGirl Profile Picture
    35 on at

    Thanks, this was helpful.  I created a button and added this to OnSelect: 

    Set(varSecondaryData, LookUp('Director Master List', Title=Director.Selected.Value))
     
    The only way I could obtain the values was adding this to 5 person/group fields and 1 choice field:
    {Value:varSecondaryData.'SOM Primary'.Email} - person group with the field being only thing different
    {Value:varSecondaryData.Entity.Value} - choice field
     
    The choice field value saves to the item and is visible in the form and view. However, while I am obtaining the person group values, they are gone after the item is saved. They do not display in the form or view. How can I get them to save?
  • GardenGirl Profile Picture
    35 on at

    The choice field value saves to the item and is visible in the form and view. However, while I am obtaining the person group values, they are gone after the item is saved. They do not save in the item and do not display in the form or view. How can I get them to save and be visible?

     

    I created a button and added this to OnSelect:
    Set(varSecondaryData, LookUp('Director Master List', Title=Director.Selected.Value))

    The only way I could obtain the values was adding this to 5 person/group fields and 1 choice field:
    {Value:varSecondaryData.'SOM Primary'.Email} - person group with the field being only thing different
    {Value:varSecondaryData.Entity.Value} - choice field

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 194 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 150

Last 30 days Overall leaderboard