Page 1 of 1

"and xxx more results Contacts" working with porta

PostPosted: Sun Jul 12, 2009 4:28 pm
by wbullard
Great product. It took no time to get fmSearchResults integrated and tweaked. The one detail that would be helpful is an example of how to get the "and xx more results Contacts" to show up in a portal rather than a list view. Since my app uses a side navigation bar I only use forms and portals. My portals have fairly elaborate relationships for user filtering.

Thanks
WB

PostPosted: Mon Jul 13, 2009 9:34 am
by John Sindelar
Hey Will.

The script "Navigate to Result" performs a find to build a found set that matches the search you've run. In this script you'll see a pair of comments:

Search is complete, now show list
Go to layout

After those comments you can hijack the script (may for certain contexts by testing for $table equalling 01 or 02, etc.) and use the found set to populate one of your portal filters, gathering the keys for the found set by using a loop or a recursive Get (NthRecord) custom function.

Let me know if you need more.

John

PostPosted: Tue Jul 14, 2009 3:00 am
by wbullard
John,
Still a wee bit in the dark. I understand that I could go to my portal and set the filters to what I searched on, say Name="Bob", but what is confusing is that fmSearchResults does some sophisticated search routines (Bob also pulls up Robert with $$sr Close Name Match =1) so I don't see how I could come up with 88 results in my portal when fmSearchResults shows "and 88 more results Contacts" counting the Roberts.

I suppose the trick to that lies in your suggestion "gathering the keys for the found set by using a loop or a recursive get (NthRecord) custom function" but I'm not clear where the keys are. A wee bit more light would help.

Thanks,
W

PostPosted: Tue Jul 21, 2009 5:19 am
by wbullard
I figured it out.

Thanks,
W

PostPosted: Tue Jul 21, 2009 5:37 am
by John Sindelar
Excellent W! Sorry for not replying sooner.