@AnnetteM - you would have to manually accommodate for all 50 data cards in the formula I am afraid. Given the formula is looking at the output of specific specific controls (rather than running queries back to your data source), I would not expect this to be a resource intensive.
Another option is leverage the Unsaved property of the EditForm control.
For example:
1. On the OnSelect property of your Submit Button, enter:
If(
Form1.Unsaved,
UpdateContext({ctx_show_dialog: true})
)
2. Add a Container control into your Screen.
3. Insert a Button control and a Date Picker control into that Container
4. On the OnSelect property of the Button control, enter:
If(
Len(DatePicker1.SelectedDate) = 0,
Notify(
"Please select a date",
NotificationType.Warning
),
SubmitForm(Form1);
Reset(DatePicker1);
UpdateContext({ctx_show_dialog: false})
)
5. On the Visible property of the Container control, enter:
ctx_show_dialog
6. On the OnSuccess property of the EditForm control, enter:
Notify(
"Saved",
NotificationType.Success
);
Patch(
'Your Data',
Gallery1.Selected, //this examples assumes you're populating the Item property of your Edit Form with a Gallery selection
{'Effective Date Column': DatePicker1.SelectedDate}
)
7. Remove the "Effective Date" DataCard from your Edit Form