Is it possible to set a Toggle to reset and then change the view to hidden after the reset?
I have a form that once the user has toggled the question to true I want that toggle to reset to false and then to become hidden.
Thanks for any help,
Please clarify, do you want to submit the form once the toggle is selected? Do you want to hide the toggle or the form it's on? Do you want the toggle hidden if the question is answered as "true"?
Yes, I would like the form to submit and then reset to false and the toggle to no longer be visible. Currently the form is setup that on toggle to true it writes the current date and time to an excel table. What I want is once this has been completed I want the toggle to reset to false so the next time the user goes into this form it does not update the excel field again because its been changed back to false. and then if the toggle is no longer visible they cannot re toggle it to true.
If you set the visible property of the toggle to
IsBlank(Parent.Default)
and the Reset property can stay false. Then, if there is no information for that answer, the toggle will be visible (like when the form is in New mode). It will also be visible if the user has submitted the form but hasn't answered the question and then goes back to answer it. However, once the user has answered the question, Parent.Default will not be blank so the toggle will be hidden.
@Drrickryp This would work but unfortunately the form is never new they will go back into the form multiple times until all toggles have been checked. Is there a way to do this when editing the form?
Thanks for all your help,
Are you saying that you want the toggle disabled on change even before the data is saved to Excel? The solution I suggested will not allow the User to change the toggle once the question is answered and the form has been saved, no matter how many times the user may return to it.
Your solution only works if the form is starting as a new form off the start. In my case the form has already been created for each month of the year so the user is going in and switching toggles to true through out the month till completed. Every time they toggle to true and click save this updates the excel sheet.
When the user goes back into the form anything that is toggled to yes updates again on the excel sheet which is what I dont want. So my thought where to reset the toggle after the user clicks save and the next time they go into the form it would be disabled/hidden so they didnt hit the toggle again.
Perhaps is there a way in my current formula that on check if the toggle is already true do nothing but if false and then switched to true update the excel sheet? Below is the current formula on check.
If(DataCardValue1.Value=true,Patch(Table1,LookUp(Table1,Month=DataCardValue2.Text),{'Monthly Defibrillator Inspection Completed?':Now()}))
Thanks for the info! It really helps to have more context to understand how you can accomplish your goal. Could you post a screenshot of the one with the form on it.
Hi @J0hn
I think I got it. See if this works for you. The relevant formulas are shown in red
The toggle is only visible when the Parent.Default of the card is blank.
The textinputbox inside the card is DisplayMode.View and the Default of the textinputbox will fit one of three conditions.
Here is a screenshot of the Excel spreadsheet for this example.
User | Count |
---|---|
150 | |
100 | |
89 | |
78 | |
57 |
User | Count |
---|---|
194 | |
186 | |
106 | |
99 | |
91 |