web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

Calculation

(0) ShareShare
ReportReport
Posted on by 310

I have an SP List that has a column with "Week #" - this is a number column. So I might have a week number= 1 for example.

If there a way I can have a button in Powerapps that triggers an update to the week number? So I will like that when I click the button, the week number changes to 1+1 for example. 

Categories:
I have the same question (0)
  • Verified answer
    ganeshsanap Profile Picture
    1,551 on at

    @Canadiansal 

     

    You can to this using Patch function. Set OnSelect property of button to:

     

     

    Patch(SharePointListSource, ThisItem, {Week#: ThisItem.Week# + 1})

     

     

    Use internal name of Week# column in formula.

     

    If you are not using any gallery and want to update list item using it's ID then use:

     

     

    Patch(SharePointListSource, {ID: 2}, { Week#: LookUp(SharePointListSource, ThisRecord.ID = 2, Week#) + 1 })

     

     

    Here 2 is ID of SharePoint list item.

     

    Check below references for more information: 

    1. Increment a SharePoint number column by 1 on button click 
    2. Patch function in Power Apps 

    Please click Accept as solution & ‌‌👍 if my answer helped you to solve your issue. This will help others to find the correct solution easily. If the answer was useful in other ways, please consider giving it ‌‌👍

     

    For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs

  • Canadiansal Profile Picture
    310 on at

    I should clarify.

    So there will be multiple week values in the list. so there might be 1,2,3 etc., I will like for my button to only update the value in week 1 - not all the values.

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on at

    Hi@Canadiansal,

    Could you please tell me more about your data configuration, is there only a Number column named 'Week#'?

    Based on the issue that you mentioned, do you want to update the records related to the week 1?

    If I understand correctly, I think the UpdateIf function could achieve your needs.

    UpdateIf(SPlist,'Week#'=1,{'Week#':'Week#'+1})

    Hope it could help you.

    Regards,

    Qi 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard