Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Add line automatically in form

(0) ShareShare
ReportReport
Posted on by 786
 Hi 
 
I try to create Record attendance and absence for the course .
 
first i create new form in Course participants form  It contains field 
 
course id , employee name , date , attendance status( Present , Absent ) .
 
first it will be check start date and end date for the course .
 
such as start date 1/1/2023 and end date 1/3/2023 
 
i need to create automatically line in my form  for each date 
 
1/1/2023 
1/2/2023
1/3/2023 
 
how i cane mack this 
  • Hawra Profile Picture
    786 on at
    Add line automatically in form
    Hi 
     
    any idea
  • Hawra Profile Picture
    786 on at
    Add line automatically in form
     
    i see the link but this is only count row not insert line by line, so i want to create similar proses in calendar form 
  • Mohit Rampal Profile Picture
    12,558 Moderator on at
    Add line automatically in form
    I have shared the article which explains how to use temporary table as form datasource. The logic to populate the records should be added in executeQuery method (as specified in article).
     
  • Hawra Profile Picture
    786 on at
    Add line automatically in form
     hi GirishS 
     
    Do you know the calendar form i want to create similar proses but Depends on the start and end date of the course 
     
    I thought of using the agenda so that weekend days would not be counted .
     
     
     
    In the end, the goal of this screen is to record the attendance and absence of the participants and to calculate the attendance percentage of the course based on the total days of the course
     
     
  • Hawra Profile Picture
    786 on at
    Add line automatically in form
     
    Thank you for your replay can you give me more details how to use tmp table after create 
  • GirishS Profile Picture
    27,825 Moderator on at
    Add line automatically in form
    I am little confused here. You are getting the start and end date from the details form of "Attendance" form.
    Now you are telling that based on the setup field you need to insert record in the Attendance form.
    I can't get this point. Why you want to insert the record in the Attendance form itself?
     
    Thanks,
    Girish S.
  • Suggested answer
    Mohit Rampal Profile Picture
    12,558 Moderator on at
    Add line automatically in form
    Hi Hawra, Since your requirement is to auto populate records on opening Attendance form, I suggest to create temporary table for Attendance and populate it on runtime in form. Reason is that Start or End date of course or Agenda can be changed and in that case, you need to insert records accordingly. With temporary table, data will be cleared when form is closed and will be populated when its opened.
     
    Check this article on how to use temporary table as form datasource.
     
  • Hawra Profile Picture
    786 on at
    Add line automatically in form
     Hi GirishS 
     
    Thank you for your replay 
     
    1- create new form ( Attendance ) in Course participants form
     
    2- contains field 
     
    course id , employee name , date , attendance status( Present , Absent ) .
     
    3 - it should be check the setup in course form if != Agenda 
     
    check the stat date and end date and add line automatically in (Attended ) from for each date .
     
     
     
    4- else if the setup = Agenda 
     
    insert the date from Agenda from to attended from 
  • GirishS Profile Picture
    27,825 Moderator on at
    Add line automatically in form
    Hi Hawra,
     
    Your requirement is not clear. Can you elaborate with some screenshots.
    Also, if you want to create lines automatically you need to add the logic to loop through the start and end date and insert into the respective tables.
    For identifying where to write the code you need to explain your scenario or explain it with screenshots.
     
    Thanks,
    Girish S.
     
     
     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,217 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,978 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans