cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
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
Highlighted
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
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (3,586)