Oct 23 2021 05:26 PM - edited Oct 23 2021 05:27 PM
Hello Community,
Have created a check-in and check-out app that works beautifully "only" if the app stays open.
Scenario: Member checks in for work, i.e. 0800, closes app. End of day, member opens app again and checks out, 1600. Need to be able to call the record back when checking out.
Additionally, the member works overtime that day and needs to access the same record 2 more times. At the end of the day, the entry should look like the below.
Have 4 different buttons for each entry. Cannot get the button to work upon opening the app 2nd, 3rd and 4th time. Again, all 4 entries work great as long as the app is open.
Any recommendations?
V/R
chudson002
Oct 23 2021 06:50 PM
SolutionFigured it out!!!!!!!
Button: TWCheck-in
Set(
CurrentCheckedinRecord,
Patch(
CheckInOut,
Defaults(CheckInOut),
{
Employee: User().FullName,
TWin: Now(),
Division: ddDiv.Selected,
Remarks: Remarks1.Text
})); Reset(ddDiv); Reset(Remarks1);
Button: TWCheck-out
UpdateIf(CheckInOut, !IsBlank(TWin), {TWout: Now()})
Button: OTCheck-in
UpdateIf(CheckInOut, !IsBlank(TWin), {OTin: Now()})
Button: OTCheck-out
UpdateIf(CheckInOut, !IsBlank(TWin), {OTout: Now()})
Oct 23 2021 06:50 PM
SolutionFigured it out!!!!!!!
Button: TWCheck-in
Set(
CurrentCheckedinRecord,
Patch(
CheckInOut,
Defaults(CheckInOut),
{
Employee: User().FullName,
TWin: Now(),
Division: ddDiv.Selected,
Remarks: Remarks1.Text
})); Reset(ddDiv); Reset(Remarks1);
Button: TWCheck-out
UpdateIf(CheckInOut, !IsBlank(TWin), {TWout: Now()})
Button: OTCheck-in
UpdateIf(CheckInOut, !IsBlank(TWin), {OTin: Now()})
Button: OTCheck-out
UpdateIf(CheckInOut, !IsBlank(TWin), {OTout: Now()})