Fred in Thailand Posted October 24, 2007 Posted October 24, 2007 Hi All I am having a real problem with portal filtering. Just can't seem to get my feeble mind around the concept. Have a db with two tables. Employee and TimeLog. I would like to filter the timelog portal by the current week. Have looked at all the examples i could find and just can't get it to work. Thank you all Supervisor_Log_Copy.zip
Fred in Thailand Posted October 24, 2007 Author Posted October 24, 2007 OK, Mabey I was not to clear as to what my problem is. I am making a simple Time tracking log. Two tables Employee & TimeLog. On the Employee layout I have a portal that shows the TimeLog records. All works as hoped but i wold like to filter the portal records to just show the records for the current week. What i am not clear on is the relationship when doing a portal folter. In looking at JMO's YEARFILTER example, it appears sooooo simple but in practice I JUST DON'T GET IT. Need a little nudge in the right direction. Thanks
Søren Dyhr Posted October 24, 2007 Posted October 24, 2007 I would probably solve it this way.... --sd SupervisorMod.zip
Fred in Thailand Posted October 25, 2007 Author Posted October 25, 2007 Thanks for the help. Always learning. I would never have thought of that. The scarry part is I think I understand it.... Again thanks
Søren Dyhr Posted October 25, 2007 Posted October 25, 2007 I should perhaps tie a few comments to it, if you use a multi criteria relation will the "Allow Creation ..." tampers it with the foreign key value by overruling the autoenter, hence the use of scripted creation of portalrows instead. Other ways of solving this issue would require an extra relation - but the trickery found in "Special Edition Using..." pp. 478 have lost it's meaning because the execution order have been reversed from version fm7 to fm8. This means that scripting is manditory any way, so why bother with a "New Record Only" relationship, which were pretty commonly occuring in versions fm3 to fm6... The surprising fact is that Scott Love and company apparently havn't found it yet ... or that I havn't seen how to fix the implications the introduction of fm8 conveyed?? As it is doesn't it work as written! --sd
Fred in Thailand Posted December 6, 2007 Author Posted December 6, 2007 OK, I understand most of what i see. In fact I have made a few changes to the DB and it is working great. Just one thing though. How did you get the portal to behave the way it does? I really like that it does not show an empty row. I am sue it has to do with the way the EmployeeID is set in the New record step but I can't figure it out. Teach me. Thanks
Søren Dyhr Posted December 6, 2007 Posted December 6, 2007 Take a look at the image attached, where I have made a red marking, is the checkbox lifted or not set, this means the solution needs to rely on scripting instead. --sd
Fred in Thailand Posted December 6, 2007 Author Posted December 6, 2007 I GOT IT!!! This seems to me to be the best way to handle new records in portals. Very elegant and very simple. I have always hated the empty portal row. Too confusing for the ordinary person. Especially with the type of people I deal with here in Thailand. Thailand is still in the dark ages when it comes to computer litracy. Thank you so much for the help. Attached is another db i put together. What do you think. Fred MessageCenter.zip
Recommended Posts
This topic is 6198 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