I have two date fields. If I fill in DataCardValue2 with a date value less than DataCardValue1, I get the notification that the date value must be greater than or equal to DataCardValue1.
But, I can save the form in the same way, even if the date value is incorrect. And I would not like it to be saved with the wrong date value, but rather that it would not allow saving.
This is possible?
Solved! Go to Solution.
Am surprised the formula didn't work. It may well be that you have to turn the Datacaradvalue like;
If(DataCardvalue1.SelectedDate<
DataCardvalue2.SelectedDate, Notify ("StartDate should be equal or less Then EndDate"),SubmitForm(YourformName)
If it doesn't work show a screenshot of the formula and the Datacaradvalues with the dates entered in them
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
On the Onselect of the save button, you can use the formula
If(DataCardvalue1.SelectedDate>
DataCardvalue2.SelectedDate, Notify ("StartDate should be equal or less Then EndDate"),SubmitForm(YourformName)
Replace SubmitForm(YourformName) with Patch formula if using patch
Thus if the criteria if not met, the form will not be saved.
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
it didn't work, it still allows saving.
Set the property "Required" of the datacard to be true, then add the restrictions in the property "Update", when you submit the form, if the value in datacard is not valid, it will fail to submit.
The error showed you didn't give the datacard a date value.
In the formula:
You can not add Notify in If in Update, it should be like this : If(..condition.., datevalue)
Here is an example in my app:
If(DatePicker1.SelectedDate>=Today(),DatePicker1.SelectedDate)
Am surprised the formula didn't work. It may well be that you have to turn the Datacaradvalue like;
If(DataCardvalue1.SelectedDate<
DataCardvalue2.SelectedDate, Notify ("StartDate should be equal or less Then EndDate"),SubmitForm(YourformName)
If it doesn't work show a screenshot of the formula and the Datacaradvalues with the dates entered in them
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
User | Count |
---|---|
258 | |
110 | |
97 | |
57 | |
40 |