I have a dropdown in powerapps and need to set the default value
My Items property of my dropdown I have it linked to my data source which is an Azure table.
'[dbo].[ColorTable]'
One could see the contents simplified as the following
Table({ColorName:"red"; ID: "1"};{ColorName:"green"; ID: "2"}{ColorName:"blue"; ID: "3"})
although I have many more entries.
In my details edit screen I have the ID value in my main datasource. However I need to set the dropdown's default with this value, however the dropdown use the ColorName as it's value.
How do I set the dropdowns default ID value since its Value is ColorName and not ID?
I have a workaround that works but in conjunction with saving the selected value back again it can conflict with the saving.
In the Default property of the dropdown I add the following code
LookUp('[dbo].[ColorTable]';ID=ThisItem.fk_ColorID;ColorName)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With