Disable/Enable "Save" button based on condition

Dear community,
Is there an option to disable/enable “Save” option in the Form_View if certain conditions are met.

For example, the users should not be able to click on “Save” if this message is shown.

Thank you.

Solved Solved
1 10 2,844
1 ACCEPTED SOLUTION

I understand. What I would recommend then is that the “plus” sign not even show when there is no reason to open the form.

You can insert an expression into the “plus” action’s Behvaior “Only of this condition is true” property, such that the action only shows when there’s something that needs to be done in the Form. Otherwise, hide the action.

View solution in original post

10 REPLIES 10

Steve
Platinum 4
Platinum 4

There is not, but I agree there should be. I encourage you to submit a feature request for this.

Thank you @Steve for this suggestion. I have posted this under Feature Request

So, I’m a little confused on the scenario that has led to this question.

You should be able to “detect” the situation indicated in the message and prevent launching of the Form in the first place. Why allow a user into the form if they can’t do anything anyway?

Then you don’t need the capability of disabling the Save button at all.

Perhaps a slight design adjustment is needed?

As a rule of thumb, if at all possible, we developers want to avoid showing error messages to the user and find ways to not even allow the situation that led to the error. This improves the user experience tremendously!!

Thank you for asking this @WillowMobileSystems,

Pls, refer to the below-given post for more understanding.

I tried to have a table view of a referenced table that has Add_Only option. When the users click on the “plus” sign, the form is saving empty entries. This is affecting the whole data logic.

Thank you.

I understand. What I would recommend then is that the “plus” sign not even show when there is no reason to open the form.

You can insert an expression into the “plus” action’s Behvaior “Only of this condition is true” property, such that the action only shows when there’s something that needs to be done in the Form. Otherwise, hide the action.

Yes @WillowMobileSystems. I just got that idea & did exactly the same.
Display as inline helped.
But, still, Valid_if for Save would be helping us in many circumstances.

Thank you.

@WillowMobileSystems -> This made me think! And, I have modified the app as per your advice (at least, that’s how I personally feel! Thank you for this!!)

You’re welcome!

That was clever! Thanks:)

Pls do vote for this feature under feature requests.

Thank you.

Top Labels in this Space