web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Timesheet - multiple n...
Power Apps
Unanswered

Timesheet - multiple names at the same time

(0) ShareShare
ReportReport
Posted on by 151

I want to make a timesheet where the date and time attributed to several people at once.
Date and time are two text boxes with Today and Now "hh:mm".
I tried to select multiple names from a list box but got "false" as name. The data source is an Excel file on my OneDrive.
Could it be done? How?

Categories:
  • Brian Dang Profile Picture
    3,976 on at

     If I understand your need, you are trying to assign multiple people to the same time block on a timesheet.

     

    You will need to nest one gallery into another gallery.

     

    In the example below, my outer gallery is just ["Team 1","Team 2","Team 3",...]. My inner gallery uses a formula that Filters which names are associated with which team.

     

    2016-10-25.png

     

     So you might have your outer gallery, Gallery1, be the dates and times needed for your timecard. Your nested gallery, Gallery2, will be created inside Gallery1. It will need a formula like below:

    Filter(Gallery2,DateColumnAssociatedWithEachPerson=ThisItem.Date)

    This will show names of people whose names are associated with the given datetime.

     

    I can clarify more if I know what your datasource looks like.

     

  • OlaH Profile Picture
    151 on at

    Thank you so much mr-dang for your advice but it's not really what I had in mind. I'm trying to make an timesheet app for an after school center and I want to report when every kid goes home. And they don't go home at the same time every day. Not like your great idea of teams. 
    I'd like to be able to pick several kids, like in a list box, and assign them at the same time.
    Something like this.

     

    timesheetapp.png

      

  • Brian Dang Profile Picture
    3,976 on at

    Got it. I would recommend using Gallery1 with those names rather than a ListBox. This will allow you to reference each entry with:

    Last(FirstN(pupils,#)).Name

    Gallery1 will not fit inside the Form, so this solution would work independent of one. So rather than using SubmitForm, you could setup a Timer control that Patches for the number of items selected the Gallery1. This method will need to manually reference each argument in the Form, but it will Patch automatically. See @hpkeong's post for more information.

    checkicon.OnSelect:
    UpdateContext({savenames: true, iter: 0})
    Timer1.Text: iter
    Timer1.AutoPause: false
    Timer1.AutoStart: savenames
    Timer1.Repeat: savenames
    Timer1.Start: savenames
    Timer1.OnTimerEnd:
    If(savenames,
    If(iter<CountRows(Gallery1.AllItems),
    UpdateContext({iter: iter+1});

    Patch(goinghome,Defaults(goinghome),
    {Date: TextInput1.Text,
    Time: TextInput2.Text,
    Pupil: Last(First(pupils,iter)).Name
    }
    ),

    UpdateContext({savenames: false});
    NewForm(Form1)
    )
    )

     

    This formula will Patch until the iteration number, iter, is equal to the number of items selected in your Gallery of names. It will count up one each time. At its conclusion, it will stop the timer and clear the form.

  • OlaH Profile Picture
    151 on at

    Thank you ever so much mr-dang for your edwise and effort to help.

    The thing is, I'm just a curios guy who just started looking at Powerapps and read the tutorials. Therefore I'm not really sure what you mean. I'll never used Patch but I'll try my best.

    Perhaps I'll be back or perhaps you could help me with a more detailed instruktion. 

  • OlaH Profile Picture
    151 on at

    Hi again

    I believe this is just what we're looking for but I'm a beginner at Powerapps and need a more detailed instruction. 

    Could someone help me?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard