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 / Allowing a user to cre...
Power Apps
Answered

Allowing a user to create multiple records with same date and then allow other users to work against the record

(0) ShareShare
ReportReport
Posted on by 31

Hi All,

 

I'm still new to Power Apps development, so apologies if this is a simple task and I am not seeing an obvious solution. My question goes like this:

I have a process in which an "admin" user who oversees training for a group of other users needs to have them confirm that they attended the training session. I have built out a table with approximately 250 users in SharePoint Online who need to confirm that they have attended the session. I originally used a date picker and just had it default to Today(), but my admin user has said that they do not want their user base to be able to select any date. Rather, my user wants to define the date of the session, and then each of the users logs into the app and confirms that they attended the session. 

 

My original thought was to use a ForAll function and date input, where my users selects the date of the submission and then hits go, and essentially, 250 records would be written to the list with just the date filled out, based on a count of the number of users in my user table, and then users would go in and just hit "attest". Is this the correct way to go about it? Would this work? Or is there another way to approach it?

 

Hopefully this made sense, but I do appreciate any guidance that the community can provide. Thank you!

Categories:
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @APowerAppNewb :

    Do you want to create 250 records with the same date at once? If so , I've made a test for your reference:

    1\My Data source :

    vbofengmsft_0-1650265007189.png

    2\My Formula:

    Collect(Bof0418,ForAll(Sequence(250,1,1) As A,{Title:Text(A[@Value]),DateAndTime:DatePicker1.SelectedDate}))

    vbofengmsft_2-1650265456199.png

     

    The Result:

    vbofengmsft_1-1650265422217.png

    Best Regards,

    Bof

     

  • APowerAppNewb Profile Picture
    31 on at

    Hi Bof,

     

    This is super helpful, and thank you for such a fast response! I really appreciate it. I have two follow-up questions:

    1. Would you mind walking me through the formula? I'm familiar with individual functions within it, but I would really like to develop a deeper understanding of the thought process you used to create it.

    2. I would like to slightly refine the question: I have two tables. One table has a list of consultants in it. The second table is the table that you created above with the records with the same date. What I would like to do is instead of using a sequence of 1 to 250, use the number of people in the first table as the number of records to generate in the second table. That way, if a user is added or removed from the first table, the number of records created in the second table changes dynamically.

     

    Thank you again for your guidance!

     

    PowerAppNewb

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @APowerAppNewb ,

     

    Please try:

    Collect(
     Bof0418,
     ForAll(
     Sequence(CountRows(PeopleList),1,1) As A, 
     {
     Title:Text(A[@Value]),
     DateAndTime:DatePicker1.SelectedDate
     }
     )
    )

     

    The collect function can submit multiple records at once.

     

    vbofengmsft_0-1650337500503.png

     

    The ForAll function is used to build a table with 250 records.

     

    vbofengmsft_1-1650337556284.png

     

    Best Regards,

    Bof

  • APowerAppNewb Profile Picture
    31 on at

    Thank you very much, Bof. I really appreciate all the insights and help!

  • APowerAppNewb Profile Picture
    31 on at

    Hi Bof,

     

    This is a follow-up to my previous question, as I have run into an issue. In your above example, you showed how I could use the CountRow function to dynamically sequence the number of records to create with the Forall function. In my case, I have 241 distinct records. I was able to define three of the fields that are created in the resulting records: 

    1. Session Date

    2. Default Response

    3. UserResponse Date(Set to Today()). 

     

    However, I have run into a problem with the last column I need to patch: I want to use the People List you referenced and patch each record created with 1 unique value from that list. IE, when the App finishes the OnSelect function, each of the 241 individual users in the PeopleList are also included in the new records. 

     

    I originally created a collection with the details of all users, and tried to use the distinct function to see if that would print out each user, but that did not work. I know that if I use the User() function, all 241 records will have my information, but I couldn't figure out how to have 241 individual separate users created.

     

    Thanks!

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 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard