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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Tooglebutton control v...
Power Apps
Answered

Tooglebutton control via data table

(0) ShareShare
ReportReport
Posted on by 356

Hello community,

I have another problem. I have a data table (name: DataTable1_2). This data table is filled via a SharePoint list. The data table then shows 5 columns. One column has the name "AU_Rein". This column has either a 0 or a 1.

There is also a tooglebutton on the app screen.

 

Now I want to click on a record in the data table. And if there is a 1 in the "AU_Rein" column, the default value of the toogle button should automatically be set to True, otherwise the toggle button should automatically be set to False.

 

Can I solve this with a formula? If yes how?

Thank you for your help.

Best regard RoScha

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @RoScha 

    Consider the following formula for your Default property of your Toggle Control.

       DataTable1_2.Selected.AU_Rein = 1

     

    Assuming it is a numeric column.  If not, replace with "1" instead if it is text.

     

    This will set your toggle on if the selected item has a 1 in the AU_Rein column.

     

    I hope this is helpful for you.

  • RoScha Profile Picture
    356 on at

    @ RandyHayes

    Why are the solutions sometimes so simple with PowerApps. I have already noticed in many places that I think too complicated.
    My Excel knowledge is hindering me because I think, as in this case, I have to create a complicated if-then formula.

    But your tip worked great. Thanks a lot for this.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @RoScha 

    PowerApps is very simple...the more you overthink it, the harder it is.  Keep It Super Simple!!

     

    Actually, your Excel knowledge of Formulas is very welcome in PowerApps - most come to PowerApps with heavy development knowledge and that drives everything into over complex and difficult.  Simple, Simple!

     

    Glad it worked well for you.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard