web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Canvas App to show sta...
Power Apps
Unanswered

Canvas App to show status of machines using toggle buttons

(1) ShareShare
ReportReport
Posted on by 15

I have created a canvas app with a custom UI that has toggle buttons and labels for each toggle, displaying username and datetime when a user selects the toggle. The toggle button patches this information to a MS List.
Whenever I play the app it shows me the default view where all the toggle buttons are OFF,

for instance I have 5 machines with status ON or OFF, by default the status is OFF, when I select a toggle for machine 1 it gets turned On and the status is updated in MS list as ON, but when I close and play the app again the toggle is OFF for machine 1.
I want the app to collect the information from MS List and then show the information as and when it is opened or played.

Any leads how to achieve this.

 

Categories:
I have the same question (0)
  • Bilakanti Profile Picture
    1,226 on at

    @pujaclb You can set the default property of the toggle to the MSlist column value.

    Ex: MSList.<columnname>

  • Verified answer
    iAm_ManCat Profile Picture
    18,228 Most Valuable Professional on at

    Let's assume you have a list, and you are patching to it (as you've said), and I assume you will have columns for the MachineName, MachineStatus and a Username column where you store the user's email address (as display name is not a unique identifier)

     

    Make the Default of each toggle the following, while changing the values for each to match the machine each toggle is for:

    LookUp('DataSource Name', MachineName = "Machine 1").MachineStatus

     

    The above does assume that you have one list for all machines, rather than a row for each user. If you need to also filter by user then you will need something like this (assuming you are currently storing User().Email when you patch):

    LookUp('DataSource Name', MachineName = "Machine 1", UsernameColumn = User().Email ).MachineStatus

     

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.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard