cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Perrault
Frequent Visitor

Add Text in Sharepoint Row When Button is Pressed

Hello,

 

I want to create a Power App in which when a user clicks a button, the word "Yes" will appear in a certain column in a Sharepoint list. I am hoping someone can help provide guidance as to how to do that. 

 

The exact example is when a user clicks the button "Approved" the word "Yes" will appear in the "Approved?" Column for the selected item. 

 

Any help is greatly appreciated!

 

7 REPLIES 7
StalinPonnusamy
Community Champion
Community Champion

Hi @Perrault 

 

Set Onselect property of the button to

Patch(
    SPList,
    LookUp(
        SPList,
        ID = VarID
    ),
    {
        ColumnName: "Yes"
    }
)

 

if the column in Sharepoint is in the Choice column then

ColumnName: {Value: "Yes"}


Thanks,
Stalin - Learn To Illuminate

 

 

Hello,

 

Thank you for your help with this. Can you help me fill in the blanks for the code you provided? 

My Sharepoint List Name: Dog Names

Selected Item from Gallery: Title

Column Name: Move to Committee?

 

Thanks!

Suilenroc
Frequent Visitor

Assuming this is being edited from a gallery: 

 

 

Patch( 'Dog Names', 
   LookUp( 'Dog Names', ID = ThisItem.ID ),
    { 'Move to Committee?': "Yes" } )

 

 

Perfect.

 

This should work if Column Name: Move to Committee? is a single column type

 

StalinPonnusamy
Community Champion
Community Champion

Hi @Suilenroc 

 

If the column in Sharepoint is boolean then

Patch( 'Dog Names', 
   LookUp( 'Dog Names', ID = ThisItem.ID ),
    { 'Move to Committee?': true } )

 

All of you are incredible. THANK YOU for all of your help. 

StalinPonnusamy
Community Champion
Community Champion

Hi @Perrault 

 

Looks like I was mixing 2 names 😀

 

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.

 

Note: You can accept multiple posts as a solution that helped to resolve it.


Thanks,
Stalin - Learn To Illuminate

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,519)