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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / how to add a numeric v...
Power Apps
Unanswered

how to add a numeric value to a coulmn item for every submission on a form

(0) ShareShare
ReportReport
Posted on by 21

I have a sharepoint list labeled UserRewards andI have a power app that has a form where a user can select an employee to recognize coming from office 365 users. I have a second list with a column labeled Employee being nominated. On the form, the drop down to select an employee comes from that second sharepoint list. 

 

In my UserRewards list I have a text column labeled rewardPoint and a Employee column as a people picker field. The rewardpoint is a numeric value manually entered for every time a person is recognized. 

Is there a way to automatically add 1 to the numeric value in the rewardpoint column for every time a form is submitted based off the Employee being recognized? 

Categories:
I have the same question (0)
  • Prabhakar_S Profile Picture
    735 Moderator on at

    Hi @abuhakeem ,

     

    If you want to handle this directly within PowerApps without using Power Automate, you can use the 'Patch' function to update the SharePoint list. 

     

    Assuming you have a button in your PowerApp that submits the form, you can add the following code to the 'OnSelect' property of the button:

     

    // Get the current reward points for the selected employee
    ClearCollect(CurrentEmployee, Filter(UserRewards, Employee.DisplayName = YourDropdownControl.Selected.DisplayName));

    // Check if there are any existing records for the employee
    If(CountRows(CurrentEmployee) > 0,
    // If records exist, update the existing record
    Patch(
    UserRewards,
    LookUp(UserRewards, Employee.DisplayName = YourDropdownControl.Selected.DisplayName),
    { RewardPoint: LookUp(UserRewards, Employee.DisplayName = YourDropdownControl.Selected.DisplayName).RewardPoint + 1 }
    ),
    // If no records exist, create a new record
    Patch(
    UserRewards,
    Defaults(UserRewards),
    {
    Employee: YourDropdownControl.Selected,
    RewardPoint: 1
    }
    )
    );

     

    In the above code make sure to replace 'YourDropdownControl' with the actual name of your dropdown control. This way, you can directly update the SharePoint list within PowerApps without the need for a separate Power Automate flow.

     

    Thanks!!!

     

    Please consider marking my response as the accepted solution if it successfully resolves your concern. If you found the information beneficial in other aspects, kindly express your appreciation by giving it a thumbs-up.

  • abuhakeem Profile Picture
    21 on at

    I added that formula on the submit button and it isn't working properly. What that is doing is it creates a new record on the userReward list, regardless if the record exists in the list, with the employee column blank. If I submit another record by selecting a different employee, it still adds to that initial blank record.

     

    I have two lists. One called userRewards and one called Employee. The form on the power app that has the drop down to select the employee is coming from the Employee list. The count of the reward point is coming from userRewards.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard