Mattersphere Developers Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Go down
avatar
Heather@FootAnstey
Posts : 57
Join date : 2018-12-19

[Search Lists] Accessing Return Fields Passed In Empty [Search Lists] Accessing Return Fields Passed In

Fri 17 Apr 2020 - 14:21
Original Post: Gareth Ahmun (Morgan Cole LLP) 05/11/2012 14:18:13

"Hello,
I have a searchlist which in turn calls another searchlist. The first has a return field set. Is there any way to access the return field from the first searchlist in the script of the second searchlist?
Thanks, Gareth"

Responses:

technical [Phil] 05/11/2012 14:26:05
"Hi Gareth,
I've used the below code for a Master/Details type relationship between Searchlists on a screen. so when you select an item on the first screen you then it passes the GUID in this case to the second screen.
//Get Value from the first Searchlist
string ReferrerGuid = slCategory.CurrentItem()[“Category ID”].Value.ToString();

//Collection of parameters to pass to the search list KeyValueCollection kvc = new KeyValueCollection(); kvc.Add(“Guid”, ReferrerGuid);

//Set the sql or stored procedure in this case and pass parameters to the second search list. slProduct.SetSearchList(“udReferrerProd”, null, kvc);
slProduct.Search();

Phil"

Gareth Ahmun (Morgan Cole LLP) 05/11/2012 14:37:59
"Cheers Phil.
I need this to work on a standard searchlist on a tab (as opposed to both on the same screen). It seems like you can access it through the ReplacementParamaters of the second searchlist.
Gareth"

technical [Phil] 05/11/2012 14:47:43
"I've used that as well on other things, this sort of format. this.SearchList.ReplacementParameters.Add(“Directory”, strFolder); That feeds in whatever you want into the other searchlist.
Phil"
Back to top
Permissions in this forum:
You cannot reply to topics in this forum