Skip to main content
Microsoft logo
Power Apps
    • AI Builder
    • Automate processes
    • Azure + Power Apps
    • Build apps
    • Connect data
    • Pages
    • Take a guided tour
  • Pricing
    • Overview
    • Become a Partner
    • Find a Partner
    • Find partner offers
    • Partner GTM Resources
    • Blog
    • Customer stories
    • Developer Plan
    • Documentation
    • For IT Leaders
    • Roadmap
    • Self-paced learning
    • Webinars
    • App development topics
    • Overview
    • Issues
    • Give feedback
    • Overview
    • Forums
    • Galleries
    • Submit ideas
    • User groups
    • Register
    • ·
    • Sign in
    • ·
    • Help
    Go To
    • Power Apps Community
    • Welcome to the Community!
    • News & Announcements
    • Get Help with Power Apps
    • Building Power Apps
    • Microsoft Dataverse
    • AI Builder
    • Power Apps Governance and Administering
    • Power Apps Pro Dev & ISV
    • Power Apps Portals
    • Connector Development
    • Power Query
    • GCC, GCCH, DoD - Federal App Makers (FAM)
    • Power Platform Integration - Better Together!
    • Power Platform Integrations
    • Power Platform and Dynamics 365 Integrations
    • Community Blog
    • Power Apps Community Blog
    • Galleries
    • Community Connections & How-To Videos
    • Community App Samples
    • Webinars and Video Gallery
    • Canvas Apps Components Samples
    • Kid Zone
    • Emergency Response Gallery
    • Events
    • 2021 MSBizAppsSummit Gallery
    • 2020 MSBizAppsSummit Gallery
    • 2019 MSBizAppsSummit Gallery
    • Community Engagement
    • Community Calls Conversations
    • Experimental
    • Error Handling
    • Power Apps Experimental Features
    • Community Support
    • Community Accounts & Registration
    • Using the Community
    • Community Feedback
    cancel
    Turn on suggestions
    Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
    Showing results for 
    Search instead for 
    Did you mean: 
    • Power Apps Community
    • Galleries
    • Community App Samples
    • Re: Power Apps Timesheet Template

    Re: Power Apps Timesheet Template

    12-14-2020 21:38 PM

    Sanjaysy
    New Member
    27129 Views
    LinkedIn LinkedIn Facebook Facebook Twitter Twitter
    aprildunnam
    aprildunnam Memorable Member
    Memorable Member
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    Power Apps Timesheet Template

    ‎07-21-2020 07:24 AM

    In this video I showcase my Power Apps Timesheet Template which lets you submit and keep track of weekly timesheets.

    In this video you'll learn about:

    ✅ Repeating Tables in Power Apps

    ✅ ForAll()

    ✅ How to Patch new and existing records

    ✅ Working with Collections

     

    The Power Apps Template and Flow to provision the list can be found here: https://github.com/aprildunnam/PowerApps/tree/master/Timesheet

    watch?v=A8SiNTnQw0Q

    Labels:
    • Labels:
    • Formulas and Controls
    Message 1 of 20
    28,773 Views
    8 Kudos
    Reply
    • All forum topics
    • Previous Topic
    • Next Topic
    • « Previous
      • 1
      • 2
    • Next »
    Mo_Islam
    Mo_Islam Helper III
    Helper III
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎08-05-2020 09:28 AM

    Hi @aprildunnam 

     

    Thank you so so much for this amazing tool. I have learnt a lot from this and in particular it is exactly what I needed for a timetabling application I am creating.

     

    You can see here in the screenshot how I am using your concept. I am using a Sharepoint calendar/List as my data source:

    Mo_Islam_0-1596644392123.png

     

    The initial challenge I faced was to be able to add multiple lessons for the same course, and using the patch function I am able to.

    in a previous screen i have an Add button:

    ClearCollect(timeEntriesCollection,
    {
        LessonNo: 1,
        Attendees:"",
        Course: "",
        Category: "",
        Location: "",
        'Start Time': Now(),
        'End Time': Now()
    });
    Navigate(AddEvent,ScreenTransition.None);

     

    On the Add Event Screen, the + button:

    Select(Parent);
    Patch(
        timeEntriesCollection,
        ThisItem,
        {
            LessonNo: Value(lblLessonNo.Text),
            'Start Time': StartDatePicker.SelectedDate + Time(Value(ddStartHour.Selected.Value), Value(ddStartMinutes.Selected.Value),0),
            'End Time': EndDatePicker.SelectedDate + Time(Value(ddEndHour.Selected.Value), Value(ddEndMinutes.Selected.Value),0)
        }
    );
    Collect(
        timeEntriesCollection,
        {
            LessonNo: lblLessonNo + 1,
            'Start Time': DateAdd(StartDatePicker.SelectedDate,7,Days) + Time(Value(ddStartHour.Selected.Value), Value(ddStartMinutes.Selected.Value),0),
            'End Time':DateAdd(EndDatePicker.SelectedDate,7,Days) + Time(Value(ddEndHour.Selected.Value), Value(ddEndMinutes.Selected.Value),0)
        }
    )

     

    And the Save button:

    ForAll(
        galleryClassAdd.AllItems,
        Patch(
            'Timetable Test',
            Defaults('Timetable Test'),
            {
                Course: toptxtCourse.Text,
                Location: toptxtLocation.Text,
                'Start Time': If(Checkbox1.Value=false, StartDatePicker.SelectedDate + Time(Value(ddStartHour.Selected.Value), Value(ddStartMinutes.Selected.Value),0), StartDatePicker.SelectedDate + Time(0,0,0)),
                'End Time': If(Checkbox1.Value=false, EndDatePicker.SelectedDate + Time(Value(ddEndHour.Selected.Value), Value(ddEndMinutes.Selected.Value),0), EndDatePicker.SelectedDate + Time(23,59,59)),
                Attendees: TeacherSelector.Selected,
                Category: CategorySelector.Selected,
                LessonNo: If(Not(CategorySelector.Selected.Value="Weekend"),"Session - " & lblLessonNo.Text)
            }
        )
    );
    Refresh('Timetable Test');
    Reset(TeacherSelector); Reset(toptxtCourse); Reset(CategorySelector); Reset(toptxtLocation);
    Set(successMessage,"Event added successfully");Navigate(SuccessScreen)
                

    Adding the event works wonders, however I am unable to make the editing of a selected item work.

    The formula in the edit screen does not accept the same Collect codes:

    Mo_Islam_1-1596644816821.png

     


    Any ideas what I might be doing wrong here?

    Your input will be greatly appreciated. I love your videos as I learn a lot.

     

    Thanks,

    Mo

    • @
    Message 2 of 20
    27,720 Views
    0 Kudos
    Reply
    aprildunnam
    aprildunnam Memorable Member
    Memorable Member
    In response to Mo_Islam
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎08-05-2020 10:45 AM
    Hey there - Can you share what the error is you're getting on the edit screen? Most commonly this is because of a data mismatch issue. For example, field A is a Number value in one use case but a text in another.
    Message 3 of 20
    27,714 Views
    0 Kudos
    Reply
    Mo_Islam
    Mo_Islam Helper III
    Helper III
    In response to aprildunnam
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎08-06-2020 12:33 PM

    Hi @aprildunnam ,

    I've sent you a PM with a link to video which probably would be easier to see the codes.

    However, the errors as soon as I add the Collect formulas gives me this:

    Mo_Islam_0-1596742337931.png

     

    And then everything else breaks.

     

    Message 4 of 20
    27,700 Views
    0 Kudos
    Reply
    Mo_Islam
    Mo_Islam Helper III
    Helper III
    In response to aprildunnam
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎08-13-2020 08:37 AM

    Hi @aprildunnam , I was wondering if you've had a chance to look at my errors. Thank you.

    Message 5 of 20
    27,661 Views
    0 Kudos
    Reply
    Sanjaysy
    Sanjaysy
    New Member
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎12-14-2020 09:38 PM

    Hi @aprildunnam ,

     

    This is something i was looking for a long time. Thank you very much.

    When i tried to import "TimesheetProvisioner_20200721042207.zip", I'm getting following error,

     

     "The solution file is invalid. The compressed file must contain the following files at its root: solution.xml, customizations.xml, and [Content_Types].xml. Customization files exported from previous versions of Microsoft Dynamics 365 are not supported."

     

    can you please help me with this,

     

    Regards,

    Sanjay

    Message 6 of 20
    27,129 Views
    1 Kudo
    Reply
    Anonymous
    Not applicable
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎07-29-2021 10:15 AM

    Hi April, 

     

    Wow! I am looking to implement this in my company but we do not use SharePoint. Is that an issue? Do you have an excel template?

     

    Thank you, 

    Skye 

    Message 7 of 20
    21,990 Views
    0 Kudos
    Reply
    AbleAmazing
    AbleAmazing
    Frequent Visitor
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎09-01-2021 09:26 AM

    Hello @aprildunnam ,

     

    Thank you so much for creating this template. It's helped me (a complete newcomer to Power Apps) tremendously with an immediate requirement. I'm having an issue wherein the weeks in the ddWeeks control are suddenly no longer starting on the current Monday as they were previously:

    AbleAmazing_0-1630512923929.png

     

     

    AddColumns(
        weeksList,
        "WeekEnd",
        DateAdd(
            Value,
            6,
            Days
        ),
        "Week Display",
        Value & " to " & DateAdd(
            Value,
            6,
            Days
        )
    )

     

     

    I haven't made any changes to the code on this control. Any ideas? 

     

    Additionally, I added a few new fields and I'm having an issue wherein the selection in a new drop-down field is not saved when multiple entries are saved at once.

     

    Here's me saving them: 

    AbleAmazing_3-1630513672296.png

     

    Here's how they appear in My Timesheets after saving:

    AbleAmazing_4-1630513743829.png

     

    The value in the drop-down on the first option is seemingly lost. Any idea what could be driving that? 

     

     

    • Template
    • timesheet
    Message 8 of 20
    21,164 Views
    0 Kudos
    Reply
    Anonymous
    Not applicable
    In response to AbleAmazing
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎09-05-2021 03:01 AM

    Hi @AbleAmazing I am having exact the same problem. Have you figured out any solution for that? If yes, could you please share? 

     

    Thanks

    Message 9 of 20
    21,008 Views
    0 Kudos
    Reply
    ElifP
    ElifP
    Regular Visitor
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎12-07-2021 07:03 AM

    Hi April, thank you for this, it's amazing! How can I get the manager of the person filling in the form? or  ask them to select their manager?

     

    Message 10 of 20
    18,274 Views
    0 Kudos
    Reply
    • « Previous
      • 1
      • 2
    • Next »

    Power Platform

    • Overview
    • Power BI
    • Power Apps
    • Power Pages
    • Power Automate
    • Power Virtual Agents

    Browse

    • Sample apps
    • Services

    Downloads

    • Windows
    • iOS
    • Android

    Learn

    • Documentation
    • Support
    • Community
    • Give feedback
    • Blog
    • Partners

    • © 2023 Microsoft
    • Follow Power Apps
    • Privacy & cookies
    • Manage cookies
    • Terms of use
    • Trademarks
    California Consumer Privacy Act (CCPA) Opt-Out Icon Your California Privacy Choices