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

Notifications

Announcements

No record found.

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 
I have the same question (0)
  • GirishS Profile Picture
    27,827 Moderator on at
    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.
     
     
     
  • Hawra Profile Picture
    786 on at
     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 
  • Suggested answer
    Mohit Rampal Profile Picture
    12,565 Moderator on at
    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.
     
  • GirishS Profile Picture
    27,827 Moderator on at
    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.
  • Hawra Profile Picture
    786 on at
     
    Thank you for your replay can you give me more details how to use tmp table after create 
  • Hawra Profile Picture
    786 on at
     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
     
     
  • Mohit Rampal Profile Picture
    12,565 Moderator on at
    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
     
    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 
  • Hawra Profile Picture
    786 on at
    Hi 
     
    any idea

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 559 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 464 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans