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 / link a toogle to a tex...
Power Apps
Answered

link a toogle to a text field

(1) ShareShare
ReportReport
Posted on by 9

Hello

On an edit form, I put a toggle button.
I am connected to a sql server database on a "task" table
I have a "status" field that is required in the database.
I would like that when I open the screen (with a database record, a task), the status value was retrieved on the "status" field and, if the status is "done", the toogle button is checked and if the value is "to do", the toogle is unchecked.
After that, if you change the toogle value, the "status" field also changes.
In short, I would like to replace my text field which can take two values (done, to do) by a toogle and that it is updated in the database
Could you help me, please?

 

2018-06-05_12h04_29.jpg
Categories:
  • Verified answer
    Dawidvh Profile Picture
    1,346 on at

    Hi @zerony

     

    You can hide the status text input and change the TextInput.Default to

    If(Toggle1.Value,"done","to do")

    Change the Toggle.TrueText to "done", and the false text to "todo"

     

    Make sure that the toggle is in the same card as the text input by unlocking the card on the right hand pane

     

    On the Toggle1.Default you can specify 

    If(Parent.Default="done",true, false)

     

    I hope I didn't miss anything, please let me know if you don't come right.

     

  • zerony Profile Picture
    9 on at

    It works! Thank

  • Dawidvh Profile Picture
    1,346 on at

    Awesome, have a great day.

  • smharrod Profile Picture
    33 on at

    It works great. Thank 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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard