PL-100 · Question #248
You are developing a canvas app to monitor time. The app includes a Text Input control named TIC1 and a Timer control named TIM1. You need to set TIM1 to a default value. What should you do?
The correct answer is B. Assign the Text property of TIC1 to the Duration property of TIM1. In Power Apps canvas apps, the Timer control (TIM1) has a Duration property that determines how long the timer runs (in milliseconds). To set a default value for the timer using a Text Input control, you bind the Duration property of TIM1 directly to the Text property of TIC1…
Question
Options
- AWrite code in the OnChange property of TIC1 that assigns the value of the Duration property of
- BAssign the Text property of TIC1 to the Duration property of TIM1.
- CSet the Text property of TIC1 to the current system time.
- DAdd the clock icon to the app and use the OnSelect property to set the Duration property for
How the community answered
(21 responses)- A5% (1)
- B95% (20)
Explanation
In Power Apps canvas apps, the Timer control (TIM1) has a Duration property that determines how long the timer runs (in milliseconds). To set a default value for the timer using a Text Input control, you bind the Duration property of TIM1 directly to the Text property of TIC1. This creates a live data binding: whatever numeric value the user types into TIC1 automatically drives the timer's duration. Option A is wrong because OnChange is an event handler, not a property assignment via binding. Option C sets TIC1 to system time but doesn't connect it to the timer's Duration. Option D introduces an unnecessary clock icon and misuses OnSelect for this purpose. The correct declarative approach in canvas apps is property-to-property binding: TIM1.Duration = TIC1.Text.
Topics
Community Discussion
No community discussion yet for this question.