Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Adding blank value to dropdown using secondary datasource then setting additonal form fields to that datasource record

(0) ShareShare
ReportReport
Posted on by 85

I would normally set a dropdowns (drpdown1) item property in List1 to a secondary datasource (Ex. List2) and then select the field (description) I want to use for the choices in the dropdown. To set addional form fields based on a choice I would use the following formula in the default property of the form field: drpdown1.Selected.PartNumber. This works great, but I need to add a blank default value for drpdown1 so i used the following formula in the items property

    Ungroup(
       Table(
          {Options: Table({Description: Blank()})},
          {Options: List2.Description}
     ),
        "Options"
    )

 

When I use the above formula it obviously breaks the connection to the other fields using drpdown1.Selected.PartNumber for instance.

I've tried replacing drpdown1 with Options instead and that doesn't work either. I don't know what to use in the additional fields now to grab the lookup values in the default property. Any ideas on how to overcome? 

My main issue is getting those fields to show blank, If I don't the dropdown field uses the first choice in the list and fills the other fields accordingly, which confuses users when they open a record from a list view that clearly shows other values in those columns.

    

  • ShawnPelletier Profile Picture
    ShawnPelletier 85 on at
    Re: Adding blank value to dropdown using secondary datasource then setting additonal form fields to that datasource record

    I tried that and it didn't work. AllowEmptySelection is basically used for forcing user input when set to false according to Microsoft. Thanks though!

  • madlad Profile Picture
    madlad 2,637 on at
    Re: Adding blank value to dropdown using secondary datasource then setting additonal form fields to that datasource record

    If you go into the dropdowns advanced settings, you can set "AllowEmptySelection" to true, and set no default value, this should make it so its blank when the dropdown is created, if that's all you need to achieve?

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,434

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,722

Leaderboard