Newbies greencode Posted May 15, 2002 Newbies Posted May 15, 2002 I have a list of "jobs" in a list layout view but what i would like is to have a button next to the job that says "completed" and then when you click this it will then move this record to a seperate "archive" layout... is this possible. thanks in advance for any help... alan
andygaunt Posted May 15, 2002 Posted May 15, 2002 Alan, do you mean a seperate layout or a seperate database. If to a seperate layout you will need to script your records that appear on those layouts (or you can show them through a portal which might be easier). If via a portal create a global text field (_gJobFilter) Then create a relationship from this to your completed field. OK. now add a portal in your layout using this relationship. Add your fields into this portal. Now add the global field above the portal. Now, your completed field (use a value list of Yes/No) OK. Now in browse mode, If you set the global to yes, it will filter the portal to only show the completed jobs. If you set it to no it will then show uncompleted jobs. (you will need to set all your current jobs to no if not completed) HTH
Newbies greencode Posted May 15, 2002 Author Newbies Posted May 15, 2002 sorry andy i think i forgot to mention that i was a little bit of a beginner to FM. it would be to a seperate layout within the same database. i think the portal option sounds good but i'm really not too sure how to do it. could i create an option at the end of the job line that says archived? and then have a dropdown with either YES or NO. and then a button at the top of the page that says "VIEW ALL" VIEW ARCHIVED" "VIEW CURRENT". I still don't really understand how i can filter the records to show this. sorry... alan
kenneth2k1 Posted May 15, 2002 Posted May 15, 2002 Hello. The way Andy has suggested is the way that I would do it, too. Just the thought of "archive" implies moving the files out of your main file, so as not to clutter it and be confusing. You can still reference your archived file any time you want. With regard to your last question, you can filter you database using these operators. Make a text field called ArchiveStatus (or something like z.status_archive). Then make a script that sets the field to "Archived." Set Field ["ArchiveStatus", "Archived"] - attach this to a button on your list view layout next to each record. This should set the field for the individual record. To set this field for a group of records, use alternate method. then, you need to make three more scripts that check the status of this field and filter the list: Enter Find Mode [ ] Set Field ["ArchiveStatus", "Archived"] Perform Find [ ] Attach this to a button named "View Archived." That will find your records that have the field set as "archived." Make a similar script and button for viewing "current" (Set Field ["ArchiveStatus","Current"]). To show all records, make another script and use the Show All Records step. As Andy as stated, you should probably put these archive records in a separate file and relate them. The problem with having them in the same file and using the method I have explained is that you have to constantly be dealing with found sets of records and it could become complicated. My advice is to read up on some relationships and portals and all that business. Good luck ken
andygaunt Posted May 15, 2002 Posted May 15, 2002 We built a sample using a portal and then using a calculation field on the right side of the relationship and a calc on the left (which comes from two globals) everything is working great now. globals were for Archived (_gArchive) ( Using a Yes, No value list) and date of task (_gTaskDate). these were put together within a calc _gArchive & ":" & DateToText(_gTaskDate) The calc on the right was Completed & ":PP" & Completed & ":" & DateToText(Date) where PP is the paragraph return symbol This allowed the portal to filter between archived yes or no and also further filter the task list to a specific date. When a task was selected from the portal that row highlights and the detail displayed below. Saved creating multiple layouts and running find scripts everytime you switched from one to another.
Recommended Posts
This topic is 8232 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