cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TimDemma
Helper I
Helper I

Updating SharePoint list item from two different Data Sources at the same time

Hello PowerApps wizards,

 

Back again with probably a dumb request. I am trying to have SharePoint list #2 item get updated from two data sources (one that is not connected to the SubmitForm for that SharePoint list.. Hopefully the pictures below explain well what I am trying to do. 

 

When a user creates a new Event in SharePoint List #1 and names it, the dropdown highlighted in red will show that name(s) and when the submitter adds notes in the Note Details section (highlighted in brown), the Gallery Viewer that is tied to the SharePoint List #2 will display the Notes and the User who submitted them. Please see the second picture to see how I'd like SharePoint List #2 to look with a successful function.Notes Screen.PNGSharePoint List #2.PNG



























Thanks in advance!

 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User III
Super User III

Hi @TimDemma ,

You would add something like this to the OnSuccess of the Form (xxxx is the valid output of the drop-down)

Patch(
   SPList2,
   Defaults(SPList2),
   {
      'Event Name':YourDDName.Selected.xxxx,
      'Note Details':YourNotesFieldName.Text
   }
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

6 REPLIES 6
WarrenBelz
Super User III
Super User III

Hi @TimDemma ,

You would add something like this to the OnSuccess of the Form (xxxx is the valid output of the drop-down)

Patch(
   SPList2,
   Defaults(SPList2),
   {
      'Event Name':YourDDName.Selected.xxxx,
      'Note Details':YourNotesFieldName.Text
   }
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

TimDemma
Helper I
Helper I

Ok! I think it liked the formula, and it submitted the FORM buuuuuut the Event name didnt update on SharePoint List #2. This is what I did, what am I missing?

TimDemma_0-1627599713150.png

 

@TimDemma ,

As you can see, there is no reason it should not work (that is the only code that will do it) - are you sure the drop-down is not being cleared when the form is submitted?

TimDemma
Helper I
Helper I

So it's creating a second list item with the event being placed there rather than the item that contains the "Note Details" data. Interesting.. any thoughts? I feel like you/we are so close! Haha

TimDemma_0-1627604636483.png

 

@TimDemma ,

I saw what you posted, but it makes no sense to me why it would do that - the code simply creates a new record with those two values in the two fields. To test try it on a button rather that on the OnSuccess and make sure there are values in both controls.

TimDemma
Helper I
Helper I

I tried that. But its still creating two instead of one new item. I'll still mark it solved, but I'll keep tinkering! Thanks @WarrenBelz ! 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,550)