11/26/2024 4:25:41 AM
|
|
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!
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.
|
|
|
|
Adding Values to Advanced Lookup
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 |
|
|
|
Re: Adding Values to Advanced Lookup
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. |
|
|
| |
| |
|
Re: Adding Values to Advanced Lookup
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 |
|
|
|
Re: Adding Values to Advanced Lookup
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 |
|
|
|
Re: Adding Values to Advanced Lookup
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) |
|
|
|
Re: Adding Values to Advanced Lookup
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
|
|
|
|
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!
|
|
|
|
|
|
|
|