Probably a safe bet you are using the version of the action from this tip.
That action builds the list of available “list” drafts in the following code in the script:
// finds existing "list" drafts
function getListDrafts() {
let drafts = Draft.query("", "all", [tag])
return drafts
}
The Draft.query
function can also take sorting parameters. If you altered that code to be:
// finds existing "list" drafts
function getListDrafts() {
let drafts = Draft.query("", "all", [tag], [], "name")
return drafts
}
It would sort those by the text content before displaying them in the prompt.