cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jan-Ph
Helper I
Helper I

Powerapps Choices covert Label to ID

Hey guys :),

 

Im trying to get the ID from a dataverse Choices list.

The Command  --> Concat(Choices('Business Software'); Value & ";" ) returning only the labels but i need the ID's.

 

Output:

Photoshop;

 

What i need:

879.200.000;

JanPh_0-1652104544178.png

 

 

Thank your for your help

Regards Jan

1 ACCEPTED SOLUTION

Accepted Solutions
gabibalaban
Dual Super User
Dual Super User

@Jan-Ph ,

There is a way to get want you need. I don't know if this is what you need, but here a small example how to get it.

Use a gallery with items property set as:

Choices('Business Software')

Inside Gallery use a label control with Text property set to:

ThisItem.Value

And set the onSelect Property of the gallery to:

UpdateContext({ChoiceID:JSON(ThisItem)})

 Outside the Gallery insert a label control with the text property set to:

ChoiceID

You screen should look like: 

gabibalaban_0-1652106241810.png

where the  ID you are looking for is inside ChoiceID variable 😊

 

Hope it helps !

View solution in original post

2 REPLIES 2
gabibalaban
Dual Super User
Dual Super User

@Jan-Ph ,

There is a way to get want you need. I don't know if this is what you need, but here a small example how to get it.

Use a gallery with items property set as:

Choices('Business Software')

Inside Gallery use a label control with Text property set to:

ThisItem.Value

And set the onSelect Property of the gallery to:

UpdateContext({ChoiceID:JSON(ThisItem)})

 Outside the Gallery insert a label control with the text property set to:

ChoiceID

You screen should look like: 

gabibalaban_0-1652106241810.png

where the  ID you are looking for is inside ChoiceID variable 😊

 

Hope it helps !

gabibalaban
Dual Super User
Dual Super User

@Jan-Ph ,

There is a way to get want you need. I don't know if this is what you need, but here a small example how to get it.

Use a gallery with items property set as:

Choices('Business Software')

Inside Gallery use a label control with Text property set to:

ThisItem.Value

And set the onSelect Property of the gallery to:

UpdateContext({ChoiceID:JSON(ThisItem)})

 Outside the Gallery insert a label control with the text property set to:

ChoiceID

You screen should look like: 

gabibalaban_0-1652106241810.png

where the  ID you are looking for is inside ChoiceID variable 😊

 

Hope it helps !

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (3,003)