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
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (3,342)