cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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

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
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)

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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (20,659)