
Hi!
I have decided to not use Forms and instead use TextInput and Patch.
When I used a Form previously, I had a Text Label and Button that only showed if one of the Form fields were changed. If the change was erased, the text label and button disappeared immediately. I used "Form1.Unsaved" in the label and button Visible properties.
I can't seem to replicate this on TextInputs. I have tried "UpdateContext" on the TextInput OnChange Property and the putting the variable as the Visible property in the label and button. However this makes the label and button visible when a change is made but doesn't hide them automatically if I delete the change.
Can anyone help?
Hi, @s_tanswell84
[
create variable
Set(UnsavedChanges, false)
Set the OnChange property of your TextInput
UpdateContext({UnsavedChanges: true})Set the Visible property of the label and button to
UnsavedChangesTo automatically reset UnsavedChanges to false when the change is saved or erased, you can use the OnSelect property of the button that saves the changes or any other relevant control. For example, if you have a "Save" button:
Patch(YourDataSource, ...); // Perform your patch operation
UpdateContext({UnsavedChanges: false});]
Please give a thumbs up if this information is helpful.
Best regards,
Ali Sheraz