Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
#817416
Hi,

Grateful if a hand can be offered to me to solve the following problem.

I am using a grid to let instructors to record the students' attendance and number of hours attended in training.
The 3 columns of the grid is defined a follows.
Student Name (text), Attendance (dropdown), Attended Hours (text)
The options of the dropdown are "Present", "Absent" and "Withdraw".

When the form is loaded, the student list is loaded into the grid. The default values of Attendance and Attended Hours are "Present" and the duration of the training respectively.

Then the instructor only needs to input the actual attended duration of a student if the student is late, otherwise, the Attended Hour would be the default value.

If a student absent or withdraw from the training, the Attended Hours has to set to zero,
i.e., when the instructor select "Absent" or "Withdraw" from the dropdown of the Attendance of a student, the value of the Attended Hour of that student will change to zero accordingly.

Grateful if I can be advised the javascript that can work this out.

Thousand Thanks in advance.

cheers,
Karl
#817419
Hi Karl,

The JS functions that work with grids can be found here:

https://wiki.processmaker.com/3.2/JavaS ... thods/Grid

You will want to use the grid.setValue() function. To get the row number, you will want to set up a loop that counts through the rows. There are a lot of code examples on the Wiki page that should give you a good place to start. I hope this helps.
Want to create your own meme coin?

In the world of cryptocurrencies, a unique and exc[…]

The market for cryptocurrencies is demonstrating a[…]

What's SAP FICO?

Embarking on a dissertation can be one of the most[…]

Hello. For rental housing, there are software solu[…]