SOLVED

Check-in Check-out

Brass Contributor

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.  

chudson002_0-1635034653856.png

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

1 Reply
best response confirmed by chudson002 (Brass Contributor)
Solution

Figured 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()})

 

 

1 best response

Accepted Solutions
best response confirmed by chudson002 (Brass Contributor)
Solution

Figured 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()})

 

 

View solution in original post