Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Toggle or interchange the text

I want to toggle and interchange the text between two text boxes for example if i have the textbox1 text=hello and textbox2 text=world then i want that the interchange the values mean textbox1 text=world and textbox2 text=Hello.

Responsive Resident
Responsive Resident

i suppose you would like to do it when a button is pressed or may be a different event.



On form -  OnVisible: UpdateContext({text1:"Hello",text2:"World"})

On each textinput - Default: text1 and Default: text2


On button OnSelect: UpdateContext({text1:text2,text2:text1})


I've tested and it works fine. Of course we can place the command from OnSelect on a different controls'event.



Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,534)