Please I’m developing an HR System in NAV 5.0 - SQL Option. I have created a job opening Card where the user can select a Job for an Opening (every Job has a unique code).
I also have a field called “No. Available”, which should display the number of employee(s) that have been assigned that particular selected Job in the employee table.
The Idea I have is: OnValidation of “Job Code”, it should go into the Employee Table and count the number of times the “Job Code” appears.
Experts, please, I would like to know if it’s OK and how to achieve this using the FIND and a Counter.
A flowfield can be use to take values/information from another table given that a relationship exists. What you would need to do is to create a field on the Job Opening tables of type integer and change the FieldClass property to flowfield. Then change the Calcformula to count the Employee where the Job code matches. Have a look at standard flowfields for an example e.g. No. of Quotes of the customer table.
At first, I left the calculation method to be “Sum” and I had an error. Then I went and had a look at the No. of Quotes of the Employee table and I realissed my mistake… the calculation method should have been “count.”
Count(Employee WHERE (Job Title Code=FIELD(Job Code)))
Thank you so much Dave. You have indeed helped me and it has really made my day.