stealth162 Posted March 17, 2005 Author Posted March 17, 2005 I have a simple database that is designed so that users can log company supplies they have used on a week by week basis. Each week the employee will create a new record and log there supplies. I have another layout in this database designed so that I can print all of this information for that employee/week. The problem I have is that when I go to the printing layout It shows me all the records. I only want to view/print the record I was looking at on the other (browse) layout. Is there a way to say "find current record" via a script? Any thoughts are appreciated.
stealth162 Posted March 17, 2005 Posted March 17, 2005 I have a simple database that is designed so that users can log company supplies they have used on a week by week basis. Each week the employee will create a new record and log there supplies. I have another layout in this database designed so that I can print all of this information for that employee/week. The problem I have is that when I go to the printing layout It shows me all the records. I only want to view/print the record I was looking at on the other (browse) layout. Is there a way to say "find current record" via a script? Any thoughts are appreciated.
stealth162 Posted March 17, 2005 Author Posted March 17, 2005 I have a simple database that is designed so that users can log company supplies they have used on a week by week basis. Each week the employee will create a new record and log there supplies. I have another layout in this database designed so that I can print all of this information for that employee/week. The problem I have is that when I go to the printing layout It shows me all the records. I only want to view/print the record I was looking at on the other (browse) layout. Is there a way to say "find current record" via a script? Any thoughts are appreciated.
BobWeaver Posted March 17, 2005 Posted March 17, 2005 Set up a selfjoin relationship based on a unique data field (serial no, etc.) and then do a Go to Related Record[show].
BobWeaver Posted March 17, 2005 Posted March 17, 2005 Set up a selfjoin relationship based on a unique data field (serial no, etc.) and then do a Go to Related Record[show].
BobWeaver Posted March 17, 2005 Posted March 17, 2005 Set up a selfjoin relationship based on a unique data field (serial no, etc.) and then do a Go to Related Record[show].
stealth162 Posted March 17, 2005 Author Posted March 17, 2005 Each record does have an auto entered unique serial number, althoug I'm not sure how to do what you are talking about. Excuse my ignorance but you need to be more specific.
stealth162 Posted March 17, 2005 Author Posted March 17, 2005 Each record does have an auto entered unique serial number, althoug I'm not sure how to do what you are talking about. Excuse my ignorance but you need to be more specific.
stealth162 Posted March 17, 2005 Author Posted March 17, 2005 Each record does have an auto entered unique serial number, althoug I'm not sure how to do what you are talking about. Excuse my ignorance but you need to be more specific.
Tanner Posted March 17, 2005 Posted March 17, 2005 You should be able to using the print script step. All you have to do is set the print step to restore and choose print current record in the "Filemaker" section in the print dialog. -Tanner
Tanner Posted March 17, 2005 Posted March 17, 2005 You should be able to using the print script step. All you have to do is set the print step to restore and choose print current record in the "Filemaker" section in the print dialog. -Tanner
Tanner Posted March 17, 2005 Posted March 17, 2005 You should be able to using the print script step. All you have to do is set the print step to restore and choose print current record in the "Filemaker" section in the print dialog. -Tanner
BobWeaver Posted March 17, 2005 Posted March 17, 2005 Set up a relationship with the same table on both sides, and serial number field on both sides of the relationship. Then, the record will relate only to itself. When you perform the GTRR[show] script step it will show only the record related to the current record, which is itself. There is another simpler method: Show all records Omit record Show Omitted However, as Queue pointed out in a previous thread, this can fail in multi-user databases. So, if it's single user only, you can use this method.
BobWeaver Posted March 17, 2005 Posted March 17, 2005 Set up a relationship with the same table on both sides, and serial number field on both sides of the relationship. Then, the record will relate only to itself. When you perform the GTRR[show] script step it will show only the record related to the current record, which is itself. There is another simpler method: Show all records Omit record Show Omitted However, as Queue pointed out in a previous thread, this can fail in multi-user databases. So, if it's single user only, you can use this method.
BobWeaver Posted March 17, 2005 Posted March 17, 2005 Set up a relationship with the same table on both sides, and serial number field on both sides of the relationship. Then, the record will relate only to itself. When you perform the GTRR[show] script step it will show only the record related to the current record, which is itself. There is another simpler method: Show all records Omit record Show Omitted However, as Queue pointed out in a previous thread, this can fail in multi-user databases. So, if it's single user only, you can use this method.
MoonShadow Posted March 17, 2005 Posted March 17, 2005 Bob said... as Queue pointed out in a previous thread, this can fail in multi-user databases. This concerns me and I've searched for the thread you are referencing here but can't find it. I use Omit/Show Omitted a lot and don't recall reading anything about it being a problem in networked environments! My understanding was that Omit was treated the same as Find, ie, it was User-specific. It's not?
MoonShadow Posted March 17, 2005 Posted March 17, 2005 Bob said... as Queue pointed out in a previous thread, this can fail in multi-user databases. This concerns me and I've searched for the thread you are referencing here but can't find it. I use Omit/Show Omitted a lot and don't recall reading anything about it being a problem in networked environments! My understanding was that Omit was treated the same as Find, ie, it was User-specific. It's not?
MoonShadow Posted March 17, 2005 Posted March 17, 2005 Bob said... as Queue pointed out in a previous thread, this can fail in multi-user databases. This concerns me and I've searched for the thread you are referencing here but can't find it. I use Omit/Show Omitted a lot and don't recall reading anything about it being a problem in networked environments! My understanding was that Omit was treated the same as Find, ie, it was User-specific. It's not?
BobWeaver Posted March 18, 2005 Posted March 18, 2005 The situation which can arise is when another user creates a new record while the script is running. The new record could show up in the found set along with the one you want. It's rare, but it could happen.
BobWeaver Posted March 18, 2005 Posted March 18, 2005 The situation which can arise is when another user creates a new record while the script is running. The new record could show up in the found set along with the one you want. It's rare, but it could happen.
BobWeaver Posted March 18, 2005 Posted March 18, 2005 The situation which can arise is when another user creates a new record while the script is running. The new record could show up in the found set along with the one you want. It's rare, but it could happen.
MoonShadow Posted March 18, 2005 Posted March 18, 2005 Thanks Bob. Using this method is the best for isolating one record for export, for instance. Couldn't this test work or am I still missing the timing? Loop Show All Records Omit Record Show Omitted Only Exit Loop If [ Get (FoundCount) = 1 ] End Loop ... do whatever with the one ... Okay. A new record could appear in any 'omitted' set, ie, the unfound portion of a find which when you Show Omitted Only could appear. I never considered this. I work with omitted sets for isolation of sets on occasion. The possible dangers even if rare are unsettling. Maybe always apply a test. The above would work (I think) for one record and the following should work for a set, right? Loop ... perform your find Set Field [ gCountUnFound; Get(TotalRecordCount) - Get(FoundCount) ] Show Omitted Only Exit Loop If [ Get ( FoundCount) = gCountUnFound ] End Loop ... do whatever with the set ... Because once it's a User's found set it is safe because it is local, is it not? I may give up the practice of Show Omitted Only to isolate sets but I won't go down easy. I've modified the script to include a loop test so Users won't even know it found an extra new record and had to re-run.
MoonShadow Posted March 18, 2005 Posted March 18, 2005 Thanks Bob. Using this method is the best for isolating one record for export, for instance. Couldn't this test work or am I still missing the timing? Loop Show All Records Omit Record Show Omitted Only Exit Loop If [ Get (FoundCount) = 1 ] End Loop ... do whatever with the one ... Okay. A new record could appear in any 'omitted' set, ie, the unfound portion of a find which when you Show Omitted Only could appear. I never considered this. I work with omitted sets for isolation of sets on occasion. The possible dangers even if rare are unsettling. Maybe always apply a test. The above would work (I think) for one record and the following should work for a set, right? Loop ... perform your find Set Field [ gCountUnFound; Get(TotalRecordCount) - Get(FoundCount) ] Show Omitted Only Exit Loop If [ Get ( FoundCount) = gCountUnFound ] End Loop ... do whatever with the set ... Because once it's a User's found set it is safe because it is local, is it not? I may give up the practice of Show Omitted Only to isolate sets but I won't go down easy. I've modified the script to include a loop test so Users won't even know it found an extra new record and had to re-run.
MoonShadow Posted March 18, 2005 Posted March 18, 2005 Thanks Bob. Using this method is the best for isolating one record for export, for instance. Couldn't this test work or am I still missing the timing? Loop Show All Records Omit Record Show Omitted Only Exit Loop If [ Get (FoundCount) = 1 ] End Loop ... do whatever with the one ... Okay. A new record could appear in any 'omitted' set, ie, the unfound portion of a find which when you Show Omitted Only could appear. I never considered this. I work with omitted sets for isolation of sets on occasion. The possible dangers even if rare are unsettling. Maybe always apply a test. The above would work (I think) for one record and the following should work for a set, right? Loop ... perform your find Set Field [ gCountUnFound; Get(TotalRecordCount) - Get(FoundCount) ] Show Omitted Only Exit Loop If [ Get ( FoundCount) = gCountUnFound ] End Loop ... do whatever with the set ... Because once it's a User's found set it is safe because it is local, is it not? I may give up the practice of Show Omitted Only to isolate sets but I won't go down easy. I've modified the script to include a loop test so Users won't even know it found an extra new record and had to re-run.
Recommended Posts
This topic is 7192 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