cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ccomins
Level 8

Setting height value when two visible unlike variables are true

I have a canvas screen which also has a form with a single datacard and a menu which is a group of icons and a quckactionbar. 

 

Both the menu and form items are toggled with buttons to be visible/hidden. The form sits under the menu when both are visible.

 

I have made it so if the Menu is visible or the Form is visible the canvas adapts to the right height, however, I cannot get it to adjust to the correct hight when both hidden items are visible. 

 

Menu Bar Variable: Menu

Form Variable: imgform

 

This is what I have tried:

If(imgform=true,808,Menu=true,870,imgform=true & Menu=true,626,957)

But I get an incompatible type error. 

 

Any help is appreciated.

Thank you.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Setting height value when two visible unlike variables are true

Hi @ccomins 

 

This is not working as expected because of the order that you have defined in the if loop.
 
If the first expression is satisfied then it will return the value, without even looking for the remaining conditions and this is the reason you are getting incorrect height value. Can you try to modify your expression as:
 
If(imgform=true && Menu=true,626,imgform=true,808,Menu=true,870,957)
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
3 REPLIES 3
ccomins
Level 8

Re: Setting height value when two visible unlike variables are true

I went ahead and made it so only one of the fields will be visible at a time. 

On the Menu button I did:

Set(Menu,!Menu) & Set(imgform,false)

And set the form toggle button to:

Set(imgform,!imgform) & Set(Menu,false)

This will work for my needs, however, I would still like to know how this could be done if possible.

Thank you

Super User
Super User

Re: Setting height value when two visible unlike variables are true

Hi @ccomins 

 

This is not working as expected because of the order that you have defined in the if loop.
 
If the first expression is satisfied then it will return the value, without even looking for the remaining conditions and this is the reason you are getting incorrect height value. Can you try to modify your expression as:
 
If(imgform=true && Menu=true,626,imgform=true,808,Menu=true,870,957)
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
ccomins
Level 8

Re: Setting height value when two visible unlike variables are true

Thank you.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 55 members 4,301 guests
Please welcome our newest community members: