cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Unbihexium
Level: Powered On

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
Community Support Team
Community Support Team

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
Unbihexium
Level: Powered On

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
Community Support Team
Community Support Team

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
Unbihexium
Level: Powered On

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
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (6,378)