Hello, I am fairly new to power apps and mocking up an app to gather a variety of data to upload to a SQL server.
I have got a gallery with multiple job roles, their salary and then the % of areas they work in.
In the database 1 = 100% so I have used this formula.
Text((ThisItem.StaffPercHost*100),"[$-en-US]0%")
I want users to be able to edit the data and the % spread of each role, however, I do not want them to give a role a % spread not equaling 100%.
After editing the data, there is a save icon using the below formula
Select(Parent);
Patch(
'[dbo].[fp_tco_stafftable]',
{StaffID: ThisItem.StaffID},
{
StaffRoleName: txtStaffRoleName.Text,
StaffSalary: Value(txtStaffSalary.Text),
StaffPercHost: Value(txtStaffPercHost.Text)
}
);
Set(
itemId2,
0
)
I would like an error to appear when attempting to submit IF the total % spread is not exactly 100%. It would also be nice to have a total % column so the user can see how much they are over or under... or even better yet, a count down column to say how much % is left to be distributed for that row. I'll add a screenshot to try better explain. Thank you in advance!


Report
All responses (
Answers (