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
Solved! Go to Solution.
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
)
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
User | Count |
---|---|
160 | |
95 | |
76 | |
72 | |
58 |
User | Count |
---|---|
213 | |
165 | |
97 | |
95 | |
75 |