Skip to main content

I have a user who would like have his form autocalculate the number of hours worked per week and it must be required that it is 40 hours or more.  How do I calculate the hours worked per week?  Also, is there a way to set a date range?  For example, this user would like to have an option to select date ranges from Monday through Friday.  The way I have it setup now is with a starting date and ending date but he feels people may not select the right dates.  Let me know if this makes sense.  I have attached what my form looks like so far.  


15681i4EAC79D54948189B.png

Hello Kurtze

 

Try the following steps and see if it help.

 

1. You can change the Drop-Down List(s) under the Hours Worked Label and make it either a Text Box which you will set to be a read only that contains an auto calculated numbers of Hours Worked, or a Data Label with the same properties.

2. From Hours Worked Text Boxes configure the validation that will allow integers greater than or equal to 40 when the user select Ending Week Date, else it should fire up a message telling the user that his/her working hours are less than the minimal Hours Worked required or anything like that.

3. Add the expression under Hours Worked Text Boxes/Data Labels that express the calculation of Hours Worked.

4. Then configure a rule from Ending Worked Date calendar that will fire when the user selects his/her Ending Week Date. The rule should fire from Hours Worked Text Box/Data Label (in other words the rule should fire when the Ending Working Date calendar is selected and then Hours Worked Text Box/ Data Label must immediately give out the Hours Worked output)

5. I would recommend that Starting and Ending Week Date calendar be changed to Date/Time Data Type so that calculations can be done on the bases of Hours Worked Instead of Days Worked since the auto calculated output unit is in Hours.

 

For the Dates range, I don’t understand whether you want your Dates to auto match the current day of the final Work Date or you want the Dates to be both selectable by a user whilst at the same time the last or current Work Date matches the present Date and time, and prevent a user from selecting the previous Date order than the current Date?

 

Let me hear from you.

Cheers…


Reply