cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bbsin
Post Prodigy
Post Prodigy

build a simple attendance report with button ? how to??

Hi 

 

This should be an easier app to build but I don't now how to.. please help me

How can user just click the check in without filling the form to get update  into my SP list which is connected.

 

1) Name and email

2) the date and time submit

3) on success a pop up to say it's success submit?

 

1.PNG

2.png

 

2) How also build in the check Out button with the date and timestamp update to SP list , pop up to say checked out and admin view button - only admin an edit)?

 

Thank you

20 REPLIES 20
v-jefferni
Community Support
Community Support

Hi @bbsin ,

 

Could you please share more details about your scenario? Would you like to let app users check in and out with one button clicking? What column type is Staff Name column?

 

If so, and assuming the Staff Name column is Person type, you could use Patch function to create check in and out records in your SharePoint List:

1\ Set variables to store user’s name, Email and department on App’s OnStart

Set(varName,User().FullName);Set(varEmail,User().Email);Set(varDepartment,Office365Users.SearchUser({searchTerm:varName}).Department)

 

2\ On Check In button’s OnSelect:

Patch(SharePointList, Defaults(SharePointList),{‘Staff Name’:{'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|"& Lower(varEmail),
Department: "",
DisplayName: varName,
Email: varEmail,
JobTitle: "",
Picture: ""}
StaffEmail: varEmail,
Department: varDepartment,
‘Check In’: Text(Now(),DateTimeFormat.ShortDateTime24)
}
)

 

3\ On Check Out button’s OnSelect:

Patch(SharePointList, First(SortByColumns(Filter(SharePointList,StaffEmail=varEmail),”Chick_%2_In”,Decending)), {‘Check Out’: Text(Now(),DateTimeFormat.ShortDateTime24)})

 

If the Staff Name column is Text type column, formulas would be simpler:

On Check In:

Patch(SharePointList, Defaults(SharePointList), {‘Staff Name’:varName,StaffEmail: varEmail,Department: varDepartment,‘Check In’: Text(Now(),DateTimeFormat.ShortDateTime24)})

 

4\ Set OnSuccess of Check In button to:

Navigate(CheckInSuccessPopUpScreen)

 

5\ Set OnSuccess of Check Out button to:

Navigate(CheckInSuccessPopUpScreen)

 

6\ Set DisplayMode of Admin button with an If statement to check if it is an admin account.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Hi @v-jefferni v-jefferni

 

the staffname is just a singe text box as currently O365 is still not available on our end.

the default for it I have set to User().Full Name

Staff email - User().Email

is there one for department as I type User().department it's not working ??

 

thus the above syntax will be different right. ?

 

How to enable the user when they click check in Button will show the day registered events and  and check in accordingly?   update to SP list based on their email and event title and later check out?

 

thanks.

 

 

v-jefferni
Community Support
Community Support

Hi @bbsin ,

 

I don't understand why you could use SharePoint or Power Apps but O365 is not available...

 

For now there is no way to get users' departments without Office 365 Users connector.

 

For the second, could you please share more details about your scenario? What is the "registered events" you referred to? What columns does the SP list include?

 

Best regards,

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

yes, cos our organization PowerApps is currently not connect to O365.. maybe till year end 

I am puzzled too.. ha

bbsin
Post Prodigy
Post Prodigy

Hi Jeffer 

 

Thank you for your reply

1) Staff Name column - using User().Name - text - that is auto pick from PowerApps

 

Let me try your app given.

Thank you

bbsin
Post Prodigy
Post Prodigy

Hi Jeffer

 

I saw April Dunnam booking reservation Can I incorporate your Check in ad out button command into it?

as I create a main page to navigate the check in.

1.PNG

but it just cannot capture the data into SP list?

 

not sure if you can help.

bbsin
Post Prodigy
Post Prodigy

i have another question, this simple check in button works and pick up the data.

2.png

 

how to create 

1) Venue - where by admin an input back end and set a limited eg 4 slot for the day to book in the booking form?

1.PNG

 

and last is the check out - to set a time eg if event end at 12pm, user can only log out at 12 to 1220pm?

 

Thank you

v-jefferni
Community Support
Community Support

Hi @bbsin ,

 

This two questions are off-topic, you'd better post a new thread with your whole scenario. May be some other users in community have made an app with similar scenario then would be more helpful.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

 

bbsin
Post Prodigy
Post Prodigy

thanks.. let me try to it.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,123)