datalink Posted January 18, 2010 Posted January 18, 2010 We are in need a script that will take the operator to the next related record. The found set cannot be constrained to related records only, so in the stack of records there are related records and unrelated records. Some how we need to set up a 'next' button that will take the operator to the next related record, skipping over the unrelated records that might be in between. Any suggestions? Thanks in adavance.
datalink Posted January 18, 2010 Author Posted January 18, 2010 There are vendor records stored in a vendor table. There are related product records in a product table. On a layout displaying individual product records (layout is based on the product table) we need a button will take the operator to the next product record of the same vendor as the current product record.
comment Posted January 18, 2010 Posted January 18, 2010 (edited) Why can't the found set be constrained to the products of the specific vendor? Also, is this really for version 7? Edited January 18, 2010 by Guest
datalink Posted January 18, 2010 Author Posted January 18, 2010 No...sorry. Its v 10. I suppose it technically could be constrained, but the system was built by another developer that didn't really abstract the navigation logic. There are lots of points from which an operator could navigate to the product screen. The system is in active use. It feels like constraining the found set leaves a lot more room for breakage of the existing work. It seems to be that using value lists it should be possible to get the current record id somehow and from there get the next related record id and use that to navigate to that record. I can't seem to figure it out though.
comment Posted January 18, 2010 Posted January 18, 2010 In version 10 you could trigger a script that would constrain the found set on layout load (assuming you ALWAYS want it so). Or you could store the VendorID in a variable and go to next record in a loop until it matches (or go back to the original record if you've reached the end of the found set). I can't say I like either method, though - both are merely a patch over the real issue.
datalink Posted January 18, 2010 Author Posted January 18, 2010 Those are both great suggestions. I agree with you that they are sort of patch for a larger problem. Right now its hard to sell something to a client that doesn't show result. An under-the-hood fix to a larger problem is just hard to get by for these folks. Thanks for the ideas. I'll play with them a bit.
bruceR Posted January 19, 2010 Posted January 19, 2010 Or use a variation on Comment's technique, using getNthRecord and incrementing N starting with get(RecordNumber) until you get to the next value where vendor ID = vendor ID of the current record. Or don't do any navigation at all - use conditional formatting. Use an on record load script to set $$vendorID to current vendor ID. Use conditional formatting to highlight records with VendorID = $$vendorID. The user can then see which are the same-vendor records. Always use a Freeze statement before setting the variable.
Recommended Posts
This topic is 5423 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