cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JB4
Level: Powered On

Form first field to edit

Hi all,

 

Just wondering if you can help.

 

I have a simple app with a form that is opened from a button on the front page. The form contains 20 fields and so has a scroll bar.

 

When the button is selected the form opens however by default the 12th field is highlighted and as it is a text box the keyboard pops up (on android).

 

Is there anyway to control which field should be edited first, i.e. the first field.

 

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Form first field to edit

Hi @JB4,

 

Do you want to set a focus on a specific Data card or field within the Edit form of your app?

 

If you want to set a focus on a specific Data card or field within the Edit form of your app, I afraid that there is no way to achieve your needs in PowerApps currently.

 

If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

As an alternative solution, you could consider take a try to highlight the the specific field within the Edit form, and when you open this Form, give you a prompt info to fill the specific field firstly.

 

I have made a test on my side, please take a try with the following workaround:7.JPG

 

6.JPG

 

 

Set the OnSelect property of the "Navigate" button to following formula:

NewForm(EditForm1);
Navigate(EditScreen1, ScreenTransition.None);
Notify(                                        /* <-- Add this formula */
  "Please fill the highlighted field within the form firstly!",
   NotificationType.Warning
) 

Set the Fill property of the TextInput box within the specific field Data card to following formula:

RGBA(255, 255, 0, 1)

The GIF image as below:Test1.gif

 

 

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Form first field to edit

Hi @JB4,

 

At the present time, there is no way to set focus on a particular card.  This has been a suggested idea.  As a work around, I would suggest that you use an UpdateContext variable in the screen's OnVisible property to set the visibility properties of the cards in the first 7 to true and ones below that initially to false and then toggle the visibility using a button.  In the example, the screen's OnVisible property is set to UpdateContext({vis:true}), the first 7 cards Visible property is vis, the rest of the cards are !vis, The Next button OnSelect is UpdateContext({vis:!vis}), its Visible property is vis, the Back button OnSelect is UpdateContext({vis:true}), its Visible property is !vis, the save button DisplayMode property is If(vis,DisplayMode.Disabled,Edit) and its Visible property is true.

 

1stPage.PNG2ndPage.PNG

 

 

 

 

 

 

Community Support Team
Community Support Team

Re: Form first field to edit

Hi @JB4,

 

Do you want to set a focus on a specific Data card or field within the Edit form of your app?

 

If you want to set a focus on a specific Data card or field within the Edit form of your app, I afraid that there is no way to achieve your needs in PowerApps currently.

 

If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

As an alternative solution, you could consider take a try to highlight the the specific field within the Edit form, and when you open this Form, give you a prompt info to fill the specific field firstly.

 

I have made a test on my side, please take a try with the following workaround:7.JPG

 

6.JPG

 

 

Set the OnSelect property of the "Navigate" button to following formula:

NewForm(EditForm1);
Navigate(EditScreen1, ScreenTransition.None);
Notify(                                        /* <-- Add this formula */
  "Please fill the highlighted field within the form firstly!",
   NotificationType.Warning
) 

Set the Fill property of the TextInput box within the specific field Data card to following formula:

RGBA(255, 255, 0, 1)

The GIF image as below:Test1.gif

 

 

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

JB4
Level: Powered On

Re: Form first field to edit

Thx for the work arounds, but exactly what I'm looking for.

 

I like the idea of splitting the form by having next button and controlling the visibility, perhaps even adding a save at each press of the next.

 

The second workaround is not really what i would like.

 

The problem as such is not to select a particular field as the focus but to prevent the form from opening half way down. My form currently has 20+ fields and so a scroll bar. however when navigating to the form rather than the screen being at the top of the form, it jumps down about half way and a particular field is highlighted and the keypad appears (on android).

 

This is new behaviour for the form as this was not happening in the early stages, however I cannot trck it back to a particular change I may.

 

Thanks

Super User
Super User

Re: Form first field to edit

Hi @JB4,

 

Remember that once you save the form when it is in New mode, it will write to the data source as a new record.  Subsequent changes to that record will require that the form be in Edit mode and an Item property will be required that identifies the record being edited ie. Form1.LastSubmit.  You would have to adjust your Next button accordingly. 

 

I don't know why the behaviour of your form has changed, so this may not be the answer you wanted.  I kind of like avoiding scrollbars particularly in forms with many cards as they can be difficult to use on some hand held devices.  If the solution works for you please mark it solved.  Hope it helps you.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,621)