Need help tp modify ref qualifier to fetch values

Atheher Fathima
Mega Guru

Hi All,

 

My Requirement is that i have a lookup select box variable with the reference qualifier as "javascript:'u_catalog_item=a255e73b87fb9d90d82afcc6cebb3561^u_key=gcp_costcenter_name^u_active=true^u_parent='+current.variables.line_of_business" 
I would now like to modify it such that if u_parent='+current.variable.gc_dep' then it should populate the value where parent is gc_dep, if parent is line_of_business then it should populate variables where parent is line of business. could you please help.. 
I tried the below code,but doesnt work

 

javascript: 'u_catalog_item=a255e73b87fb9d90d82afcc6cebb3561^u_key=gcp_costcenter_name^u_active=true^u_parentIN'+(current.variables.gcp_dep?current.variables.gcp_dep+',':'')+current.variables.line_of_business

 

basically we have created few variable lookups with parent as line_of_business and few with parent as gcp_dep. I would like this field to get values for gcp_dep. line_of_business will always have value but gcp_dep may or may not have.

 

please help

2 REPLIES 2

sushantmalsure
Mega Sage
Mega Sage

Hi @Atheher Fathima 

 

Try this:

javascript:if(current.variables.gcp_dep!=''){'u_catalog_item=a255e73b87fb9d90d82afcc6cebb3561^u_key=gcp_costcenter_name^u_active=true^u_parent='+current.variables.gcp_dep}else{'u_catalog_item=a255e73b87fb9d90d82afcc6cebb3561^u_key=gcp_costcenter_name^u_active=true^u_parent='+current.variables.line_of_business};
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure

@Atheher Fathima  Did you get the chance to check and test above ?

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure