cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

Formula does not block button

I had a formula that would print error and block button if field is not filled:

 

If(DataCardValue3.Selected.Value= "Legal Change" && IsBlank(DataCardValue4.Text);Notify("Fill Legal Change";NotificationType.Error);Navigate(Screen2;Fade))

I tried to update it to also validate whethere DataCardValue3 has any value selected, so I made it like that:

 

If(DataCardValue3.Selected.Value= "Legal Change" && IsBlank(DataCardValue4.Text);Notify("Fill Legal Change";NotificationType.Error);Navigate(Screen2;Fade));;If(IsBlank(DataCardValue3.Selected.Value);Notify("Chose at least one change type";NotificationType.Error);Navigate(Screen2;Fade))

Now previous validation works OK, but new validation allows to go to the next screen (Screen2) it just shows warning Chose at least one change type.

So I guess it detect correctly that DataCardValue3 has no selected value from multi drop down (combo - this field allow to pick more than one changes).

 

Does anyone know where did I make mistake?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: Formula does not block button

Hello,

 

Replacle your formula by

 

If(
IsBlank(datacardvalue3.Selected.Value);
Notify(
"Chose at least one change type";
NotificationType.Error
);
If(
datacardvalue3.Selected.Value = "Legal Change" && IsBlank(datacardvalue4.Text);
Notify(
"Fill Legal Change";
NotificationType.Error
);
Navigate(
Screen2;
Fade
)
)
)

View solution in original post

2 REPLIES 2
Highlighted
Frequent Visitor

Re: Formula does not block button

Hello,

 

Replacle your formula by

 

If(
IsBlank(datacardvalue3.Selected.Value);
Notify(
"Chose at least one change type";
NotificationType.Error
);
If(
datacardvalue3.Selected.Value = "Legal Change" && IsBlank(datacardvalue4.Text);
Notify(
"Fill Legal Change";
NotificationType.Error
);
Navigate(
Screen2;
Fade
)
)
)

View solution in original post

Highlighted
Helper IV
Helper IV

Re: Formula does not block button

It works flawlessly. Thank you

@aurelo 

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (4,296)