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 / Power Apps - Split a M...
Power Apps
Answered

Power Apps - Split a Multi-Select Forms Question Into Two Separate Responses

(0) ShareShare
ReportReport
Posted on by 59
Hello,
 
I am building my first ever power app, a simple hotel booking form. The app is connected to a Form SharePoint List where it patches the responses, and I have nearly everything working as intended:
 
 
As you can see, the form is split up in two screens, so to patch the information together from those screens I just assigned a variable "varFormData" to both and patched it like so within the OnSelect field of the "Submit" button on Page 2:
 
 
And after clicking Submit, the SharePoint list updates as so:
 
 
Now, I want to modify this app so that the Guest Name field on page 1 will allow for multiple selections, so the intention is that if there are multiple people going to the same hotel on the same dates, one person can fill out the form for both of them rather then both needing to fill it out separately. With that said, I want these cases to patch onto the SharePoint list as separate rows, so that if I answer 2 names in the Guest Name field, 2 new rows will show up on the SharePoint list, one for each name but with all of the other columns on both rows identical.
 
I can't seem to find a solution to this exact issue online, so any help would be appreciated!
Categories:
I have the same question (0)
  • Verified answer
    BCBuizer Profile Picture
    22,636 Super User 2026 Season 1 on at
    Hi!
     
    First of all, I'd advise against the approach you propose since it is possible to enable multiple selection in the Guest Name column, so it is possible to submit a single booking for multiple people whilst still maintaining one row in SharePoint. This should make your life a lot easier since you will not have to keep so redundant data synchronised, etc.
     
    However, if you do have a reason to pursue this direction, I suggest to use a custom Patch function in combination with a ForAll function so you can loop through all selected guests to create a new item for each, for example:
    ForAll(
    	GuestsDataCardValue.SelectedItems As Guests,
    	Patch(
    		'Guest Hotel Booking Form',
    		Defaults('Guest Hotel Booking Form'),
    		{
    			'Guest Name': {
    				'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    				Claims: $"i:0#.f|membership|{Guests.Email}",
    				DisplayName: Guests.DisplayName,
    				Email: Guests.Email
    			},
    			'Approving Manager':{
    				'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    				Claims: $"i:0#.f|membership|{ApprovingManagerDataCardValue.Selected.Email}",
    				DisplayName: ApprovingManagerDataCardValue.Selected.DisplayName,
    				Email: ApprovingManagerDataCardValue.Selected.Email
    			},
    			Destinations: {Value: DestinationsDataCardValue.Selected.Value},
    			'Preferred Hotel':{Value: PreferredHotelDataCardValue.Selected.Value},
    			'Check-in Date': CheckInDateDataCardValue.SelectedDate,
    			'Check-out Date': CheckOutDateDataCardValue.SelectedDate,
    			'Purpose of travel': PurposeDataCardValue.Text,
    			'Comments or notes': CommentsDateDataCard.Text
    		}
    	)
    )
     
    If this reply helped you in any way, please give it a Like 💜 and in case it resolved your issue, please mark it as the Verified Answer ✅.
     
  • Suggested answer
    BhaskarDhone Profile Picture
    1,392 Super User 2026 Season 1 on at
    Store Other Form Data in a Variable (like you’re doing) upon submit and replace your current patch with forall loop to create one row per guest.
    ForAll(
       cmbGuestNames.SelectedItems,
       Patch(
          BookingList, // Your SharePoint list name
          Defaults(BookingList),
          {
              GuestName: ThisRecord.Value, // Or .DisplayName if using People picker
              CheckIn: varFormData.CheckIn,
              CheckOut: varFormData.CheckOut,
              RoomType: varFormData.RoomType,
              HotelName: varFormData.HotelName,
              Comments: varFormData.Comments
          }
       )
    );
     
    If cmbGuestNames is a People picker, you might need to use ThisRecord.DisplayName or ThisRecord.Email.
  • NC-24021854-0 Profile Picture
    59 on at
    Hello @BCBuizer; I tried to copy your formula but I am getting some errors:
     
     
    Copilot says this is what's wrong:
     
  • NC-24021854-0 Profile Picture
    59 on at
    @BhaskarDhone,
     
    I tried your formula as well but it doesn't seem to be working:
     
     
  • BhaskarDhone Profile Picture
    1,392 Super User 2026 Season 1 on at
    can you tell us what is the error thay you are getting ? May be screenshot or write down the error
  • BCBuizer Profile Picture
    22,636 Super User 2026 Season 1 on at
    Hi!,
     
    Looking at your screenshot, it seems you are missing a comma after the first argument of the Patch function:
     
    If this reply helped you in any way, please give it a Like 💜 and in case it resolved your issue, please mark it as the Verified Answer ✅.
  • NC-24021854-0 Profile Picture
    59 on at
     
    Okay, I am almost there! The only problem now seems to be with reading the claims column...
     
     
    I think this may have to do with the fact that our system has two versions of the same email for each user... like for example if there's someone named James Jefferson, there will be one version of the email that is james.jefferson@... and a shortened version that is written  as jjeffers@... (1st initial + 7 characters of last name) but both versions are linked to one inbox/account. From what I know of working in Power Automate, I'm fairly certain that the 'Claims' field in SharePoint uses the shortened version of the email within our environment, but the Power App seems to be trying to insert the full-name version into the Claims instead, so I think that's what's creating the 'not found' error.
  • NC-24021854-0 Profile Picture
    59 on at
    Okay, problem solved, thank you for the original formula@BCBuizer; FYI all I had to change to fix that last claims issue was change the fields to just Guests.Claims and ManagerValue.Selected.Claims and it's showing up now as intended!
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 493 Most Valuable Professional

#2
11manish Profile Picture

11manish 479

#3
Haque Profile Picture

Haque 328

Last 30 days Overall leaderboard