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:

This is what the two dropdowns look like:

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!