Announcements
I have CheckBox1 and CheckBox2.I have EditFormAttachment_DataCardValue.I have SubmitButton.Action:Default DisplayMode = DisplayMode.EditIf CheckBox1.Value or ChechkBox2.Value equals true and EditFormAttachment is empty SubmitButton should be DisplayMode.Disabled.If either checkbox is checked and there is no attachment the submit button should be disabled.I've got the checkbox/attachment part, I just can't figure out the default part.If(CheckBox1.Value=true Or CheckBox2.Value=true && !IsEmpty(EditFormAttachment_DataCardValue.Attachments.Name),DisplayMode.Edit,DisplayMode.Disabled)
Hi @Phineas,
Instead of defining when the DisplayMode should be Edit, we can define when the button should not be in edit mode. This way all other scenarios will default to DisplayMode .Edit:
If( //If either checkbox is checked and there are no attachments set to disabled else edit (CheckBox1.Value || CheckBox2.Value) && IsEmpty(EditFormAttachment_DataCardValue.Attachments.Name), DisplayMode.Disabled, DisplayMode.Edit )
If this solves your question, would you be so kind as to accept it as a solution.
Thanks!
Everything worked except -,If I leave both check box values as 'false' and add an attachment the Submit button is enabled.This should not be.Currently:Default displaymode.edit (both check boxes 'false', no attachments) - this works.Both check boxes 'true' but there is not attachment displaymode.disabled - this works.Both check box values 'false' and attachment added the Submit button is enabled - this is NOT working.If an attachment is present but neither check box is 'true' Submit button displaymode should be 'disabled'.
In that case let’s extend the if statement:
If( //If either checkbox is checked and there are no attachments set to disabled else edit (CheckBox1.Value || CheckBox2.Value) && IsEmpty(EditFormAttachment_DataCardValue.Attachments.Name), DisplayMode.Disabled, //Check for no checked boxes (!CheckBox1.Value && !CheckBox2.Value) && !IsEmpty(EditFormAttachment_DataCardValue.Attachments.Name), DisplayMode.Disabled, DisplayMode.Edit )
I hope this helps!
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 549 Most Valuable Professional
Kalathiya 225 Super User 2026 Season 1
Haque 224