Skip 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.

Repeating Fields

Featured Replies

I have:

(ORDERS)

orderID

relationID

Name

Description

TotalTimeWorked

(HOURS)

hourID

employeeID

orderID [10]

TimeWorked [10]

Date

TotalTime

I want to calculate in field orders::TotalTimeWorked howmany hours the employees have worked on an order. If I use Sum(HOURS::TimeWorked) it works fine untill an employee works on 2 order in one day and it also

adds the hours worked from the other order.

Unfortunately you haven't described the HOURS::TimeWorked relationship sufficiently, however I'll guess you don't have orderid as part of the relationship, hence why the SUM function is adding all orders together.

When you make orderid part of the relationship then you will be able to distinguish between different orders.

  • Author

the only relation line between the 2 tables is between the orderID's

In that case then the orderID in the HOURS table must be the same number for both orders - check the data in the HOURS table.

  • Author

I think the problem is that its a repeating field.

It works like this:

Our employees can log in and fill in a day chart wich is based on the HOURS::Date

They can fill in that they worked for x number of hours on an order, its possible that someone works

in one day on 10 different orders, hence the repeating fields to 10. In the HOURS::TotalTime it adds up all the hours the employee has worked on a day (this works).

In the ORDERS::TotalTimeWorked I want to see howmany hours the employees have worked on that order. My calculation workes when all the employees fill in their chart with only one order

When they fill in that they worked on 2 orders in one day the calculation goes wrong and also adds in the hours worked from the 2nd order they worked on.

Hope this makes my problem a bit more clear.

Try to work yourself thru this thread:

http://fmforums.com/forum/showtopic.php?tid/196814/post/297466/#297466

Where several templates shows how to turn away from repeaters when "hours worked" is the topic.

--sd

I noticed your repeating fields but didn't think you were using them in the way described. So, all the orders workeda re in actual fact under the same orderid - but in different repetitions.

Now is a good time to realise the folly of repeating fields (except in some specific circumstances), especially when they can be so easily replaced with RELATED records.

  • Author

Ok I understand now that it's a big no no to use the repeating fields. The white paper made it really clear.

Could you maybe help me on my way with the related record?

MBA.zip

You overestimate our hacking skills by forgetting to give us password and account name.

But if you download this template:

http://fmforums.com/forum/attachment.php?attid/14164/

...would you see each day have a cell open for entry, the data lands in a table a relation away - which means you can sum via the aggregate function Sum( over the relation. Now in the template are there only provisions for one assignment each day, but it's just a matter to prefab'e to a more granular solution with more records in the sandwich layer.

--sd

  • Author

I'm not able to open the template now because I'm not at work atm, but no hacking skills required :

Its just admin without a password.

I'm still getting used to the way of working / thinking of FM but already loving the community :

Good sharp feedback and fast, thanks already guys.

Edited by Guest

  • Author

Anyone who can help me on my way on how to do this in my template?

Any help will be welcome ;)

  • Author

I tried to start over and using a portal, but something is wrong because if I am using Lay-Out UrenDatums I cant add anything in the portal.

admin and no password

test.zip

Something easily forgotten before you get the hang of it....

--sd

Billede_1.jpg

  • Author

I was so busy focusing on avoiding the old problem I totally forgot the even think of that option :P

thnx a lot ;)

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.