spankalee Posted May 9, 2005 Posted May 9, 2005 I have a FM7 files where I've create a batch printing feature. The user checks off a "print" checkbox on every record they want to print and then they click "print" and a script runs through the checked records and print them. Yea. Simple. But now I have more than one user printing at the same time. The checkbox is a field of the record, so when one user clicks it, it affects all users. It's a mess. Anyone have any bright ideas on how to fox this? I've been thinking of repeating fields, or User and UserData tables. Everything seems too complex. Also, I'm not sure how I would get the layout to work. The records are listed in a portal, I'm not sure how to put a field in that changes what record or relationship it's using based on the user. thanks for any help
mr_vodka Posted May 9, 2005 Posted May 9, 2005 Create a field that adds the User specific ID to it. then you can do a find in that field for the userID. For example, lets say you have user Bob Smith and Jack Stern both checking on the same record. Your checkbox button would set your "Checked" text field to Checked = Checked & " " & USERID (some structured userID). I usually uses Initials and last digit of Numeric ID number. So, they would correspond for example to BS1 and JS4. If both people check the same records, the value of the "Checked" text field would be BS1 JS4. By doing this it leaves other users Check marks intact. To have someone uncheck it, you would use a do a position function to figure out what positon the USERID would be at. Then use the pattern count function in order to remove it from the field.
spankalee Posted May 9, 2005 Author Posted May 9, 2005 so the checkbox would have to become a button that launched a script then, right? In that case, since I'd already have to use a script, would it make sense to use a repeating field? I know it would limit the number of users, but that's not a big problem. It seems it would make the calculation for checking/unchecking simpler. Or... I've been considering making the Users and UserData tables for some other features. I could have a table that links users to records for printing. The question is, could I have a check box that represents whether a linking row exists between the user and record?
mr_vodka Posted May 9, 2005 Posted May 9, 2005 A quick work around is to generate a temp file that can used to print files. You would match of User and RecordID. So if you check a button it would generate a temp file with USER and RecordID. Then you can just use this new temp file to match only on the current userID and print only those files. Relationship to tempFile g.UserID = tempFile: userID Go to related records [show only related records] Dont forget to delete the related record when record is unchecked. Its a dirty work around, but gets the job done. Personally I would do it the first way, but if you can deal with a work around, then so be it. :-)
comment Posted May 9, 2005 Posted May 9, 2005 The checkbox is a field of the record, so when one user clicks it, it affects all users. It get worse than that: if one user is editing a record, another user cannot mark it. I would try going at it from the opposite direction. Instead of marking a record, set a global field with the record's ID. See the attached for a demo of how this might be done. MarkRecords.fp7.zip
Recommended Posts
This topic is 7206 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