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 / Setfocus to a textbox
Power Apps
Unanswered

Setfocus to a textbox

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have an app that opens to a screen1

Just textbox controls 

 

When the screen opens I need to "setfocus to"  a textbox.

I have tried using "OnVisible"  but the textbox will not gain focus.

SetFocus(txtTeam_Member)   ?

 

For the app: here is my "OnStart"

code:

Set(varFormID, Value(Param("FormID")));
If(varFormID <> 0, Set(varRecord, LookUp(eMail_Flow_Intake_Information,ID = varFormID));Navigate(Screen3))

 

I have tried it here also, at the end

 

 

 

Thanks

Dave

Categories:
  • amitchandak Profile Picture
    95 on at
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Yes, I have read through these.

     

  • NielsHakkers Profile Picture
    25 on at

    Are you using Power Apps for Teams or the Power Apps web experience?

    I noticed that Power Apps for Teams calls its text input control "Text box", while the web experience calls it "Text input".

     

    This might be significant as the SetFocus documentation on MS Docs mentions that SetFocus is only available for TextInput controls. I am trying to use SetFocus in Power Apps for Teams,

    SetFocus(TextBox3)

    and I am getting an App Checker error "The specified control cannot be focused. It may be on a another screen or inside a Form, Gallery or Component control. See SetFocus documentation for other limitations."

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Power Apps web experience

  • NielsHakkers Profile Picture
    25 on at

    If you are still stuck with this issue, then perhaps could you share a bit more info?

    From the original post, I gather that you want to focus in to TextInput called "txtTeam_Member".

     

    You also shared your OnStart, but oldy enough, this does not call the SetFocus function. After testing SetFocus in OnStart on my own, this also didn't work. I think that this is a limitation for using SetFocus and you need something else, such as a button to invoke the function.

     

    Can you share screenshots and/or more info? For example; if you use a button to invoke the SetFocus function?

  • KEarley Profile Picture
    276 on at

    Was this ever resolved?  If so, please share the resolution.

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 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard