cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Rhys_Gottwald
Level: Powered On

List box selected user Display Name to variable

I have a choice box that allows for a users to be chosen, the display is the users Display Name.

 

I want to set a varialbe to the selected users display name and use it in a concatenate to generate another fileds value.  But the when the variable is created as a table.  Now how do I extract the users Display Name  from this variable?

 

Regards

2 ACCEPTED SOLUTIONS

Accepted Solutions
tchin-nin
Level 10

Re: List box selected user Display Name to variable

Hi @Rhys_Gottwald

 

Let's say you have a collection name Users with a column DisplayName :

DisplayName
UserDisplayName1
UserDisplayName2

 

to retrieve UserDisplayName1;UserDisplayName2; you can use the Concat function :

Concat(Users,DisplayName & ";")

Théo

Community Support Team
Community Support Team

Re: List box selected user Display Name to variable

Hi @Rhys_Gottwald,

Could you please share a bit more about the Choice box that you mentioned? Is it a List box control?

How do you create the variable within your app? Could you please share a bit more about the formula?

Do you want to select single one user or multiple users within the List box?

If you only want to select single one user within the List box control, I have made a test on my side, please take a try with the following workaround:3.JPG

 

4.JPG

Set the Items property of the List box control to following:

 

Office365Users.SearchUser()

Set the OnSelect property of the "Set Variable" button to following:

Set(CurrentSelectedUser,ListBox1.Selected.Value)

 

 

If you want to select multiple users within the List box control, please take a try with the following workaround:5.JPG

 

6.JPG

Set the OnSelect property of the "Set Variable" button to following:

Set(CurrentSelectedUser,ListBox1.SelectedItems)

The CurrentSelectedUser variable as below:7.JPGIf you want to extract DisplayNames from above table, please set the Text property of the Label control to following:

 

Concat(CurrentSelectedUser,DisplayName&" & ")

 

 

More details about the Concat function within PowerApps, please check the following article:

Concat function

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 REPLIES 4
tchin-nin
Level 10

Re: List box selected user Display Name to variable

Hi @Rhys_Gottwald

 

Let's say you have a collection name Users with a column DisplayName :

DisplayName
UserDisplayName1
UserDisplayName2

 

to retrieve UserDisplayName1;UserDisplayName2; you can use the Concat function :

Concat(Users,DisplayName & ";")

Théo

Community Support Team
Community Support Team

Re: List box selected user Display Name to variable

Hi @Rhys_Gottwald,

Could you please share a bit more about the Choice box that you mentioned? Is it a List box control?

How do you create the variable within your app? Could you please share a bit more about the formula?

Do you want to select single one user or multiple users within the List box?

If you only want to select single one user within the List box control, I have made a test on my side, please take a try with the following workaround:3.JPG

 

4.JPG

Set the Items property of the List box control to following:

 

Office365Users.SearchUser()

Set the OnSelect property of the "Set Variable" button to following:

Set(CurrentSelectedUser,ListBox1.Selected.Value)

 

 

If you want to select multiple users within the List box control, please take a try with the following workaround:5.JPG

 

6.JPG

Set the OnSelect property of the "Set Variable" button to following:

Set(CurrentSelectedUser,ListBox1.SelectedItems)

The CurrentSelectedUser variable as below:7.JPGIf you want to extract DisplayNames from above table, please set the Text property of the Label control to following:

 

Concat(CurrentSelectedUser,DisplayName&" & ")

 

 

More details about the Concat function within PowerApps, please check the following article:

Concat function

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Rhys_Gottwald
Level: Powered On

Re: List box selected user Display Name to variable

Thank you your solution worked,

Rhys_Gottwald
Level: Powered On

Re: List box selected user Display Name to variable

Thank you your solution worked,

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 4 members 5,077 guests
Recent signins:
Please welcome our newest community members: