cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

when submitting a new form it will flash an older form for a second

Hello,

 

 

I need some help with my submit form button, as you can see in the video whenever I submit form it will flash for a second the first form(name) on the gallery list

 

bugquestion.gif

 

 

Any suggestion on how to solve this????

 

Thank you very much,

GK

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Advocate I
Advocate I

Re: when submitting a new form it will flash an older form for a second

Hello

 

Thanks to @eag768 I have found the solution, which is to add NewForm(EditForm1)  on the OnSelect of the Sign In Button:

SubmitForm(EditForm1);NewForm(EditForm1)

View solution in original post

6 REPLIES 6
Highlighted
Helper I
Helper I

Re: when submitting a new form it will flash an older form for a second

I'd suggest you make form invisible before executing the submitform . Also Id use a nice loader picture while for m is hidden.

i
Highlighted
Community Support
Community Support

Re: when submitting a new form it will flash an older form for a second

Hi @GK_BPL,

 

Could you please share a bit more about the Edit form within your app?

 

I have made a test on my side and don't have the issue that you mentioned. The GIF image as below:Test1.gif

 

 

Within the second screen (which contains the Edit form), set the OnSelect property of the "Sign In" button to following formula:

SubmitForm(Form1)

Set the OnSuccess property of the Edit form control (Form1) to following formula:

Navigate(Screen3,ScreenTransition.Fade);ResetForm(Form1)

On your side, please take a try to add the following formula within the OnSuccess property of the Edit form control within the second screen:

ResetForm(EditForm1)

Note: The EditForm1 represents the Edit form control within your second screen.

 

Add the following formula within the OnSelect property of the "Sign In" button within the first screen:

ResetForm(EditForm1);NewForm(EditForm1)

Then check if the issue is solved on your side.

 

Please also take a try to enable/turn on the "Render in classic mode" option within Advanced Settings of App settings (App settings-> Advanced Settings-> "Render in classic mode"), then re-load your app to check if the issue is solved.

 

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.
Highlighted
Advocate I
Advocate I

Re: when submitting a new form it will flash an older form for a second

Hello,


I'll begin with explaining my app better, as a first task my new employer has given me the staff sign in and out app to create instead of using the paper sheets where staff member write the sign in and out time.

We will put a tablet at the entry so everyone can just sign in or sign out.
I have never used powerapps or sharepoint before so I guess I have made I mistake somewhere.

 


So I created a new list in sharepoint and within it I created 4 new column, Your Name(which is a loookup field for person in the company), Sign In Time(I added Today Date and Time), Sign Out(Yes/No), Sign Out Time(Date and time Column).
And then I click the button to generate an app.


Inside the App I added a new screen1 in which you can either click on Sign In or Sign Out buttons.

IF SIGN IN BUTTON :
Sign In Button has in OnSelect:

NewForm(EditForm1);Navigate(EditScreen1, ScreenTransition.UnCover)


In EditScreen1, Staff member will select their name from the Your Name field and click on Sign In button which has this command in OnSelect:

SubmitForm(EditForm1)


The form will be submitted and then go back to screen1 and automatically on the sharepoint list you will be able to see their name and their Sign in Time, Sign Out will be by default No, and Sign Out Time will be Empty.
(The problem here is once you click on Sign In, there will be this bug that will show other people name for a second, usually the name will be of the person whos name is first in the gallery screen list)

IF SIGN OUT BUTTON:
Sign Out Button has in OnSelect:

 Navigate(BrowseScreen1,ScreenTransition.UnCover)


In BrowseScreen1 This is Going on:
BrowseGallery1 in Items has this as a command :

SortByColumns(Filter('Staff Sign In/Out', StartsWith(Your_x0020_Name.DisplayName, TextSearchBox1.Text), Sign_x0020_Out = false), "Title", If(SortDescending1, Descending, Ascending))


Basically it will only show people who on the Sign Out yes/no has false(no) on it.
Staff members will find their name from the list and click on their name which has a command to :

Navigate(DetailScreen1, ScreenTransition.None)


Once they are on their DetailScreen1 staff members can see their name and sign in time and will click on the Sign Out Button which has this command in OnSelect :

UpdateContext({EditRecord:Patch('Staff Sign In/Out', LookUp('Staff Sign In/Out', ID=BrowseGallery1.Selected.ID), {Sign_x0020_Out_x0020_Time : Now(), Sign_x0020_Out : true })});Reset(TextSearchBox1);Navigate(Screen1,ScreenTransition.UnCover)


Basically it saying that once the staff member click here it needs to write down the Time at the moment of the click in the Sign Out Time column and to Turn from no(false) to yes(true) on the Sign Out Column and then navigate to Screen1

The app is working and doing everything just as I want it to apart from flashing another user name for a second when you sign in or out


Highlighted
Advocate I
Advocate I

Re: when submitting a new form it will flash an older form for a second

in the last code there is a smiley face, its not supposed to be there it should be

UpdateContext({EditRecord:Patch('Staff Sign In/Out', LookUp('Staff Sign In/Out', ID=BrowseGallery1.Selected.ID), {Sign_x0020_Out_x0020_Time : Now(), Sign_x0020_Out : true })});Reset(TextSearchBox1);Navigate(Screen1,ScreenTransition.UnCover)
Highlighted
Advocate I
Advocate I

Re: when submitting a new form it will flash an older form for a second

i do not know why but it puts the smiley face, sorry

it is supposed to be EditRecord : Patch

Highlighted
Advocate I
Advocate I

Re: when submitting a new form it will flash an older form for a second

Hello

 

Thanks to @eag768 I have found the solution, which is to add NewForm(EditForm1)  on the OnSelect of the Sign In Button:

SubmitForm(EditForm1);NewForm(EditForm1)

View solution in original post

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (5,501)