Help with a fixed query

alexlazo
Mega Contributor

Trying to write a fixed query to only show records in a table with a matching location to the user opening the table.

Here is what I have for my filter:

&sysparm_fixed_query=u_location=javascript:gs.myUserObject.getLocation()

This returns "All > Location = (empty)

Any ideas what I'm missing?

1 ACCEPTED SOLUTION

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Try this:



&sysparm_fixed_query=u_location=javascript:gs.getUser().getLocation()


View solution in original post

4 REPLIES 4

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Try this:



&sysparm_fixed_query=u_location=javascript:gs.getUser().getLocation()


Perfect! Thank you so much


And could you tell how can we use this "sysparm_fixed_query=active=true" in scripts ?


gratziela
Tera Contributor

Hi Brad,

Is there a way to use the sysparm_fiexed_query in a widget for Portal ?

Regards,