web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Toggle value to affect next field

(0) ShareShare
ReportReport
Posted on by 38

Im new in powerapps and hoping somebody could help.  Here's are my problems.  Data is being pushed to an excel file on a onedrive account.

1.  On the edit mode (second pic), i have 3 toggles which if selected to "No", i want the data on next field (date) to be blank and that field be hidden.  If there is a previous date in there, that should be deleted whenever the toggle is set to "No"

2.  On the detail screen (1st pic), will it be possible to hide date field whenever the toggle values are set to "No" and if so, how?

3.  Whenever i press edit, all the toggle values goes back to default which is "No".  How can it retain the values prior to editing?

 

IMG_3153.jpgIMG_3155.PNG

I have the same question (0)
  • Verified answer
    yashag2255 Profile Picture
    24,695 Super User 2024 Season 1 on at
    Re: Toggle value to affect next field

    Hi @peterstylias 

     

    You need to set the Visible and Update property of the datacards to do this:

    1. On the edit mode (second pic), i have 3 toggles which if selected to "No", i want the data on next field (date) to be blank and that field be hidden. If there is a previous date in there, that should be deleted whenever the toggle is set to "No"

    I am assuming that the toggle buttons are outside the datacards.
    Policy Change DataCard:
    Update: If(PolicyToggle.Value, DataCardValue2.SelectedDate, Blank())
    Visible: If(PolicyToggle.Value, true, false)

    Same need to be updated for the all the datacards and you need to enable Formula Level Error Management as:
    App Settings -> Advanced Settings -> Enable Formula Level Error Management. Also, Make sure that you are passing correct names for the controls.

    2) On the detail screen (1st pic), will it be possible to hide date field whenever the toggle values are set to "No" and if so, how?
    If you will turn off the Toggle, the date will be blank, so you can use the below expression:
    DataCard -> Visible -> If(IsBlank(ThisItem.'Target Date'),false,true)

    3). Whenever i press edit, all the toggle values goes back to default which is "No". How can it retain the values prior to editing?
    For this, set the default value of the toggle to No and on the button to Navigate to the Edit Form, add the expression as:
    Reset(Toggle1);Reset(Toggle2);Reset(Toggle3)

     

    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!

  • peterstylias Profile Picture
    38 on at
    Re: Toggle value to affect next field

    @yashag2255  I am going to try these but looking at the response for number 3, what i want to happen is for the toggle value and date value to retain its parent or existing value whenever i press edit and will only reset if i add new data.  For example, the previous data says its "Yes" and there's a date on it, when i press edit, i would like it to show the "Yes" option and the date.  Right now, what's happening is whenever i press edit, all the toggles goes back to "No".  BY THE WAY, the toggles and the date value have its own data cards

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 632 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 386 Super User 2025 Season 2

#3
wolenberg_ Profile Picture

wolenberg_ 245 Moderator

Last 30 days Overall leaderboard