Jump to content
Sign in to follow this  
Ballycroy

Creating Records in Portal

Recommended Posts

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

Share this post


Link to post
Share on other sites

Take a look at this post for developing a timecard system.

http://fmforums.com/forum/showtopic.php?tid/196814/post/297482/fromactivity/myposts/#297482

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 by Guest
Wrong file attached

Share this post


Link to post
Share on other sites

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; "" )

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

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