New Company Association Search List

Notes on the new SeedCode Complete template for FileMaker 13
Posts: 72
Joined: Mon Feb 04, 2013 11:54 am
PostPosted: Sun May 17, 2015 10:36 am
What is the best way to show a complete list of companies from the primary company association panel when in Contact edit mode without having to enter search criteria?

There is a "select company from selector" script on the portal for companies. Can this be modified to show all companies?

Here's the screen I'm working with:

search_company.png
search_company.png (24.85 KiB) Viewed 12686 times
SeedCode Staff
SeedCode Staff
Posts: 475
Joined: Wed Jan 02, 2013 11:47 am
PostPosted: Mon May 18, 2015 5:39 am
I can't tell from your screen shot, where is this layout? Can you send another screen shot that shows the entire layout?
Posts: 72
Joined: Mon Feb 04, 2013 11:54 am
PostPosted: Fri May 22, 2015 5:14 am
Sorry, here's better pic. When editing a contact's info and selecting either the primary company or additional company I would like to have a list of companies auto-display on the selection layout instead of having to search initially.

I am trying to backtrack the code but can't quite figure out the best way to approach this without messing up the search filter.

I hope this makes sense.

Thanks - Ken


add_company.png
add_company.png (114.73 KiB) Viewed 12653 times
SeedCode Staff
SeedCode Staff
Posts: 691
Joined: Mon Feb 28, 2011 2:47 pm
PostPosted: Fri May 22, 2015 10:01 am
Hi Ken,

The easiest thing to do would be to pass a "*" (asterisk) as the current value parameter. This will do a wildcard search and return find everybody. The find that's done in the control file is set to only return a 100 results, so if you want more returned by default, you'll need to change the limit variable in the control file.

Screen Shot 2015-05-22 at 11.53.17 AM.png
Screen Shot 2015-05-22 at 11.53.17 AM.png (141.93 KiB) Viewed 12648 times


Screen Shot 2015-05-22 at 11.56.45 AM.png
Screen Shot 2015-05-22 at 11.56.45 AM.png (117.14 KiB) Viewed 12648 times


Screen Shot 2015-05-22 at 11.57.25 AM.png
Screen Shot 2015-05-22 at 11.57.25 AM.png (140.97 KiB) Viewed 12648 times


Let us know if that helps!
-Jason
Posts: 72
Joined: Mon Feb 04, 2013 11:54 am
PostPosted: Fri May 22, 2015 7:40 pm
Not sure why but using the wildcard in the "Add Company Associate" did not work. Using debug I found that the script used was "Add Secondary Associate" but adding the wildcard there didn't work either.

Using debug I found that script "Go to company" was called and following your example I added the wildcard as shown below and it worked.

This helps a lot as my beta test user always complains of not knowing what to do and kept asking for a way to just show the list of companies (clinics in this case).

Thanks so much for your help with this Jeff.

Ken

go_to_company_selector.png
go_to_company_selector.png (122.32 KiB) Viewed 12640 times
SeedCode Staff
SeedCode Staff
Posts: 691
Joined: Mon Feb 28, 2011 2:47 pm
PostPosted: Mon May 25, 2015 8:15 am
Hi Ken,

Thanks so much! I'm not sure why passing the "*" as a parameter didn't work as opposed to setting it as a literal, but I'll add this as a bug to run through.

We should probably make this a setting somewhere, as it's probably behavior that others would want, and does make the action more explicit. The downside, of course, being that if you've got a million contacts, you could potentially have a big slowdown when doing the initial search, and I wanted to error on the side of performance :wink:

Cheers!!
Posts: 72
Joined: Mon Feb 04, 2013 11:54 am
PostPosted: Mon May 25, 2015 11:38 am
Thanks Jeff.

I can fully appreciate putting performance first. In our case "companies" has been changed to clinics. There will only be a handful of clinics so performance is not an issue.

Thanks for your prompt reply. This solution is so well tuned and complex I find myself a bit lost and have to rely on you guys for tweaks.

Fortunately I have just about tweaked all of the big stuff. The small stuff I can figure out on my own. I will hit you up for one more item that I have been wrestling with for quite a while but can't figure out. It has to do with the "Toggle associations..." and "Toggle recent..." scripts. I will write it up in another post to get your feedback on a possible solution.

As always. Thanks a bunch!

Ken

Return to SeedCode Complete 13

Who is online

Users browsing this forum: No registered users and 2 guests

cron
(855) SEEDCODE
[email protected]
Follow us: