Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, June 17, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Administration Forums - General Administration
Forum to discuss general administration topics for SalesLogix (including LAN & remote topics). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to General Administration | New ThreadView:  Search:  
 Author  Thread: how to create the Lookup based on our special requirement
Jordan
Posts: 30
 
how to create the Lookup based on our special requirementYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Aug 06 2:55 PM
fiogf49gjkf0d
Hi there,

I will appreciate it if you could give us an advice about our following issue:

We need to create a lookup for account search. We need a column to display the primary contact name for any account record in the result grid on the pop-up lookup window. As you knew, in SLX, Account table is parent and Contact table is its child and their relationship is one to many. If a contact is the primary contact, its filed IsPrimary is equal to ‘T’.

In order that we could search all the accounts, before we created the Account lookup, we created a global join in which parent table is Account and child table is Contact and join is “Left”. Then we created the lookup and dragged the contact name field from the contact table in the tree view into the layout grid through SLX Architect/Manage/lookup. After doing so, when we opened lookup window and searched accounts, if an affected account had 3 contacts, there were 3 account records for the account to match the 3 contacts displayed. What we need is that just one account record with primary contact name is displayed in the result grid. How should we do?

Thanks in advance.
[Reply][Quote]
Jeremy Brayton
Posts: 491
Top 10 forum poster: 491 posts
 
Re: how to create the Lookup based on our special requirementYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Aug 06 12:29 PM
fiogf49gjkf0d
The problem is the join. When you create a group that uses a custom table off account for instance and you have a layout field from the account table, it will show X number of times which skews the data. Even in trying to set it to use distinct values it won't because you are essentially creating a flat record that while the account portion is distinct, the contact information isn't.

You could keep the information relevant by using subqueries to segregate the distinct values. This is super easy with a lookup control using the LookupRestrict values but the account search button doesn't let you do. I believe you can do what you want by adding a global script that hooks into the Lookup:Account* functions or if you wish to modify the QuickFind portion then you can modify the MainView. I think it can be done I just don't know how easy it would be since you are trying to eliminate the account table records from showing up and that is precisely the table the lookups are built against.

Knowing me there is a simpler way to do this that I'm just not thinking about.
[Reply][Quote]
John Gundrum
Posts: 632
Top 10 forum poster: 632 posts
 
Re: how to create the Lookup based on our special requirementYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Aug 06 9:45 AM
fiogf49gjkf0d
Jordan,

I just tested doing this in our SLX db (6.2.1) and it worked just fine without creating any additional joins or anything.

1) In Accounts, add a new group. I called mine Account w-Primary
2) In the layout add the Contact FullName.
3) In conditions add the IsPrimary field and make the condition = T
4) Add any other conditions

This display the primary contact name for each account. You will only get duplicate accounts when more than one contact is set as a primary. This is possible and can be used as an aide to clean up the database if only one primary is required per account.

John G.
[Reply][Quote]
Jordan
Posts: 30
 
Re: how to create the Lookup based on our special requirementYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Aug 06 9:14 AM
fiogf49gjkf0d
Thanks Jeremy and John
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 6/17/2025 11:11:17 PM