May 2, 200619 yr 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
May 2, 200619 yr 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
May 2, 200619 yr 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
May 2, 200619 yr 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, 200619 yr by Guest
May 2, 200619 yr 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
May 2, 200619 yr I wanted to chime in with an alternative approach using GetNthRecord and a recursive custom function. PortalNavRecurse.fp7.zip
May 2, 200619 yr 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
May 3, 200619 yr Author 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?
Create an account or sign in to comment