Bhubaneswar, Odisha, India
+91-8328865778
support@softchief.com

Set focus on a control of a canvas app screen when the screen loads

Set focus on a control of a canvas app screen when the screen loads

This is a very common requirement of customers and its quite obvious that the system should automatically focus on first control so that without clicking on the control we can start typing the value directly.

Microsoft Power Apps Canvas provides a PowerFX by using which we can achieve this functionality. Let us see how we can do this.

Step:1 – Open Canvas App with screen

I have created a Canvas App with a form to enable record creation of a table. The below form is used to create student record. But when I open the app the full name field is not auto focused rather I have to manually select the field to enter the value. Now we will fix this.

Step-2: Open App in Editor and add PowerFX on Visible event of Screen

Now to do this task open the canvas app editor and select the screen having the create student form. Choose the screen and open OnVisible action property and mention the PowerFX “SetFocus(DataCardValue19)“. for me the control name is “DataCardValue19”. Use your control inside the SetFocus. Run the app to test.

Test the App

After providing the function if you run the app it will auto focus the first field. Note that if directly open the same screen to test it will not work. Run a different screen and navigate to the create screen then it will work.

Hope this helps

You can enroll now !We are giving 30% discount on our Internship Program

Don’t miss the chance to participate in the upcoming Internship Program which will be done using Microsoft Dot Net Web Development Full Stack Technology. The new batch will be starting from May 20, 2024.  We will have most experienced trainers for you to successfully complete the internship with live project experience.

Why to choose Our Internship Program?

Industry-Relevant Projects
Tailored Assignments: We offer projects that align with your academic background and career aspirations.
Real-World Challenges: Tackle industry-specific problems and contribute to meaningful projects that make a difference.

Professional Mentorship
Guidance from Experts: Benefit from one-on-one mentorship from seasoned professionals in your field.
Career Development Workshops: Participate in workshops that focus on resume building, interview skills, and career planning.

Networking Opportunities
Connect with Industry Leaders: Build relationships with professionals and expand your professional network.
Peer Interaction: Collaborate with fellow interns and exchange ideas, fostering a supportive and collaborative environment.

Skill Enhancement
Hands-On Experience: Gain practical skills and learn new technologies through project-based learning.
Soft Skills Development: Enhance communication, teamwork, and problem-solving skills essential for career success.

Free Demo Class Available