cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kudo Kingpin
Kudo Kingpin

Please help

Hi,

 

I have a dropdown menu showing Product names from a table and I'd like to have the product ID as the 'update' property of the field. I remember seeing an article on how to achieve this but I can't seem to find it because I don't know what it's called.

Appreciated if someone could help me with this. Thanks

 

Cheers,

Anton

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Please help

Hi @afernando

You can use GroupBy to get distinct values and keep more than one column

View solution in original post

8 REPLIES 8
Highlighted
Community Champion
Community Champion

Re: Please help

hi @afernando

you can refer to the selected ID by this:

Dropdown1.Selected.ID

then you can use it in any Patch to write the data back.

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Please help

Hi mate,

 

Thanks for your comment. The problem is the only option availble is Dropdown1.Selected.ProductName.

 

Cheers,

Anton

Highlighted
Community Champion
Community Champion

Re: Please help

Then you need to change the Items property of the Dropdown to include the ID column.

What is the current Items property?

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Please help

@Meneghino,

 

Current items property is set to [dbo].[Table].Product_ID. But I cannot see the product name column in the update property but only the ID.

Hope this makes sense.

 

Cheers,

Anton

Highlighted
Community Champion
Community Champion

Re: Please help

hi @afernando

Yes, this makes perfect sense.

Please set the the property to [dbo].[Table]

When you add the .Product_ID after it, then it only selects that column.

So to be clear: [dbo].[Table] is the table with all the columns, whereas [dbo].[Table].Product_ID is only the Product_ID column of Table.

Please try this and let me know.

PS You may need to use the advanced properties of the Dropdown to display the column you want.

PPS Are you using forms? If so then I will repeat what I repeat to everyone: use forms if you do not need to customise them.  If you need to customise forms then you are better off using individual controls and creating your own forms.

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Please help

Hi @Meneghino,

 

Thanks for your comment. I figured out what was going on. When you set the items property to a query, you can only select the result column whereas when set items to the whole table, you're allowed to use any column.

But the problem with my situation is that I need to show distinct values from a column and I'm not able to do without a query. 

Thanks for all your comments. They were very helpful. 👍

 

Cheers,

Anton

Highlighted
Community Champion
Community Champion

Re: Please help

Hi @afernando

You can use GroupBy to get distinct values and keep more than one column

View solution in original post

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Please help

@Meneghino LEGEND

Helpful resources

Announcements
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

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
Top Kudoed Authors
Users online (5,784)