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?
@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
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!