cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Calculating InputBox

Hi, I have a Sharepoint list that I have modifed the form for.  The main fields that I am using are:

 

Current Salary

Percentage Increase

Future Salary

 

I want to be able to set the future salary = Current Salary * Percentage increase.  Also, update the percentage increase based on dividing future salary by current salary.

 

I currently have an onchange function  on percentage increase and future state, by using variable test1 and test2.  This works great on the initial save/create.  Percent increase and future salary both have their default values set to the variables.  The issue I have is when I open an item from the Sharepoint List, it is referencing the 2 variables in the default and not the values from sharepoint.  How can I get the real-time calculations and the default value to work (when a user wants to edit this)?

 

Set(test1,(((DataCardValue16.Text / DataCardValue14.Text)-1)*100))


Set(test2,DataCardValue14.Text * ((DataCardValue7.Text *.01) + 1))

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @JasonMilwaukee2 ,

 

You could use below formulas to achieve this:

 

If(SharePointForm1.Mode=New,test1,ThisItem.ColumnName1)
If(SharePointForm1.Mode=New,test2,ThisItem.ColumnName2)

 

Regards,

Mona

Community Support Team _ Mona Li
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

1 REPLY 1
Community Support
Community Support

Hi @JasonMilwaukee2 ,

 

You could use below formulas to achieve this:

 

If(SharePointForm1.Mode=New,test1,ThisItem.ColumnName1)
If(SharePointForm1.Mode=New,test2,ThisItem.ColumnName2)

 

Regards,

Mona

Community Support Team _ Mona Li
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
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (22,492)