Solved

Filter lobby with Default Coordinator

  • 7 April 2022
  • 4 replies
  • 377 views

Userlevel 3
Badge +7

Hi,

I remember this parameter USER_DEFAULT_COORDINATOR was working fine when using it as default filter parameter for lobbies:

 

 

USER_DEFAULT_SITE is working fine.

 

Any idea what might be the problem or did I use the wrong parameter to fetch the default coordinator?

Default Coordinator in User per Site has been defined.

 

Thanks!

 

 

icon

Best answer by JohanLindstrom 10 May 2022, 09:48

View original

4 replies

Userlevel 7
Badge +11

Hi, Can you please provide the steps you used to get to this point? And the issue in details?

Userlevel 3
Badge +7

Hi @Nalaka Samarasinghe 

I used this setup:

 

The default parameter for coordinator is NOT working, the one for user default site is working perfectly fine.

 

Any idea if there are any other default-parameter I might use for the coordinator?

 

Thank you!

Mattis

Userlevel 4
Badge +8

Hi,

 

These are called Context Substitution Variables and are defined in Solution Manager\User Interface\Context Substitution Variables.

#USER_DEFAULT_COORDINATOR# is not setup as a Context Substitution Variable and will not work as a lobby parameter.


BR

Johan

Userlevel 6
Badge +15

Create your own CSV!

My created CSV finds all of the sites the user has access to - After the script is executed, users would need to sign out and back into IFS again to get it to work

 


declare
name_ VARCHAR2(32000) := 'USER_ALL_SITE';
attr_ VARCHAR2(32000);
info_ varchar2(32000);
objid_ varchar2(32000);
objversion_ varchar2(32000);
begin
client_sys.Clear_Attr(attr_);
Client_SYS.Add_To_Attr('NAME','USER_ALL_SITE', attr_);

Client_SYS.Add_To_Attr('SERVER_METHOD','CUSTOM_LOBBY_API.Get_All_Sites', attr_);
Client_SYS.Add_To_Attr('IMPLEMENTATION_TYPE', 'Server', attr_);
Client_SYS.Add_To_Attr('FND_DATA_TYPE', 'String', attr_);
Client_SYS.Add_To_Attr('TRANSIENT', 'False', attr_);
Client_SYS.Add_To_Attr('MODULE', 'FNDBAS', attr_);

context_substitution_var_api.new__(info_,
objid_,
objversion_,
attr_ ,
'DO');
end;
FUNCTION Get_All_Sites RETURN VARCHAR2
IS

FUNCTION Core RETURN VARCHAR2
IS
userid_ varchar2(30);
--
temp_ varchar2(32000);
CURSOR get_attr IS
SELECT LISTAGG(contract, ';') WITHIN GROUP (ORDER BY contract)
FROM USER_ALLOWED_SITE_TAB
WHERE userid = userid_;
BEGIN
userid_ := Fnd_Session_API.Get_Fnd_User;
--
OPEN get_attr;
FETCH get_attr INTO temp_;
CLOSE get_attr;
RETURN temp_;
END Core;

BEGIN
RETURN Core;
END Get_All_Sites;

 

Then in the lobby data source you can use the following regular expression to filter by all sites as found in the CSV:

 

Users can type in their own sites if they wanted to narrow the filter such as: SITE1;SITE2 in the site lobby parameter

Reply