Return Values From Search List
Thu 23 Jan 2020 - 15:28
Hi,
We are calling a search list with the following code:
This search list allows users to select an associate. I would like to return the name of the associate the user has selected. How can I add a new key to the KeyValueCollection returned by the searchlist and set the value of the key to the name of the associate the user selected?I assume I use the "ItemSelected" event on the search list - what is the code to access the key collection that will be returned?
Thanks.
________________________________________________________________________________________________________________________________
Hi
The way to add a field to the Return Values in your search list is in the Search List Editor in the Admin Kit. Make sure you return the Associate Name in the Databuilder and then add it in to the Return Values.A code sample to return the AssocName
________________________________________________________________________________________________________________________________
So Simple!
Thank you!
________________________________________________________________________________________________________________________________
We aim to please,
________________________________________________________________________________________________________________________________
Hi,
How do we do this if the search list is a multi select list? The value of (Convert.ToString(returns["assocName"])) is now just the last one we have selected? Thanks,
Romie
________________________________________________________________________________________________________________________________
Hi
To use Multi Select you will need to Construct a Searches service object.Sample Below
Regards
Danny
We are calling a search list with the following code:
- Code:
FWBS.Common.KeyValueCollection returns =
FWBS.OMS.UI.Windows.Services.Searches.ShowSearch("GRPASSOCPICKER", new System.Drawing.Size(700,700),null, keys);
This search list allows users to select an associate. I would like to return the name of the associate the user has selected. How can I add a new key to the KeyValueCollection returned by the searchlist and set the value of the key to the name of the associate the user selected?I assume I use the "ItemSelected" event on the search list - what is the code to access the key collection that will be returned?
Thanks.
________________________________________________________________________________________________________________________________
Hi
The way to add a field to the Return Values in your search list is in the Search List Editor in the Admin Kit. Make sure you return the Associate Name in the Databuilder and then add it in to the Return Values.A code sample to return the AssocName
- Code:
FWBS.Common.KeyValueCollection returns =
FWBS.OMS.UI.Windows.Services.Searches.ShowSearch("GRPASSOCPICKER" ,new System.Drawing.Size(700,700),null, keys);
if (returns != null)
{
FWBS.OMS.UI.Windows.MessageBox.ShowInformation(Convert.ToString(returns["assocName"]));
}
________________________________________________________________________________________________________________________________
So Simple!
Thank you!
________________________________________________________________________________________________________________________________
We aim to please,
________________________________________________________________________________________________________________________________
Hi,
How do we do this if the search list is a multi select list? The value of (Convert.ToString(returns["assocName"])) is now just the last one we have selected? Thanks,
Romie
________________________________________________________________________________________________________________________________
Hi
To use Multi Select you will need to Construct a Searches service object.Sample Below
- Code:
FWBS.OMS.UI.Windows.Services.Searches sch = new FWBS.OMS.UI.Windows.Services.Searches("SCHCOMWEBFAVS");
sch.Size = new System.Drawing.Size(700,700);
FWBS.Common.KeyValueCollection[] returns = sch.ShowEx(null);
if (returns != null)
{
foreach (FWBS.Common.KeyValueCollection ret in returns)
{
FWBS.OMS.UI.Windows.MessageBox.ShowInformation(Convert.ToString(ret["CDNOTES"]));
}
}
Regards
Danny
Permissions in this forum:
You cannot reply to topics in this forum
|
|