Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, November 26, 2024 
 
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!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: Adding Values to Advanced Lookup
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Adding Values to Advanced LookupYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Aug 07 8:02 AM
Hi everyone,

Does anybody know how to add items to the advanced lookup drop downs? I notice they automatically have the values in the drop downs corresponding to the columns in the current group - so you will only be able to filter on columns that are in the group (which is bit poor!) - Is it possible to add to this list without adding columns to a group?

Many thanks,
Nick
[Reply][Quote]
Frank Chaffin
Posts: 475
 
Re: Adding Values to Advanced LookupYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Aug 07 8:40 AM
The Lookup works by passing a parameter to the Query that drives the group. The Query used the passed parameter value to drive a condition. So all you should have to do is add another condition to the Query that drives the group.
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Adding Values to Advanced LookupYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Aug 07 8:44 AM
Hi Frank,

Is this a response for 6.2/7.0 web client? I dont quite follow for 7.2...

Thanks,
Nick
[Reply][Quote]
Frank Chaffin
Posts: 475
 
Re: Adding Values to Advanced LookupYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Aug 07 8:48 AM
Nick,
Yes the response is for 6.2/7.0 web client... sorry.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Adding Values to Advanced LookupYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Aug 07 4:29 PM
Hi Nick,

I've not dug too deep into the advanced lookup yet, but AFAIK that is how the OOTB behavior works in this build. If you wanted other fields available, you could always hack the smartpart and make whatever changes you need.

If you look in \SmartParts\Lookup you'll see the ascx and cs files for this smartpart. You can modify those as you need and make them behave differently - although that is a lot of work for just adding some additional fields to the lookup.

One thing to consider as well, there's no reason why you couldn't make your own advanced lookup control to put in that one's place (and get rid of the ootb one altogether)

-Ryan
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Adding Values to Advanced LookupYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Aug 07 3:05 PM
Hi Ryan,

Thanks very much for the response - im aware of the lookupviewer smartpart (and cs) I was just checking there wasnt an area of App Architect I was missing.

Many thanks,
Nick
[Reply][Quote]
Allen Duet
Posts: 2
 
Re: Adding Values to Advanced LookupYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Aug 07 4:21 PM
For now you'll have to modify the smart part. We're expanding the advanced lookup options in a future release.

Allen (SLX Product Manager)
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Adding Values to Advanced LookupYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Aug 07 8:09 AM
Hi all,

Im having some trouble manipulating the smart part to add my own values to the advanced lookup. It seems fine as long as you try to use fields to search upon that are in the group, but otherwise I get an error:

Requested Lookup Condition does not exist in the Layout - This appears at the line _TheLookup.AddLookupCondition(LookupByList.SelectedValue, LookupValue.Text); on lookupviewer.ascx.cs.

My code to manipulate the values is (instead of looping through the XML of the current group, as the standard product does I have just harcoded some listbox items):

_Items = new ListItem[2];
_Items[0] = new ListItem("Account Name", "CONTACT:ACCOUNT");
LookupByList.Items.Add(new ListItem("Account Name", "CONTACT:ACCOUNT"));
_Items[1] = new ListItem("Contact Name", "CONTACT:Name");
LookupByList.Items.Add(new ListItem("Contact Name", "CONTACT:Name"));

As I mentioned this works fine for CONTACT:ACCOUNT and also for CONTACT:NameLF (these are present in the current group), but not for any others ive tried (such as Name above).

I have pasted the whole of the function that generates the queryby conditions for your convenience:

private void BuildQueryConditions()
{

_TheLookup.ClearConditions();
*** _TheLookup.AddLookupCondition(LookupByList.SelectedValue, LookupValue.Text);

if ((_WebPortalUserService != null) && (_TheLookup.Entity.ToUpper() == "TICKET"))
{
_TheLookup.AddLookupCondition("TICKET:ACCOUNTID", _WebPortalUserService.GetPortalUser().Contact.Account.Id.ToString());
}

//AdvPlaceHolder.FindControl(
foreach (Control item in AdvPlaceHolder.Controls)
{
if (item is Literal) { continue; }
if (item.ID == null) { continue; }
if (item.ID.Contains("LookupValue"))
{
if ((item as TextBox).Text != "")
{
Control list = AdvPlaceHolder.Controls[AdvPlaceHolder.Controls.IndexOf(item) - 2];
Control div = AdvPlaceHolder.Controls[AdvPlaceHolder.Controls.IndexOf(item) - 7];
string divText = (div as Literal).Text;
_TheLookup.AddLookupCondition((list as DropDownList).SelectedValue, (item as TextBox).Text);
(div as Literal).Text = divText.Replace("display:none", "display:block");
}
}
}

_TheLookup.GroupXML = GroupInfo.RebuildGroupXML(_TheLookup.GroupXML);
}

I have starred (***) the erroring line.

My initial thought is that perhaps in the background somewhere SLX is still only allowing criteria for those columns that are in the group - but im yet to find where it does this.

Any help greatly appreciated!!

Thanks very much,

Nick

[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 © 2024 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): 11/26/2024 5:00:49 AM