function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
khushbu dubeykhushbu dubey 

can u explain me how to calculate daily attendance of an employee through formula field in salesforce?

Siddharth.SinhaSiddharth.Sinha
Hi Khushbu

There is very less information to predict an answer. Can you elaborate on how is your application design ?
Do you have have an Attendence object which is a lookup to the User Object ?

In case not, then please note that each day each staff must trigger soething which calculates his attendence, like the id card sweep in your company. I think you can create a custom button in your application which must be clicked by the employee logged in, which will increment the counter (initially set as zero, and needs to be be reset every month).

Calculating attendence depends how your application is designed. If you have static hard coded values then it may be possible via formula.

 
khushbu dubeykhushbu dubey
Hello,
Siddharth

Actually im currently working in payrol management system..so i have an attendance field to calculate  no of days employees present
Parker EdelmannParker Edelmann
You may want to consider a login flow that fires when a user first logs in. You will need an attendance object (Child of User [Providing employees are users. If not another solution will be needed]) and a report to accomplish this. First, the flow makes sure the login is within business hours, to ensure a record isn't created for a day they shouldn't be paid, like a sunday login. Next,the flow queries if there is a login record for that user with today's date stamped on it. If a record is found, the flow ends. If not, the flow creates a new record and copies down the specifics of the login to the attendance object. Here's where the report comes in. Each record will then constitute a day that an employee should be paid, counted by the record count. If you need more help on this, please ask.

Thanks,
Parker
Siddharth.SinhaSiddharth.Sinha

Hi Khushbu

It seems your payroll management system is a custom app made on salesforce.
Assuming that this application will be used by an HR. I like the answer suggested by Parker above as well.
I don't think you have the necessary know-how at to design a system functionality/module. Attendence can be a formula field only if there are other data in an attendence object. There is no direct magic formula.

Please get in touch with an experienced salesforce developer to get the solution according to your application.