fperugini Posted April 10, 2003 Share Posted April 10, 2003 Hello All, I am a newbie with FileMaker Dev (about 1 month) and making progress fast thanks to this forum. I'm stuck on a problem though, and hoping you guys can help. I am developing a Timecards module for our company. Basically a user records time against various job weekly. I created an entry form with the various fields to fill in at the top, and at the bottom of the form I have a portal. The purpose of the portal is to show time entries for the current user for the current week only with a total hours field. The portal is using a self relationship, back to the same file relating the username. I am stumped on how to make fields, and set up a relationship that would cause the portal to filter on the current week only. Is this even possible? Does anyone have any suggestions on how to proceed? I can provide more detail upon request. Thank you. Link to comment Share on other sites More sharing options...
Ugo DI LUCA Posted April 10, 2003 Share Posted April 10, 2003 Hi, FM provides a calc based on Week. Week(your date field) return the week number. You could start with this or give us more details about the structure... Link to comment Share on other sites More sharing options...
fperugini Posted April 11, 2003 Author Share Posted April 11, 2003 Hello again and thanks for the reply. The list of fields for the TimeCard file are attached as a text file. Here is my latest attempt: The data Entry form collects data in global fields, then when the users presses a Save Entry button, I run a script to create a new record, and copy all the global fields to the current record. The goal is to have the portal display records for the current user (identified by gUserId or gStaffId) for ONLY the current week, with a total of that time in hours. I am trying to have the user enter data related to a time entry (job number, jobname, etc) at the top half of the form, then as he/she clicks the Save Entry button, the portal on the bottom half of the form will show entries for the current week with a total. The relationship I am trying is a self relation ship where the left side is: gUserAndWeek (concat gUserId with Week of Year, i.e. jsmith15) and the right side would be: UserAndWeek (stored value of the same which is added by script) When I try to make the relationship, FM 6.0 gives a error that the relationship will not work because gUserAndWeek cannot be indexed. I hope this provides more information. Does anyone have any ideas on a way to make this work? Thank you. Timecards.txt Link to comment Share on other sites More sharing options...
Ugo DI LUCA Posted April 11, 2003 Share Posted April 11, 2003 Hi, because gUserAndWeek cannot be indexed. But it's at left side So it doesn't matter. The right side must be indexed... Ok, I'll look to the files. Link to comment Share on other sites More sharing options...
fperugini Posted April 11, 2003 Author Share Posted April 11, 2003 Your correct! I just blindly heeded the warning, and never tried it. It appears to work! I am going to do some more testing now. I may have solved my own problem. Thank you very much. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 7849 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 accountSign in
Already have an account? Sign in here.
Sign In Now