Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 5667 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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

Posted

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.

Posted

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

Posted

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

Posted (edited)

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
Posted

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

Posted

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

thnx a lot ;)

This topic is 5667 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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