web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to merge usernames...
Power Apps
Answered

How to merge usernames to list items with a button?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all,

 

Hopefully one of you can help me with this case.

 

I'm trying to build an app for internal event registration.

To do this, I've build a SharePoint list with the following columns:

Activity (single text column)

Description of the activity (Multiple text lines columns)

Date activity: (Date & Time column)

Attendees: (Multiple text lines columns)

 

In my PowerApp create a Galery so the users can browse in to the events, when they select one of the events the event details are displayed in a form next to the galery form. I've added a button in the event details list, named Join session.

 

This button is as followed configured:

 

 

 

Patch('X-Team activiteiten'.Activiteit;Deelnemers {User().FullName})

 

 

 

 

What I want is that when a user (every user in my organisation) pushed the button, the users full name is displayed in the specific list on the Attendees column of the selected event.

 

I've no success so far to achieve this and I need some help with this. Does anyone know how I need to do the patch function in this?

Patch.png

 

 

Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

    @Anonymous 

    Can you please show a sample of your SharePoint list?  This would help me to better understand how the PATCH must be constructed.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @mdevaney ,

     

    Of course:

    list.png

     

    If it's better to use another view/ columns or Idea to achieve my goal, I'm always open for that feedback.

     

    Thanks in advance.

     

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

      Do you want to add the user’s name to ‘Attendees’ by clicking a button?

      On my opinion, this issue could be seen in three situations:

    • Case1: ‘Attendees’ is empty. Add the user’s name to ‘Attendees’
    • Case2: Other people's names in ‘Attendees’. Add the user’s name to ‘Attendees’
    • Case3: The user’s names is already in ‘Attendees’. Nothing will be changed

    I’ve made a similar test for your reference:

    add a button control and Set the control’s OnSelect property to:

    If(
    
     IsBlank(Gallery4.Selected.Attendees),
    
     Patch(
    
     'X-Team activiteiten',
    
     Gallery4.Selected,
    
     {Attendees: User().FullName}
    
     ),
    
     If(
    
     User().FullName exactin Gallery4.Selected.Attendees,
    
     Patch(
    
     'X-Team activiteiten',
    
     Gallery4.Selected,
    
     {Attendees: Gallery4.Selected.Attendees}
    
     ),
    
     Patch(
    
     'X-Team activiteiten',
    
     Gallery4.Selected,
    
     {Attendees: Gallery4.Selected.Attendees & "," & User().FullName}
    
     )
    
     )
    
    )

    What’s more, I notice that maybe you use “;” as “,” in your region, so you could try this:

    If(
    
     IsBlank(Gallery4.Selected.Attendees);
    
     Patch(
    
     'X-Team activiteiten';
    
     Gallery4.Selected;
    
     {Attendees: User().FullName}
    
     );
    
     If(
    
     User().FullName exactin Gallery4.Selected.Attendees;
    
     Patch(
    
     'X-Team activiteiten';
    
     Gallery4.Selected;
    
     {Attendees: Gallery4.Selected.Attendees}
    
     );
    
     Patch(
    
     'X-Team activiteiten';
    
     Gallery4.Selected;
    
     {Attendees: Gallery4.Selected.Attendees & "," & User().FullName}
    
     )
    
     )
    
    )
    
    
    
    
    

    3408.png

     

         

     

     

    If you still have any question please don’t hesitate to let us know.

     

     

    Best Regards,

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you @v-yutliu-msft  for your help!

     

    That was the trick (the second part)

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 194 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 150

Last 30 days Overall leaderboard