Announcements
What is the syntax for using And in an if statment?
Need a button disabled if 2 condition are met
if fld_Generic.Text - "ABC" AND IsBlank(fld_Relation.Selected.Value)
Then disable the button (DisplayMode.Disabled).Thanks in Advance
Hi @AlbertoSP
The syntax looks like this:
If(And(fld_Generic.Text="ABC", IsBlank(fld_Relation.Selected.Value)), DisplayMode.Disabled, DisplayMode.Edit)
You can also use the && syntax like this:
If(fld_Generic.Text="ABC" && IsBlank(fld_Relation.Selected.Value), DisplayMode.Disabled, DisplayMode.Edit)
Hey there,
So achieve this functionality you have to write if function in button's "DisplayMode" property.
Please refer bewlow screenshot to get more idea on this:
Code as per your field and requirement:
if(fld_Generic.Text = "ABC" && IsBlank(fld_Relation.Selected.Value), DisplayMode.Disabled, DisplayMode.Edit)
Please mark this as a solution if really helps you.
Thanks,
Milansinh Raj
Thank you.
Although the second solution using &&, doidn't seem to work
May I know which connection you are using here ? Dynamics CRM connector or CDS connection ?
Because I have created demo app screen to show solution and I am using Dynamics CRM Connector here.
It is working fine for me.
Let me know so I can get knowledge in which case it cant be work
Thank you
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 community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 325 Most Valuable Professional
11manish 165
MS.Ragavendar 88 Super User 2026 Season 1