Hi Folks
I have a status bar that displays a label in the status bar in the bottom of my form (Edit-Form - Not Saved):
The first part of the status is set depending on if the form is in Edit or New Mode. The second Part is the status is displays if the form has been saved or is unsaved.
I tried to add a third component to this, so that if any of the fields are updated on the form, the OnChange for all fields property on each filed sets the the variable (varSaveStatus) to "Data Changed - Not Saved', using the following code:
et(
varSaveStatus,
"Data Changed - Not Saved"
)
After I push the save button, the status should update to:
But after I update a combo box, it updates to the 'Edit Form - Saved' for a second, the reverts back to this:
If I hit the save button a second time, then it works as it should, displaying:
The above works fine for basic text fields. but when any of the Combo boxes are changed, the save button needs to be pressed twice. The code on the save button is as follows:
If(
varMode = "Edit",
Patch(
NewEmployeeOnboarding,
{ID: galSumDashboard.Selected.ID},
{BusinessUnit: ComboBox2.Selected.Result},
{Division: ComboBox3.Selected.DropDownDivisionList},
{EmploymentType: ComboBox1.Selected.Value},
{OnBoardingApproval: ComboBox4.Selected.DisplayName},
frmEmpDetails.Updates;
),
Patch(
NewEmployeeOnboarding,
Defaults(NewEmployeeOnboarding),
{BusinessUnit: ComboBox2.Selected.Result},
{Division: ComboBox3.Selected.DropDownDivisionList},
{EmploymentType: ComboBox1.Selected.Value},
{OnBoardingApproval: ComboBox4.Selected.DisplayName},
frmEmpDetails.Updates;
)
);
Set(
varSaveStatus,
"Saved"
);
Is there a timing issue (i.e. the Save process to a SharePoint list) runs in parallel with the Set command in the above Save button code? I have tried taking the Set statements away from the Combo boxes, and it seems to work fine so it looks like the combo boxes are the issue. Does anyone know what would cause this behavior?
Cheers,
Geoff
User | Count |
---|---|
159 | |
86 | |
68 | |
63 | |
61 |
User | Count |
---|---|
209 | |
151 | |
93 | |
81 | |
69 |