cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Partisan
Post Partisan

Re: App not storing storing infromation and refreshes

So the Monday Patch works well when you submit, the only issue is after submitting and you click back on the edit screen the submit icon comes out as an error even though it has already worked. Also for the patch for Tuesday there's an error displayed as it doesn't work. Also the formula used on Tuesday how would it be constructed for Wednesday and so on. would it be exactly like the lookup patch formula used on Tuesday but the days changed and if so would the formula still collect information on both Monday and Tuesday submission; example: 

Patch(WeeklyTimeSheet, LookUp(WeeklyTimeSheet, Title=ID&& Emp_Name:EmpName), {Wed_Activity:WedAct.Selected, Wed_Contract:TuesContract.Selected,Wed_Start:DataCardKey41_1,Wed_End:DataCardKey42_1})

 

Also for the error on the submit icon on the Monday page, it works at the first click but you go back to edit the form the icons has that error mark on it:

Screenshot (166).pngScreenshot (167).png

Highlighted
Dual Super User III
Dual Super User III

Re: App not storing storing infromation and refreshes

So lets take a specific case.  On Monday there are probably two different patch events.  1) when you check-in which makes the record.  That one uses the Patch() with defaults 2) When you Check-out.  At that point the record exists so you need the Patch() with the Lookup() to find and patch the record created when you checked in.  

 

That means either separate buttons for Check-in and Check-out or an IF() to determine whether the record exists before patching.  The assumption would be that other days would all assume the record was created on Monday at Check-in.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Dual Super User III
Dual Super User III

Re: App not storing storing infromation and refreshes

Can you show me the error messages?



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Post Partisan
Post Partisan

Re: App not storing storing infromation and refreshes

If I was to create a separate check in and out button then how would I construct the patch formula for submit icon.

 

Also in regards to the error message on the submit icon, there was none, also as I said before the submit works at first  but when you click back on the page it has the red error sign on it. 

Below is an image (the formula box is blocking the submit icon):

Screenshot (168).png

Highlighted
Dual Super User III
Dual Super User III

Re: App not storing storing infromation and refreshes

You wouldn't have a single submit button.  You would have two submit buttons.  One for Check-in and one for Check-out.

 

If you get the red X after a run you can see the error by looking at the error checker (Stethoscope with a red dot in the upper right.)



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Post Partisan
Post Partisan

Re: App not storing storing infromation and refreshes

Initially I had a check in and check out button for the times, so whenever they were clicked it would submit the date&time along with the form, but because of the variable I used the date and time button was not displaying the current time and date on some occasions, which led me to do it this way. So If I make a submit button again I might do it in that same format that I previously had it on but how would I incorporate the patch function to the separate buttons.

 

Also I checked the flow checker for the error but there wasn't one for that specific icon on the Monday screen.

Screenshot (169).pngScreenshot (170).png

Highlighted
Dual Super User III
Dual Super User III

Re: App not storing storing infromation and refreshes

Just use the correct Patch() function for each button.  I assume the Check-In button would have a patch that uses default to create a new record.  The Patch() for the Checkout button would use a Lookup() and update the checkout times.

 

With the number of errors you've got its hard to tell which error is the one you are seeing.  But there is definitely an error message there somewhere.  I would suggest starting out by cleaning up all the other errors before you try to fix the OnSelect buttons.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Community Support
Community Support

Re: App not storing storing infromation and refreshes

Hi @SandraAkujobi ,

 

You need to refer to the control value in Patch function, rather than the control itself. Try to use dot notation to refer the value of control.

For example:

Patch(WeeklyTimeSheet, LookUp(WeeklyTimeSheet, Title=ID&& Emp_Name:EmpName), {Wed_Activity:WedAct.Selected.ColumnName, Wed_Contract:TuesContract.Selected.ColumnName,Wed_Start:DataCardKey41_1.SelectedDate,Wed_End:DataCardKey42_1.SelectedDate})

Sik

Highlighted
Post Partisan
Post Partisan

Re: App not storing storing infromation and refreshes

With my check in and check out button, both on the default function I have a date/time variable in the formula box so where would the patch function come into play with that. Would the patch formula be put before the set variable formula or after. Also if doing it this way then would it be fine to remove the submit icon seeing as when they clock in, it will automatically submit the information that's on the page and vice versa with the clock out button.

 

Screenshot (175).png

Highlighted
Post Partisan
Post Partisan

Re: App not storing storing infromation and refreshes

As you can see in the images.

The same error icon that was on the submit icon before has now appeared on the MonC/I button as I've now added in the patch formula onto the button and gotten rid of the icon. Like I've said previously the button works there's no issue at all but afterwards when you go back onto the page after clicking on it the error icon appears. 

The First image the MonC/I button is fine before you click and then after clicking on it and you go back to the page what you'll see is what's in the 2nd Image and also on the right hand side there is no error message related to the button. 

Screenshot (176).png     Screenshot (180).png

 

In the 3rd image, the MonC/O button also has an error the formula doesn't seem to be correct. This same error was also visible on the Tuesday C/I button as well

Screenshot (184).png    Screenshot (183).png

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,714)