cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Button that fills sharepoint list element with a word

Hi,

 

I need a button which you click on and automatically is filled an element on a sharepoint list. That is, once I click this button (placed in my browse gallery), the sharepoint is filled with the word 'YES'.

I've tried this: Set('Colum1';"YES")

But it doesn't work. 😞

 

Could someone help me to do this, please? Or find another way to obtain the same result?

Many thanks!

 

Regards,

Masoud9

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Button that fills sharepoint list element with a word

You can use patch to update a column in an existing list item. 

 

Example: Patch('SPOListName', [recordtoupdate], {SPOColumnName: "Yes"})

 

The second parameter is the record that needs to be updated. If your gallery is displaying the SPOList and the button appears in each row then the patch for the button would look something like this:

 

Patch('SPOListName', ThisItem, {SPOColumnName: "Yes"})



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Community Support Team
Community Support Team

Re: Button that fills sharepoint list element with a word

Hi @Anonymous ,

Do you add a Button control within your Gallery?

Do you want to update the column value of a specific item in your Gallery when you press the Button within your Gallery?

 

Based on the needs that you mentioned, I think the Patch function could achieve your needs. Please consider take a try with the following workaround:2.JPG

Set the OnSelect property of the "Check" icon to following:

Patch('20190325_case13', ThisItem, {Title: "Yes"})

On your side, you should type the following formula (set the OnSelect property of the Button to following formula😞

Patch('YourSPList', ThisItem, {Column1: "YES"})

Or

Patch('YourSPList', LookUp('YourSPList', ID = ThisItem.ID), {Column1: "YES"})

In addition, you could also achieve your needs using UpdateIf function as below:

UpdateIf('YourSPList', ID = ThisItem.ID, {Column1: "YES"})

Please consider take a try with above solution, then check if the issue is solved.

 

More details about the Patch function and UpdateIf function, please check the following article:

Patch function

UpdateIf function

 

Best regards,

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.

View solution in original post

5 REPLIES 5
Super User
Super User

Re: Button that fills sharepoint list element with a word

You need to use the Patch() to update the SharePoint list. Are you trying to update an existing list item or create a new list item?

 

Patch function in PowerApps



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Anonymous
Not applicable

Re: Button that fills sharepoint list element with a word

Hi Jeff,

 

I am trying to fill one empty cell of a colum already created.

Can I use path() there? 

 

Thanks

 


@Jeff_Thorpe wrote:

You need to use the Patch() to update the SharePoint list. Are you trying to update an existing list item or create a new list item?

 

Patch function in PowerApps


 

Super User
Super User

Re: Button that fills sharepoint list element with a word

You can use patch to update a column in an existing list item. 

 

Example: Patch('SPOListName', [recordtoupdate], {SPOColumnName: "Yes"})

 

The second parameter is the record that needs to be updated. If your gallery is displaying the SPOList and the button appears in each row then the patch for the button would look something like this:

 

Patch('SPOListName', ThisItem, {SPOColumnName: "Yes"})



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Community Support Team
Community Support Team

Re: Button that fills sharepoint list element with a word

Hi @Anonymous ,

Do you add a Button control within your Gallery?

Do you want to update the column value of a specific item in your Gallery when you press the Button within your Gallery?

 

Based on the needs that you mentioned, I think the Patch function could achieve your needs. Please consider take a try with the following workaround:2.JPG

Set the OnSelect property of the "Check" icon to following:

Patch('20190325_case13', ThisItem, {Title: "Yes"})

On your side, you should type the following formula (set the OnSelect property of the Button to following formula😞

Patch('YourSPList', ThisItem, {Column1: "YES"})

Or

Patch('YourSPList', LookUp('YourSPList', ID = ThisItem.ID), {Column1: "YES"})

In addition, you could also achieve your needs using UpdateIf function as below:

UpdateIf('YourSPList', ID = ThisItem.ID, {Column1: "YES"})

Please consider take a try with above solution, then check if the issue is solved.

 

More details about the Patch function and UpdateIf function, please check the following article:

Patch function

UpdateIf function

 

Best regards,

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.

View solution in original post

Anonymous
Not applicable

Re: Button that fills sharepoint list element with a word

Tnak you very much, @Jeff_Thorpe and @v-xida-msft , it works perfectly 🙂

 

Best regards,

Javier

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,494)