Forum Discussion

Henrik Stentebjerg Tobiassen's avatar
Mar 09, 2017

Make field visible depended on other field - Powerapps

Hi,

 

I am trying to make this date recieved field visible if the checkbox is checked and not visible is the checkbox not is checked. Can't really get it to work. Any suggestions ?

 

22 Replies

  • Shouldn't it be:

    If(Received.Value=false, false, true)

    ??

     

    I don't think you need the 'Selected' option here and if you inclose the expected value of the toggle in double quotes it means you are expecting the output to be a string while the output of the toggle is actually a boolean. It outputs true or false, not "true" or "false".

    Please correct me if I'm wrong.

    • WinfredLiu's avatar
      WinfredLiu
      Brass Contributor
      You are correct.

      You can simply set Visible = Received.Value
  • Wes Preston's avatar
    Wes Preston
    Brass Contributor

    Older question, new functionality. :) Just wanted to make sure this was on the thread now that it's rolling out: Rules capabilities to show/hide and other.
    https://powerapps.microsoft.com/en-us/tutorials/working-with-rules/ 

     

    UPDATE: New link for rules article: 
    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/working-with-rules  

     

    • Kamna Lohia's avatar
      Kamna Lohia
      Copper Contributor

      Hi Wes,

       

      The following link https://powerapps.microsoft.com/en-us/tutorials/working-with-rules/  seems to be not working now.

      Do you have any alternate link?

      • Wes Preston's avatar
        Wes Preston
        Brass Contributor
        Looks like they may have moved the article as part of the document restructure. Try this:
        https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/working-with-rules
  • Rodney Craigo's avatar
    Rodney Craigo
    Brass Contributor

    Hi,

    In the OnVisible property of your screen, create a Context Variable and set it's value to false.

     UpdateContext({cVisible: false})

     

    Then set the calandar controls Visible property to to the context variable, in this example that would be cVisible

     

    On the check box control set the OnCheck property to update the Context variable

     UpdateContext({cVisible: true})

     

    You can reset the context variable in the checkbox OnUnCheck property to reset as well

    to get a toggle effect.

     UpdateContext({cVisible: false})

     

    Hope this helps.

    • MarcoNardi's avatar
      MarcoNardi
      Copper Contributor

      Rodney Craigo 

      These were short and sweet instructions! Very elegant!!!

       

      I modified this to work on a search box, hid the gallery until something was entered on the search box. Turned on a loading icon until data was retuned. It worked really well!

      Thank you.

       

      • Doomglazer's avatar
        Doomglazer
        Copper Contributor
        MarcoNardi
        Im looking exacly for what you have modified. Could you share the code with me?
        Thanx in advance
    • bprater's avatar
      bprater
      Copper Contributor
      This is awesome, learnt something today.

Resources