Jason Goldsmith Posted May 2, 2006 Posted May 2, 2006 I've attached an example of a problem I'm having navigating through records in a portal with scripting. The go to to "first" and "last" scripts work, but not the "next" and "previous" scripts. Any suggestions? Thank you very much Jason PortalNav.fp7.zip
Inky Phil Posted May 2, 2006 Posted May 2, 2006 Hi Jason I have attached a new version of your file that I think sorts out the problem for you. This is the first time I have used this technique though so test it well. I did the exercise for my own benefit as much as yours as I needed to sort this problem as well. Hope it helps regards Phil Phils_PortalNav.zip
comment Posted May 2, 2006 Posted May 2, 2006 I don't quite see the need for this: if you want to navigate between similar records, why not isolate them in a found set, then go directly from record to record? Using a portal (which appears to have no other function) as a go-between seems a bit clunky to me. In any case, a single script should suffice for this. Phils_PortalNav.fp7.zip
LaRetta Posted May 2, 2006 Posted May 2, 2006 (edited) Oh God! I just HAD to say ... Min(Max(1;r) oh What a beautiful thing, Michael! What a record (or line or whatever) navigator! AND, I see using it in recursion also!! Thank you! I will OWN Min(Max) concept! I swear! Sometimes these seemingly simple things can hold the most power (for ME anyway). Beats the heck out of evaluation functions such as Case() here!! Edited May 2, 2006 by Guest
Inky Phil Posted May 2, 2006 Posted May 2, 2006 Hello comment I assumed that Jason was attempting to navigate via a portal for a reason - I know.... one should assume nothing in this world! Hark at me. Like I could have come up with that script of yours anyway!! : Thanks as usual Phil
John Mark Osborne Posted May 2, 2006 Posted May 2, 2006 I wanted to chime in with an alternative approach using GetNthRecord and a recursive custom function. PortalNavRecurse.fp7.zip
Søren Dyhr Posted May 2, 2006 Posted May 2, 2006 Just a detail Case(ValueCount(Row) + 1 = 1; 0; 1) Could be done this way: Sign(ValueCount(Row)) ...since ValueCount(Row) hardly ever gets negative! --sd
Jason Goldsmith Posted May 3, 2006 Author Posted May 3, 2006 Actually, I only know bits of Filemaker, so there was no good reason why I choose a portal over searching and then navigating the search results. I learned how to build search and navigation techiques using dynamic portals and it never occurred to me to just search and navigate the found set. Duh. Are there any advantages to using portals for this type of search and navigate technique? Is it faster to search or select a value from a dynamic portal?
Recommended Posts
This topic is 7117 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