cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Change attribute in a SharePoint list via button

Hello

 

I would like to have an entry in a Sharepoint list changed by pressing a button. (screen shot 3)
The attribute is placed in a previous form (see screen shot 1) and should be changed during the further processing (screen shot 2 and 3).

How do I achieve this in the easiest way?

I've tried with Update,Updatelf and Patch but have difficulties with the syntax to achieve this.
How do I make sure that only the selected item will change the specific attribute?


Has anyone a hint?

 

regards

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Change attribute in a SharePoint list via button

Hi @Unbihexium ,

Could you please share a bit more about your scenario?

Do you want to change the Status column value of the selected item within your ListGallery2 when you press a button within your VerificationExaminer screen?

Is the Status column a Text type column or a Choice type column in your SP list?

 

Based on the needs that you mentioned, I think the Patch function could achieve your needs. I have made a test on my side, please take a try with the following workaround:

Set the OnSelect property of the button within your VerificationExaminer screen to following:

1. If the Status column is a Text type column in your SP list: 

Patch(
          'YourSPList',
           LookUp('YourSPList', ID = ListGallery2.Selected.ID),
           {
             Status: "The specific value you want to set to this column"
           }
)

2. If the Status column is a Choice type column in your SP list:

Patch(
          'YourSPList',
           LookUp('YourSPList', ID = ListGallery2.Selected.ID),
           {
             Status: {
Value: "The specific value you want to set to this column"
} } )

Note: I assume that your ListGallery2 is connected to your SP List data source.

 

More details about the Patch function in PowerApps, please check the following article:

Patch function

 

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

 

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

Highlighted
Helper III
Helper III

Re: Change attribute in a SharePoint list via button

Hi Kris

Thank you very much for your reply!

 

Sorry for my bad explanation.

Yes I would like to change the SPList Column (Status) which is only a text type. ListGallery2 is connected to my SP list.

I've tried with : 

Patch(
          'YourSPList',
           LookUp('YourSPList', ID = ListGallery2.Selected.ID),
           {
             Status: "The specific value you want to set to this column"
           }
)

 This have work just perfect! Thank you so much!!!

Just for my understanding;  ID = ListGallery2.Selected.ID
ID means the SPList column 'Auftrag ID'?? (screen shot)
Actually it worked both way with ID and 'Auftrag ID' .... I'm just a litle bit confused 🙂

 

Patch('Erfassung und Freigabe neuer Artikel 2';
LookUp('Erfassung und Freigabe neuer Artikel 2';'Auftrag ID'=ListGallery2.Selected.'Auftrag ID');{Status:"Offen"});;
SubmitForm(Form2) && Navigate(TransmissionSuccessful;Fade)

 

Best regards

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Change attribute in a SharePoint list via button

Hi @Unbihexium ,

Could you please share a bit more about your scenario?

Do you want to change the Status column value of the selected item within your ListGallery2 when you press a button within your VerificationExaminer screen?

Is the Status column a Text type column or a Choice type column in your SP list?

 

Based on the needs that you mentioned, I think the Patch function could achieve your needs. I have made a test on my side, please take a try with the following workaround:

Set the OnSelect property of the button within your VerificationExaminer screen to following:

1. If the Status column is a Text type column in your SP list: 

Patch(
          'YourSPList',
           LookUp('YourSPList', ID = ListGallery2.Selected.ID),
           {
             Status: "The specific value you want to set to this column"
           }
)

2. If the Status column is a Choice type column in your SP list:

Patch(
          'YourSPList',
           LookUp('YourSPList', ID = ListGallery2.Selected.ID),
           {
             Status: {
Value: "The specific value you want to set to this column"
} } )

Note: I assume that your ListGallery2 is connected to your SP List data source.

 

More details about the Patch function in PowerApps, please check the following article:

Patch function

 

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

 

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

Highlighted
Helper III
Helper III

Re: Change attribute in a SharePoint list via button

Hi Kris

Thank you very much for your reply!

 

Sorry for my bad explanation.

Yes I would like to change the SPList Column (Status) which is only a text type. ListGallery2 is connected to my SP list.

I've tried with : 

Patch(
          'YourSPList',
           LookUp('YourSPList', ID = ListGallery2.Selected.ID),
           {
             Status: "The specific value you want to set to this column"
           }
)

 This have work just perfect! Thank you so much!!!

Just for my understanding;  ID = ListGallery2.Selected.ID
ID means the SPList column 'Auftrag ID'?? (screen shot)
Actually it worked both way with ID and 'Auftrag ID' .... I'm just a litle bit confused 🙂

 

Patch('Erfassung und Freigabe neuer Artikel 2';
LookUp('Erfassung und Freigabe neuer Artikel 2';'Auftrag ID'=ListGallery2.Selected.'Auftrag ID');{Status:"Offen"});;
SubmitForm(Form2) && Navigate(TransmissionSuccessful;Fade)

 

Best regards

View solution in original post

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,378)