cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bsparks0269
New Member

Setting Dropdown card value allowed values from SQL table

I currently have a Form that has a drop-down list that is pulled from a SQL list.   I have the form saving the correct value by setting the Update to select the ID and not the name.  My issue is that it will not show the correct set selection from the database.  The edit form needs the drop-down set by the id of the ref table by the type_id handed to it and display the Name tied to that id.  I really just need a way to set the default id and not the value. 

 

image.png

 

I have tried setting the default to the following with no obvious change.

image.png 

 

Posts I have looked at and not found a solution.  

https://powerusers.microsoft.com/t5/Creating-Apps/Powerapps-iInding-to-dropdown-control-with-two-col...

https://powerusers.microsoft.com/t5/General-Discussion/Populate-dropdown-with-values-as-well-as-disp...

1 ACCEPTED SOLUTION

Accepted Solutions
bsparks0269
New Member

Re: Setting Dropdown card value allowed values from SQL table

Solved my own issue.  The default value has to match the values listed in the drop-down.  The whole time I was trying to match the ID value, which is not set at the drop-down value.

 

The formula for the drop-down is listed below.  Just need to build a lookup and then find where it is set to the ID and have it produce the named value.

 

LookUp('[dbo].[gates_contacts_types]',id = Parent.Default).name

 

View solution in original post

1 REPLY 1
bsparks0269
New Member

Re: Setting Dropdown card value allowed values from SQL table

Solved my own issue.  The default value has to match the values listed in the drop-down.  The whole time I was trying to match the ID value, which is not set at the drop-down value.

 

The formula for the drop-down is listed below.  Just need to build a lookup and then find where it is set to the ID and have it produce the named value.

 

LookUp('[dbo].[gates_contacts_types]',id = Parent.Default).name

 

View solution in original post

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (5,027)