Load Temp Workspace

Have been trying to customise a version of the original script so that the tagFilter contains two tags and requires both the tags are “status::wip, dosh”. Tried let tagFilter = “status::wip, dosh” and added let tagFilterRequireAll = true.

I can’t get the script to select the required Drafts but if I add let queryString = “status::wip AND dosh”; the selection works as I expected.

Without the queryString value the script seems to use the tags in an OR select. What am I missing?

Thanks

Ian

Could you share your actual code? It would be easier to troubleshoot specifics.

This is the specific script. Thanks for coming back to me.

// BEGIN config variables
// setup tags or searches you wish to load…
let name = “Live Dosh”;
let tagFilter = “status::wip, dosh”
// let tagFilterRequireAll = true
let queryString = “status::wip AND dosh”;
// END config variables

// create workspace
// for other options, see:
// Redirecting…
let ws = Workspace.create();
ws.name = name;
ws.tagFilter = tagFilter;
ws.queryString = queryString;
ws.setInboxSort(“modified”, true);
ws.setArchiveSort(“modified”, true);

// unless you call ws.update(), this ws is temporary
// load this workspace, and display draft list

app.applyWorkspace(ws);
app.showDraftList();

This is the code I currently use and it lists the Drafts I am looking for. I would prefer to be able to use tags.

It doesn’t look like you ever set tagFilterRequireAll on the actual workspace, you just define a boolean variable. Try this for the setup:

let ws = Workspace.create();
ws.name = name;
ws.tagFilter = tagFilter;
ws.tagFilterRequireAll = true
ws.setInboxSort(“modified”, true);
ws.setArchiveSort(“modified”, true);
1 Like

That works, thank you.

Thank you too for explaining and so promptly.

Ian