Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Populating text input fields with values from dropdown list connected to lookup list in Sharepoint

(0) ShareShare
ReportReport
Posted on by 85

I'm customizing a SharePoint edit form with powerapps. When I open the record it displays the correct data in all the fields. I've added an additional dropdown field [SelectedDescription] that displays choices from another lookup list. I want to select an appropriate choice in that dropdown field and have it populate other text fields in the form already populated by its default value when opened.

 

My lookup list [Order Parts Lookup] has the following fields: Description, Part Number, and Master. The [SelectedDescription] dropdown pulls values from the Description column of OPL. I have all this working so far.

 

On a button push I want to replace the Description, Part Number, and Master text input field values on the form with that of the selection I have made in the dropdown field.

 

Form.Description = OPL.Description

Form.Part Number = OPL.Part Number

Form.Master = OPL.Master

 

I'm having trouble getting the input fields to populate with the lookup field data. On the [OnSelect] property of the button I have the following so far:

 

DataCardValue13.Text = SelectedDescription.Selected.Description

Categories:
  • Verified answer
    NandiniBhagya20 Profile Picture
    NandiniBhagya20 4,621 on at
    Re: Populating text input fields with values from dropdown list connected to lookup list in Sharepoint

    Hi @ShawnPelletier ,
    You can use below formula to add blank value to dropdown - 
    Ungroup(Table({dropdownOptions : Table({Value: Blank()})}, {dropdownOptions : Distinct(LookUpList,Title)}),"dropdownOptions")
    To set default value, you will have to use variables - 
    OnSelect property of button - UpdateContext({varPartNumber: LookUp(OPL, DescriptionDropdown.Selected.Value = Description, 'Part Number'), varMaster: LookUp(OPL, DescriptionDropdown.Selected.Value = Description, Master) })
    Then you can use these variables in Default property of controls.
    Assuming the variables will be used on a single screen.


  • ShawnPelletier Profile Picture
    ShawnPelletier 85 on at
    Re: Populating text input fields with values from dropdown list connected to lookup list in Sharepoint

    I need it to happen on a button push otherwise the default values of my text fields will change automatically and not on demand or as needed. Also the Dropdown field I added always displays the first choice from the lookup list and I don't know how to set it to blank instead.

  • NandiniBhagya20 Profile Picture
    NandiniBhagya20 4,621 on at
    Re: Populating text input fields with values from dropdown list connected to lookup list in Sharepoint

    Hi @ShawnPelletier ,
    WOuld you like to diplay Part Number and Master values based on selection of Description dropdown?
    Try using below formula on respective fields - 
    1. Default property of control (DataCardValue..) which needs to display Part Number - LookUp(OPL, DescriptionDropdown.Selected.Value = Description, 'Part Number')
    2. Default property of control (DataCardValue..) which needs to display Master - LookUp(OPL, DescriptionDropdown.Selected.Value = Description, Master)

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,445

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,741

Leaderboard