Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Form reference field filter

CV1
Tera Contributor

Hi All ,

 

I have a requirement where we have a field(reference) call BU on Case form. For a specific view (manager) on Case I want the BU search to display filtered values available for selection/Lookup using list . I want to filter out 4 BUs from the list.

 

Please advise how this can be done.

TIA

CV1_0-1715797249163.png

 

1 REPLY 1

Filipe Cruz
Mega Sage

Hi @CV1 ,

To do this use the getView method to select the view and then use the filter.setQuery.

var view = getView();
if(view == 'ess'){
 
var filter = g_list.get('ms_what_is_the_sys_instance_name');
   g_form.getValue(variables.ms_environment.toString()); filter.setQuery('sys_class_name=cmdb_ci_lit_server^operational_status=1^ref_cmdb_ci_lit_server.u_server_role=ms^NQsys_class_name=cmdb_ci_db_mssfl_instance^operational_status=1^install_status=1^u_used_for=');
)
}

Let me know if this works for you!

Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!

Best Regards,

Filipe Cruz