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!