LaRetta Posted August 14, 2004 Share Posted August 14, 2004 Almost every table needs record-arrow navigation. I decided to (hopefully) simplify the idea, utlizing Custom Function so that the required calculation in each table would be easier and could be just one calculation for all four arrows. I have attached my simple idea - Preferences table containing the Arrow graphics and a Customer table. I will be implementing this into approx. 25 tables once I get my head clear on it. This will be networked and I need to be sure my use of globals will work. I would hate to have this break when presented in multi-user. I tend to think that even more of the calculation can be moved to the Custom Function, but I am unsure how to accomplish that. I have placed each calculation repetition independently so script could be attached directly to each Arrow calculation. And, is there a way to stop the black flash of script execution if no button is visible? I dislike the ability to still click that spot and have it execute at all. I may be over-complicating this whole idea. Ideally, the calculation container in each data table (called ArrowBar) would only contain Custom Function 'Arrow Bar'. As you will see, I still have it broken up too much -- 1) as different Custom Functions for each Arrow and 2) Requiring Choose() within the data-table calculation. How best can I pull this together using Custom Functions? Or should I? Your wisdom would be appreciated. LaRetta ArrowBar.zip Link to comment Share on other sites More sharing options...
The Shadow Posted August 14, 2004 Share Posted August 14, 2004 I would like it combined if you're going to be using this all over. By passing the rep-number into the custom function, you get a much nicer calculation in define fields. See MoreArrows field in the attached. Link to comment Share on other sites More sharing options...
LaRetta Posted August 14, 2004 Author Share Posted August 14, 2004 Bang Zoom Perfect - of course! And again, The Shadow has come through for me!!! Thank you so much! I'm going to figure out repetitions yet. I notice you don't have yours unstored!: Why did I think it needed to be unstored? I guess not! Thanks again. Wow. Just your Arrow Custom Function and a very simple ArrowBar calc in each table. It doesn't get easier than that. LaRetta Link to comment Share on other sites More sharing options...
LaRetta Posted August 15, 2004 Author Share Posted August 15, 2004 Hey Shadow! I didn't take into account working with a found set also. If (on a found set) going to the last record, the Next and Last arrows don't disappear. I modified it (adding the bold) but it still won't work (on found set, last two arrows still show). If( Get ( TotalRecordCount ) > 1 or Get ( FoundCount ) > 1; If ( Choose( repNum-1; Get ( RecordNumber ) > 1; Get ( RecordNumber ) > 1; Get ( RecordNumber ) < Get (TotalRecordCount) or Get ( RecordNumber ) < Get (FoundCount); Get ( RecordNumber ) < Get (TotalRecordCount) ) or Get (RecordNumber) < Get (FoundCount); Preferences::RecordArrow[repNum] ) ) Any idea how I can account for all records or found sets? LaRetta Link to comment Share on other sites More sharing options...
The Shadow Posted August 15, 2004 Share Posted August 15, 2004 When you don't have a found-set, Get(FoundCount) and Get(TotalRecordCount) are equal. You can just change the calculations to always use Get(FoundCount) and it seems to work fine. I think you DO want this calculation Unstored, I just did a quick test and it worked, but it would fail as soon as I made a new record, but I didn't try that. Link to comment Share on other sites More sharing options...
LaRetta Posted August 15, 2004 Author Share Posted August 15, 2004 After your post, I changed all 25 table calcs by unclicking 'Do not store' or so I thought. Maybe I missed one. This took some time to recalculate. Then when it didn't work, I tried changing another table calc to unstored and it still didn't work. I'll bet I missed a table originally. Anyway, this table was Unstored and I will check the rest of them in the morning. Time for a glass of Merlot and some music. Obviously my FM brain has already retired for the evening. Thank you, Shadow. Update: I can't read very well. You said it SHOULD be Unstored!! Okay, I'll change them all back ... in the morning. I changed the one table to 'Unstored' and changed the TotalRecordCount to FoundCount and it works perfectly. I can't see very well either - I hadn't noticed you attached a demo. L Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 7200 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