Ballycroy Posted January 19, 2009 Posted January 19, 2009 I am trying to create a Time Card database for Employees. I view the records through a portal. Problem is when I try to add a new portal record the date field reverts to the end date in the current time sheet. I need to select the date again to make it stick. Also is there an easier way to manage the creation of duplicate records. I have a unique id on the DailyRecords table, but the user does not see the Error Msg. until they click outside the portal. Each Record on the DailyRecords table is unique through a combination of date and employee Id. Account Name: jdoe Password: new Adminstration - Account Name: admin Password: admin NewTimesheet.fp7.zip ErrorMsg.pdf
aldipalo Posted January 19, 2009 Posted January 19, 2009 Take a look at this post for developing a timecard system. http://fmforums.com/forum/showtopic.php?tid/196814/post/297482/fromactivity/myposts/#297482
mr_vodka Posted January 19, 2009 Posted January 19, 2009 This really isn't a good way to store your unique key. You should really rely on FM's auto-serialization. Second, you are having your issues because the portal that use are using has a relationship that will allow creation of records but since you are including the additional >= and <= it is not creating unique records.
Ballycroy Posted January 20, 2009 Author Posted January 20, 2009 (edited) I have been trying to modify the sample file in the link provided by aldipalo. Here's what I am trying to get: If you select a date in the browser and it's before and including the 15 of the month then only show those dates. Conversely if you you select a date in the browser and it's after the 15 of the month then only show those dates in the browser. The calculation I used in the WithinTheSameMonth field is: Case ( Month ( gBaseDate ) = Month ( ShowDate ) and RecordID ≥ 15; RecordID ; Month ( gBaseDate ) = Month ( ShowDate ) and RecordID ≤ 15; RecordID ) But it does not seem to work. I have attached a sample file. I would be grateful for any direction on this. TestTimeSheet.fp7.zip Edited January 21, 2009 by Guest Wrong file attached
Ballycroy Posted January 22, 2009 Author Posted January 22, 2009 Ok, I believe I have solved it with the following Calc. in the WithinSameMonth field.: Case ( Day ( gBaseDate ) ≤ 15 and Day ( ShowDate ) ≤ 15 and Month ( gBaseDate ) = Month ( ShowDate ) ; RecordID; Day ( gBaseDate ) > 15 and Day ( ShowDate ) > 15 and Month ( gBaseDate ) = Month ( ShowDate ); RecordID; "" )
Recommended Posts
This topic is 5840 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