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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PowerApps Dependent Dr...
Power Apps
Unanswered

PowerApps Dependent DropDown Not Displaying Default Value

(0) ShareShare
ReportReport
Posted on by 6

Hello,

 

I'm hoping someone can help figure this out.

 

GeneralInfo:

My app is connected to an azure sql server where it gets it's data from, and writes to.

In this app I have one dropdown, which works as intended and a secondary which is dependent on on the first. 
However, the dependent dropdown does not display the default value from the database.

 

Code:
First dropdown, Items: 

 

 

ForAll(Distinct(Commodities_1.Commodity, Commodity), {Result: ThisRecord.Value})

 

 

 

First dropdown, Default:

 

 

Parent.Default

 

 

 

 Second dropdown, Items: 

 

 

Sort( 
 ForAll(Distinct(
 Filter( Commodities_1, 
 Commodity = Desk_DataCardValue.Selected.Result), 
 Subcommodity), {Result: ThisRecord.Value}),
Result, SortOrder.Ascending)

 

 

 

Second dropdown, Default: is blank right now, but if I put in Parent.Default I get the below error:

VincentMonk_0-1685681080143.png

 

This is what the two dropdowns look like:

VincentMonk_1-1685681143429.png

 

UnexpectedResult:

If I do select a subcommodity and submit my form, it does in fact update the database. 
However, as I mentioned, the second dropdown does not display the value from the database, but rather reverts back to the 'Find subcommodities' hint - or in other words, it stays blank. 

 

AdditionalRelevantInfo:

The table the dropdowns are updating is called Suppliers and is different from the table that the values are coming from, which is Commodities_1. Both tables have a column called Subcommodity. 

I also tried adding the following under Default: Defaults(MasterSuppliers_1.Subcommodity) which also did not work.

 

 

Thanks in advance!

Categories:
I have the same question (0)
  • NZ0090 Profile Picture
    317 on at

    @VincentMonk Hi! What's the default value you want for the subcommodity? Is it a static value or dynamic value? If it's a static value, you can just add string. Or you can do something like this if the default value also depends on the first dropdown: 

     

    If(
     FirstDropdown.SelectedText.Value="Electrical & Eletronics", "Subcommodity A",
     FirstDropdown.SelectedText.Value="Commodity B", "Subcommodity B",
     FirstDropdown.SelectedText.Value="Commodity C", "Subcommodity C", 
    )

     

     

  • VincentMonk Profile Picture
    6 on at

    Hi @NZ0090 ,

     

    The default value should be dynamic and based off of the value in the 'Suppliers' sql table. 
    The Items available for selection in the drop down come from the 'Commodity' sql table.

    Here's a sample of that table. 

    SubcommodityCommodity
    ConnectorsElectrical & Electronics
    SwitchesElectrical & Electronics
    ElectronicsElectrical & Electronics
    Electronics ComponentsElectrical & Electronics
    Wire and CableElectrical & Electronics
    Circuit BreakerElectrical & Electronics
  • NZ0090 Profile Picture
    317 on at

    @VincentMonk Do you have a dropdown for Suppliers in the form as well? If yes, is the flow:

    1. Select supplier > 2. Select commodity > 3. Select subcommodity?

  • VincentMonk Profile Picture
    6 on at

    @NZ0090 Not so much a dropdown as it is a list.

    So it's List: Select supplier > EditForm: Containing Commodity Dropdown, which then changes values on Subcommodity dropdown.

  • NZ0090 Profile Picture
    317 on at

    @VincentMonk You mentioned that the default value for subcommodity depends on the Suppliers table. Can you give me the sample data for Suppliers table? 

  • VincentMonk Profile Picture
    6 on at

    Hi @NZ0090 and sorry for the late reply. Things at work and at home got a bit hectic.
    But yes, Commodity drop down options comes form a commodity table. 
    Subcommodity drop down options comes from the same table and is dependent on the commodity selected.
    Both of these drop downs update the Suppliers table. (Think star schema)

    The suppliers table looks like this:

    COLUMN_NAMEDATA_TYPE
    Unique_IDvarchar
    SupplierNumbernvarchar
    SupplierNamenvarchar
    Commoditynvarchar
    Subcommoditynvarchar
    Supplier Categorynvarchar
    SourceSystemnvarchar
    MasterSupplierNumbernvarchar
    Primary Contactnvarchar
    GCMnvarchar
    Modified Bynvarchar
    Item Typenvarchar
    Pathnvarchar
    DateUpdateddate
    Supplier_Statusvarchar

     

    And of course the goal is for the subcommodity dropdown to display the default value in the suppliers table. 
    I have a feeling that it has to do with the fact that the subcomm dropdown pulls data from the Commodity table, but we're asking it to display the value of the Suppliers table, all while being dependant on the Commodity drop down.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard