cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tupues
Helper III
Helper III

OR nested in IF function

Hi all,

 

I'm doing some testing trying to learn the ins and outs:

I have an OR function which is nested within an IF function as such:

 

 

If(
    Or(
        IsBlank(box_Instructor),
        IsBlank(box_SessionDetail)),Green,
    Red)

 

 

This is fine as long as the field is blank. If I chose something from the dropdown the text turns green. It however stays green even if I clear the entries in the dropdowns...

 

Ultimately the Formula should be used for this:

 

 

DisplayMode = 

If(
    ((IsBlank(CommentsGrade) && CommentsGrade.Visible = true)Or(
        IsBlank(box_Instructor),
        IsBlank(box_SessionDetail)),
    Disabled,
    Edit
)

 

 

Which is not quite working right hence why I am writing this...

 

Perhaps someone could point me in the right direction.

Many thanks and much appreciated!

 

Best regards

 

Tom

 

1 ACCEPTED SOLUTION

Accepted Solutions
eka24
Super User III
Super User III

There are too many brackets follow:

If( IsBlank(TextInput1_1) && TextInput1_1.Visible Or IsBlank(ComboBox1) Or IsBlank(ComboBox1_1), Disabled, Edit )

 

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.

View solution in original post

3 REPLIES 3
eka24
Super User III
Super User III

I dont think a dropdwn default could be blank if the table does not contain blank. Consider in inserting a blank hidden textbox that receives the value in the dropdown example:
Textbox1: box_Instructor.Selected.Value

Textbox2: box_Instructor.Selected.Value

After that:

If(  ((IsBlank(CommentsGrade) && CommentsGrade.Visible = true)Or
( IsBlank(Textbox1),       
IsBlank(Textbox2)), Disabled,    Edit)

 

I assume the dropdowns.

Also you can maintain the formula by changing the dropdowns to combobox.

 

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.

Hi @eka24 

 

Thanks for your reply. They actually are combo boxes, not sure why it did not work. Your workaround does the trick however.

The issue standing is though, that as soon as I insert the below to match your formula I get a syntax error saying there is an issue with a comma or a bracket...

 

Screen Shot 2020-04-05 at 11.18.08.png

 

(IsBlank(CommentsGrade) && CommentsGrade.Visible = true)
If(((IsBlank(CommentsGrade) && CommentsGrade.Visible = true)Or(IsBlank(Textbox1),IsBlank(Textbox2)),Disabled,Edit)
eka24
Super User III
Super User III

There are too many brackets follow:

If( IsBlank(TextInput1_1) && TextInput1_1.Visible Or IsBlank(ComboBox1) Or IsBlank(ComboBox1_1), Disabled, Edit )

 

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.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (21,339)