Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Different multiple if conditions in visible property

Posted on by 36

I have created tabbed structure where i applied following code in the visible property of my DataCard in my form  i.e. variabletabselected=2, and again i have to apply another visible property like if(datacardvalue.Value=true,true,false).

 

so i have to apply both visible formulae in the same datacard. i tried with below formulae, but not working.

if(datacardvalue.Value=true&&variabletabselected=2,true,false)

 

Please help me solving this issue.

 

Thanks in advance

Mahesh

  • WarrenBelz Profile Picture
    WarrenBelz 143,487 on at
    Re: Different multiple if conditions in visible property

    Hi @Mahesh005 ,

    From what you have posted, the Visible property needs to be

    variabletabselected = 2 && datacardvalue.Value

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • BideyYusuf Profile Picture
    BideyYusuf 387 on at
    Re: Different multiple if conditions in visible property

    Hey @Mahesh005 try the below solution. let me know if it works for you.

  • BideyYusuf Profile Picture
    BideyYusuf 387 on at
    Re: Different multiple if conditions in visible property

    In this case @Mahesh005 , you dont have to base the visibility on the same condition as the Tab.

    You just need to base the control on the action of the field. 

    e.g. if your YES/NO column name in sharepoint is Status.

    and you have a field description.

    on the Visible property of description, put ::

     

    If(statusDatacard.Value,true,false)

     

    this should solve your issue. you will need to put this in all the visible properties of the fields you want to be visible.

     

    If you want to disable the field... put:

    If(StatusDataCard.Value,DisplayMode.Disabled,Parent.DisplayMode).

     

    Hope this Helps @Mahesh005 

    Mark as solved if it does. cheers.

  • Mahesh005 Profile Picture
    Mahesh005 36 on at
    Re: Different multiple if conditions in visible property

    hi @BideyYusuf 

     

    =I am trying to achieve the requirement with nested if. still not working.

     

    Thanks

    Mahesh

  • Mahesh005 Profile Picture
    Mahesh005 36 on at
    Re: Different multiple if conditions in visible property

    My Requirement is like. by clicking on button in the gallery it will show some of the fields in the form as shown in below figure.

     

    Mahesh005_0-1667984855778.png

    Mahesh005_1-1667984894437.png

     

    One Visible condition is as show in above figure. and another visible condition some of the fields has to be disabled according to the yes/no column in sharepoint list.

     

    so i am trying this with this forumula in the datacard visible property but no luck.. if(datacardvalue.Value=true&&variabletabselected=2,true,false)

     

    Thanks 

    Mahesh

     

  • BideyYusuf Profile Picture
    BideyYusuf 387 on at
    Re: Different multiple if conditions in visible property

    @Mahesh005  Then you dont need another Datacard value to control the visibility of the Tab, the Tab toggle between HIDE VISIBILITY AND SHOW VISBILITY by just clicking it.

    for example.. use this code on select property of the tab. NOTE!, this depends on how many TABS you have in your app.

     

    On the Tab Select put If(variabletabselected=1,Set(varshowFields,0),Set(varshowFields,1))

    on the visible property of the datacard itself, put If(varshowFields=1||varshowFields=-1,true,false).

     

    if you dont understand, kindly send the snapshot of your form lets see how we can work together on it.

  • Mahesh005 Profile Picture
    Mahesh005 36 on at
    Re: Different multiple if conditions in visible property

    Hi @BideyYusuf 

     

    data card is inside the Getting Ready button.

     

     

    Thanks

    Mahesh

  • BideyYusuf Profile Picture
    BideyYusuf 387 on at
    Re: Different multiple if conditions in visible property

    @Mahesh005 Must the 2 conditions be true? 

    2ndly, you havent answer the question on where the Datacard is. is it outside the component control or within the same Datacard control.

     

    Did you see the Gif Image i sent, was that exactly what you wanted to achieve? Answering all these will help us to understand what you wanted to do, otherwise we will just be sending codes which wont work for your scenario.

  • Mahesh005 Profile Picture
    Mahesh005 36 on at
    Re: Different multiple if conditions in visible property

    Yes @BideyYusuf 

     

    Please provide the code for applying multiple conditions on visible property. 

     

    Thanks 

    Venkatesh

     

    Thanks 

    Mahesh

  • BideyYusuf Profile Picture
    BideyYusuf 387 on at
    Re: Different multiple if conditions in visible property

    @Mahesh005 Is this what you were trying to achieve?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,487

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,014

Leaderboard