Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

I try to count the exact amount of days that are listed in a timesheet portal.

For example: in the portal are working hours listed from a person; the person can create multiple records on one day. The portal can contain more than -for example- one 12/12/2003. My question is:

Is it possible to show in a calculation field the exact amount of days that are listed in the portal?

I found a way, but I'm quite sure there are other possible approaches. Look at the files if it fits your solution.

I used three calculation fields in the Timesheets.fp5 file to resolve the duplicate dates for every person:

- c.eliminateDoubles puts for unique dates "1" and for duplicates "0"

- c.countDoubles counts the number of duplicates for every date of a person

- c.addDoubles finally puts for unique dates "0"; for the duplicates it puts "1/c.countDoubles" = 1

In Main.fp5 the calculation field c.days sums then for every person:

"Timesheets::c.eliminateDoubles + Timesheets::c.addDoubles"

AmountofDays.zip

Another approach would be to use the ValueListItems function (if you've got it).

Create a value list, use values from a field, related values only, same relationship as portal, Date field.

Create a calculation field, Unstored, =

PatternCount ( ValueListItems (Status(CurrentFileName), "value list name"), "

AmountofDays.zip

  • Author

Thank you Brugmann and Fenton! This works well. smirk.gif

I go one step further;

Now I need to Count the overtime hours (from the portal) that are made each day. Problem is, is that there are multiple records in each day.

This would be a logical calculation if the day had only 1 record: If(WorkedTime > RequiredHoursPerDay , WorkedTime - RequiredHoursPerDay , ""). But unfortunate, this is not the case.... frown.gif

I hope you have a solution!

Hi freecolours

In Main.fp5 you need additionally:

- a number field

Overtime.zip

  • Author

Yes! I got it! Thank you so much! I even got to understand the principe behind it. I'm gonna use this trick probably a lot more!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.