cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NielsHakkers
Frequent Visitor

SetFocus to TextBox in Power Apps for Teams

Hi team,

I think that I discovered a bug in the Power Apps for Teams port.

In Power Apps for Teams you have a "Text box" input that behaves like you would expect. However, this input control has a different name in the Power Apps web experience. On the web, a text input control is call "Text Input".

 

This change causes issues when you try to use the SetFocus function, as "Text box" is technically not part of the available controls for SetFocus.

 

Continueing on this difference in Power Apps for Teams, I think it is unwise to have different naming for the same control on different platforms, as it can cause confusion by trying to follow the documentation on MS Docs, or any other tutorial that mentions the TextInput control (which cannot be found in Power Apps for Teams...).

3 REPLIES 3
NielsHakkers
Frequent Visitor

Bump?

Cam
Kudo Commander
Kudo Commander

I have a feeling SetFocus() might not be working at all in Dataverse for Teams, with any of the Fluent Controls.

I've tried labels/text, both inside of scrolling screens, inside forms, and just on the screen;

I cannot get the SetFocus() function to work with any of them 😞

 

Works fine in ordinary Canvas Power Apps, just not in Power Apps for Teams.

 

 

"Continuing on this difference in Power Apps for Teams, I think it is unwise to have different naming for the same control on different platforms"

Don't stress too much about this, Microsoft is in the process of converging the Canvas Power App Maker / Model-Driven App Maker (and presumably the Teams Apps Maker), into a single App Maker experience.

 

i assume the intention, is that we will be using Fluent controls in the future.

There wont be a difference in the future.

 

============================================================

 

so what work around can you do now?

- create a Canvas App

- insert a Text Control

- copy that Text Control

- create a Power Apps for Teams App

- paste the Text Control from the Canvas App into the Power Apps for Teams App

 

see picture

 

so cool that you can do this 😄

 

serious warning time.. not sure if this is a good idea to do this.. probably-definitely not supported, and may break in future

 

works, but not sure if a good ideaworks, but not sure if a good idea

 

 

ManishM
Microsoft
Microsoft

This is still the issue. I changed my app strategy (which was constructed with layout containers for responsiveness) to redo it without the containers but still the issue is lingering. Now @Cam, the copy from canvas app of text box is also not working; not that I tried it before but going with your work-around. I am unable to copy/paste text box between the two. I hope they fix it really soon.

Helpful resources

Announcements
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.

Top Solution Authors
Top Kudoed Authors
Users online (2,833)