cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
abd3127
Level 8

PowerApps:Updating fields of a sharepoint list

Hello, I am making a app which consists 5 screens.

1)on second screen i have some fields which are for user input and some on screen 3 .

2)After this on screen 3 these values are inserted into a sharepoint list.on

3)screeen 4 i am displaying thse values in a gallery .

4)after selecting a entry into gallery app is going to screen 5 and here i have button "Update".After clicking on this button i am navigating to screen 2 where i am populating the fields with the entry that i selected on screen 5.

Here i want to update the fields those were filled before and i want to add them in sharepoint list in the same entry with updated values.

5) But instead i am getting a new entry into the sharepoint list.How can update the data in sharepoint list? 

6 REPLIES 6
Anonymous
Not applicable

Re: PowerApps:Updating fields of a sharepoint list

Are you using Forms?

 

I you are using form whenever you want to create a new entry in your datasource call

NewForm(YourFormName)

Whenever you want to update an existing record call

EditForm(YourFormName)

If you are using Patch() statements to update your datasource then you can define in the Patch() function whether you want to create new record or update an existing one.

 

If you are using Collect() then you can only add new entries into your datasource.

 

 

abd3127
Level 8

Re: PowerApps:Updating fields of a sharepoint list

I am using patch function.How do i update here the existing record ?

Community Support Team
Community Support Team

Re: PowerApps:Updating fields of a sharepoint list

Hi @abd3127,

 

If here you would like to update the record with patch, then the command should be:

Patch( DataSource, BaseRecord, ChangeRecord1 [, ChangeRecord2, … ])

In your scenario, it should be the format as below:

Patch(SharePointList, Lookup(SharePointList, conditions), ChangeRecord)

Here we use the LookUp function to find the proper single record.

For more information about how to take use of the patch, please check:

Patch function in PowerApps

 

Regards,

Michael

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

PowerApps: Add records sharepoint list with an Image

PowerApps: Add records sharepoint list with an Image

hello 

my simular problem is if I add a foto it doesnt work:

Collect(TestFirstList; { Title: BLDropDown.Selected.BLNR; Gewerk: ThisItem.GEWERKNR; k7ps:ThisItem.BVNR; FOTO:ThisItem.FOTO})

ThisItem is from an actual collection.
The Image ThisItem.FOTO I can see in an Image-View on the App Screen.

This works:
Collect(TestFirstList; { Title: BLDropDown.Selected.BLNR; Gewerk: ThisItem.GEWERKNR; k7ps:ThisItem.BVNR})

Thanks for Reply / Help

Jens Rogge
abd3127
Level 8

Re: PowerApps:Updating fields of a sharepoint list

I tried your suggestions , but i need to change/modify entire row ,so here in lookup/patch it needs some condition or column name to identify your record.In my case any value can change .Iss there any other field that i can use here to identify my record?  

PytByt
Level: Powered On

Re: PowerApps:Updating fields of a sharepoint list


@v-micsh-msft wrote:

Hi @abd3127,

 

If here you would like to update the record with patch, then the command should be:

Patch( DataSource, BaseRecord, ChangeRecord1 [, ChangeRecord2, … ])

In your scenario, it should be the format as below:

Patch(SharePointList, Lookup(SharePointList, conditions), ChangeRecord)

Here we use the LookUp function to find the proper single record.

For more information about how to take use of the patch, please check:

Patch function in PowerApps

 

Regards,

Michael


Hi @v-micsh-msft 

 

i need to know if i can modified my formula here i use to create a new record into the formula that i can use to update (edit) my record in my SP List.

 

Patch('_Onboarding List 1', Defaults('_Onboarding List 1'), FormTab1.Updates, FormTab2.Updates, FormTab3.Updates, FormTab4.Updates, FormTab5.Updates, FormTab6.Updates); 

 

Notice that i use that formula above for joining all the input from multiple form into a single SP list.

 

thanks,

pytbyt

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Demo Extravaganza Championship Voting Open

Voting Ends: October 30, 2019!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

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

Top Kudoed Authors
Users Online
Currently online: 184 members 4,789 guests
Recent signins:
Please welcome our newest community members: