cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Stijn007
Advocate III
Advocate III

After patch in a form , the screen jumps at the top

Hello, 

 

A user request was  to save when a datacardvalue has changed. So i use the patch function in the onchange property of the datacardvalue. 

Is it possible that after a Patch  the screen stays at his position and does NOT jump to the top. so the user can fill all the fields but on the background it is saved by changing. 

 

Submit form closes the form. so that doesn't do the trick. 

 

7 REPLIES 7
eka24
Super User
Super User

Please show the formula you used in the onchange of the datacardvalue. Also a screen shot of your form as the problem occurred could help

 

@eka24 

Patch('Incident andere SO';TemplateGalleryList1.Selected;{ Aankomstplaats: DataCardValue27.Text})

 

After the patch is done, the screens jumps to the top. So if a user is busy to fill in one the last fields of the form he has to scroll down again. 

 

Exact same issue here.

When onchange is set to submitform for each field in a powerapps form it scrolls the user to the top of the form! How to fix?

I used a workaround with Set( MyVar, x) to

divide my form by visibility

 

On select property  tab 1: Set ( MyVar, 1 )

On select property tab 2 : Set( MyVar, 2) 

.....

visibility property of datacard : if ( Myvar = “x” , true , false)

 

so you can set the first datacards visibility to fit in the first “screen.” 
the next datacards have visibility set on 2 ,

.... 

 

@Stijn007 Could you elaborate a bit more on your work around?

@noneother ,

 

I created three buttons to divide my fields so they don't jump anymore. (button 06-14 / 14-22 / 22-06 ) 

 

Stijn007_0-1592806838604.png

Set the onselect property of the button to the desired variabel. ( in my case , value = "06" for my first  button , "14"  for my second button,...) 

you can choose the variabel name and his value. use the expression set( Variabel ; X ) 

Stijn007_1-1592806982600.png

Set the datacardvisibility to the desired variabel so only this cards are shown when the variabel is this value

Stijn007_3-1592807363680.png

For best practices, set the onvisibility property of the screen to the first variabel value. 

Stijn007_4-1592807491201.png

 

 

KrishnaV
Community Champion
Community Champion

Hi @Stijn007 ,

 

I really appreciate your workaround. However let me take a min to explain how the forms work in PowerApps, in screen onSubmit of the form with the button click the form will be repainted/reloaded by the Power App engine. So, It will also set the tab index to top of the page.

 

Having said that your approach is the right approach it is not a workaround.

 

I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,768)