cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jakebroom
Regular Visitor

Adding number to specific SharePoint table field and adding them together

Hi All,

 

I am struggling with the issue below:

 

On my app i want an input box of type "Number" that a user can input to. when the form is submitted it will enter the number into the user who is logged in "Days Remaining" field in a SharePoint list, however i want it to subtract the days entered from the number that is currently stored in the SharePoint table.

 

UserEntitlementDays Remaining
user13026

 

I hope that this makes sense but i am struggling to work out how to do this.

 

Thanks in advance.

 

Jake

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @jakebroom ,

Do you want to update an existing record?

Could you tell me the user field data type and what is your data source?

I assume that user field is person field.

If so, you could try this formula to update with the number in the input box:

Patch(table name,Lookup(table name, User.Email=User().Email),{Days Remaining:Days Remaining-Value(input box.Text)})

 

 

Best regards, 

Community Support Team _ Phoebe Liu
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

2 REPLIES 2
WarrenBelz
Super User III
Super User III

Hi @jakebroom ,

I will call the Text box DaysText

On the Update property of the card, change DaysRemaining.Value (or whatever it is) to

 

If(
   !isBlank(DaysText),
      DaysRemaining.Value - Value(DaysText.Text),
      DaysRemaining.Value
)

 

This should subtract any days in the box from the value currently displayed in the card.

 

 

If this post helps, then please consider Accept it as the solution to help the other members find it more. It also closes the item. 

 

v-yutliu-msft
Community Support
Community Support

Hi @jakebroom ,

Do you want to update an existing record?

Could you tell me the user field data type and what is your data source?

I assume that user field is person field.

If so, you could try this formula to update with the number in the input box:

Patch(table name,Lookup(table name, User.Email=User().Email),{Days Remaining:Days Remaining-Value(input box.Text)})

 

 

Best regards, 

Community Support Team _ Phoebe Liu
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

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,801)