Applying sysparm_query fitlers to open list from client side ui action

RenukaB
Tera Contributor

Hi All,

 

I am trying to open a List view of table from a Client side UI action while applying the filters using sysparm_query parameter in the url. The list opens correctly , but the filters I'm passing via the url are not being applied, even though they appear in the url string.

6 REPLIES 6

I see that now.  Which table is your UI Action on?  Your url is using the sys_id of the record that you came from as both = the test_execution_id and != u_test_execution_suite.  Is u_test_execution_suite a reference field that you added to the sn_test_management_test table?

 

I did some tinkering on the list view itself without getting there from any UI Action and could get a query by adding it to the beginning - not sure if the order matters, or my simplified example:

 

The URL for the default list on the Test Management 2.0 > Tests module (all) is

 

/sn_test_management_test_list.do%3Fsysparm_userpref_module%3Dee8af73d87420300b9392c7c87cb0b35%26sysparm_clear_stack%3Dtrue

 

but if I only want to see TEMT0001001 I can change it to

 

/sn_test_management_test_list.do%3Fsysparm_query%3Dnumber=TEMT0001001%26sysparm_userpref_module%3Dee8af73d87420300b9392c7c87cb0b35%26sysparm_clear_stack%3Dtrue

Hi Brad , 

This code is not working for the project workspace as it has some compatibility issue , I have tried various methods still its not showing and also the "Add Tests " button is showing on the workspace but this button is not working . Could you provide the code which is working for the project workspace . 

I am providing you the UI Action script and please provide me the workspace code for this .

 

function gotoTestListPage() {
    var gUrl = new GlideURL(window.location.href);
    var url = "/sn_test_management_test_list_board.do?sysparm_class_name=sn_test_management_test&sysparm_test_execution_id=" + g_form.getUniqueValue() + "&sysparm_stack=no&sysparm_view_name="+ g_form.getViewName();
    if(gUrl.params['sysparm_goto_url']) {
        url += '&sysparm_goto_url=' + gUrl.params['sysparm_goto_url'];
    }
    window.location.replace(url);
}