Dot walking in module fixed query arguments

jmuomini
Mega Expert

I love fixed queries in breadcrumbs, but the wiki article only gives one very obvious example of syntax.

Is it possible to dot walk to another table? I want to replace the filter 'Task.Active is true', but 'task.active=true' doesn't work. This is a a module on the Task SLA table. I'd also like to do something like '!task.assignment_group=law help desk' and task.number does not contain or does not start with OS, if there is a way to do that.

Is there a place in the wiki that documents all of the possible query syntax for module lists? That would be really useful. Mostly I've had to pick them up one at a time from forum posts and help desk tickets.

Thanks, JiM

3 REPLIES 3

Jace Benson
Mega Sage

You should be able to do all of that.
I'm not sure what code your using or where but on most tables you should be able to set a onLoad client script. You're code Task.Active is true is not code at all, im sure you know this but instread try;


if (task.active == 'true'){//do something}

Also the other example you typed would probably work with code like this;

if (task.assignment_group == 'THISISASYSID'){//if assignment group is something do this}

---Or---

if (task.assignment_group !== 'THISISASYSID'){//if assignment group is not something do this}


You can also query to other tables by calling out to a glide record, here's an example;

var usernames = [];//create array for usernames
var gr = new GlideRecord('sys_user');
gr.addQuery('active','=','true');//only return active users
gr.query();
while (gr.next()){
//do something
usernames.push(gr.user_name);
}


I'm not sure this is what I'm after. I'm trying to fix queries in application modules. So Instead of if condition is true do something, I want to say {task.assignment_group !== "THISISASYSID'} and other statements. to fix the query for the list of records in that module. Will a client script work if I just have a series of such statements and then call it from the Arguements line in the module?

Thanks


Mark Stanger gave me the simple answer to this. I can build whatever filter I want using the usual filter builder, then go to the list, right click and copy the query, paste it into the Arguments window after &sysparm_fixed_query=, and Bob's my Uncle.