Notifications
Announcements
Hello!
I have an app that features a number of training courses. Users click on a button and are brought to a Microsoft Forms quiz. If they pass, the training course is marked off as complete. It all works just fine, except users would have to navigate off the screen or close the app and reopen in order to see their training course update to complete. So I put a Timer on the screen to refresh the data every 5 seconds. I have multiple data sources--one for each course quiz and one for the training courses themselves. I have text on the screen linked to the course quizzes that updates their score with the Timer. That works fine as well. However, the training course themselves do not get checked off as complete. I see in the data (SharePoint List) that the course should be checked off, but it's not refreshing like the course quiz scores. The code for the refresher timer is the same as the course quizzes. I figure it has something to do with the toggle control that I am using to show users a course is checked off. The refresh timer just isn't updating the toggle control. Any help would be greatly appreciated.
Hello @sironman,
Could you please share the code used to set your toggle controls?
I'm not sure which code you need to see. Here's the Timer Refresh Code:Refresh TimerHere's the default value for the Toggle Control:Default Value for ToggleAnd here are some of the properties for the Toggle control:
Toggle Control PropertiesToggle Control Properties
Thank you @sironman.
Not quite sure I'm understanding how your app is set up. Is the toggle part of a form that uses "MY Training Plan" as a source? If so, could you please share the Data source and Item properties of your form?
And this is not what you were asking for, but your OnCheck and OnUncheck properties are probably not working as intended. To set the value for DatacardKey1_2.Text, you will have to set the "Text" property of the control DatacardKey1_2 to something like:
If(DGMQOverviewValue.Value,"Completed on " & Today(),"Not yet completed")
Yes, the toggle part of the form uses "MY Training Plan," which is a SharePoint List as its data source.
varCurrentRecord is the variable I am using to track what training plan the user clicked on from a collection on a previous screen.
Here is the Form Data source info:
And thanks for the advice about the OnCheck and OnUnCheck properties. I did something similar to what you suggest. That must be leftover from an earlier version. Users don't even really interact with these toggles anymore. They are just for show. The only way to check off a course is to complete the quiz. The user can't click on the toggles.
Thanks for sharing the additional information, @sironman.
If I see this correctly, your form is set to edit mode. The controls will only get updated once the form is submitted.
Could you try inserting a form in view mode with the same data source and item property, and the datacard for the toggle controls? The date of the form in view mode should be updated when the data source is refreshed.
I just tried changing the form to View Mode, but even if it updates, it won't work for me. There are hyperlinks to the courses on the form and there are some other courses in which I need users to type into text fields, so as far as I know, I need the form in edit mode. I wonder if there is a workaround to this issue. I'll have to do some thinking.
So assuming having the form in View mode would solve your problem: Why not have two forms on your screen, one in View mode, one in Edit mode? You could only include the "informational" controls on the View form, and the interactive ones on the Edit form.
The alternative would be to include toggles outside of your form and use the lookup formula for your toggles' default values to display the current values from your data source.
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 711 Most Valuable Professional
Michael E. Gernaey 319 Super User 2025 Season 2
Power Platform 1919 268