So Im working on a Table which I created. It displays the users' vacation hours (custom fields I put in the resource groups). I've made a repeater to show all the resource users I have and give the ability to add value to increase each user's vacation hours. (See pic below)
The No., Name, and Vacation balance are pulled from the resource record, and Add/Subtract Vacation Balance is a new field.
When I enter the values for each user and submit, the final value I entered gets updated for each of the users
I'd like it to separate each line and update all of the values on submit, but I'm having difficulty progressing. Any help would be great.
Do I need to create a temporary table or something to make this work?
I had some code on the page for processing,
area(Processing)
{
action("Submit Changes")
{
ApplicationArea = All;
trigger OnAction();
begin
//add confirmation yes no
currentUser := Database.UserId;
todaysDate := System.CurrentDateTime();
repeat
leaveChanges.changeID := 0;
leaveChanges.changedBy:= currentUser;
leaveChanges.changedResource:=Rec."No.";
leaveChanges."Date Changed":= todaysDate;
leaveChanges."OldVacationHours":=Rec.myVacation;
// leaveChanges."OldSickHours":=oldSickHours;
leaveChanges."Changed Vacation Amount":= addVacation;
// leaveChanges."Changed Sick Amount":= addSickHours;
leaveChanges."NewVacationHours" := totalVacation;
// leaveChanges."NewSickHours" := newSickHours;
leaveChanges.Insert(true);
Rec.myVacation := totalVacation;
Rec.MODIFY(TRUE);
until Rec.Next() = 0;
end;
}
}
Im guessing as the value is only one value that is my issue
Hi, If this is a List page, this should not be happening. You can refer to the standard Payment Terms or Payment Methods page.
Is there some code in the trigger of the field, table, or page?
Thanks.
ZHU
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,104 Most Valuable Professional
nmaenpaa 101,156