I have a shortcut that I use as a subroutine to call from a few shortcuts to make additions to my daily journal entry. All my journal entries are markdown files, created by a shortcut, with the title format yyyyMMdd. As you can see from this screen grab, it formats the date, searches for “name:formatted date” in a group called The Journal (which is actually the database name but specifying an actual group makes no difference). Then it should open the one resulting file. (I’ve done the search manually in DTTG - there is only ever one result for any date)
The problem I am having is that it:
- doesn’t limit the search to just that group or even that database and
- presents me with a list of almost all recent modified files to choose from, from all open databases, regardless if their name contains a formatted date or not.
I’m very new to Shortcuts so I’m not best placed to help with this, but…. Am I wrong to say your shortcut doesn’t contain an instruction to search for the current date? I have a shortcut for opening today’s current journal entry, and it has an explicit line that says “search current date” which you don’t seem to have? (You seem to be instructing it to search for a specific “date format”, not the actual date?)
I’ve been chasing this issue off and on for the last few months and I have come to some conclusions.
There have been a few iOS upgrades and Devonthink/DevonthinkToGo upgrades which have made it a challenge to eliminate variables.
This past week though I was able to conclude the following after having to do a bunch of reboots and installs:
Some shortcuts will work exactly as designed for, at most, one day after a reboot of the iOS device.
In the case of this thread, I have a few shortcuts that use a subroutine that asks for a date and then (should) open a specific md file base on the name. It works well for a day and then it will begin to ask you to choose which file from a long list of recent files from every database, even though the shortcut specifies one database.
So at the moment I am chalking this up to Shortcuts weirdness and there’s no shortage of anecdotal evidence of similar experience with shortcuts.
Interesting and thanks for the diligent follow-up. The sporadic nature of the issue is indeed a bit perplexing. Perhaps @eboehnisch has an idea or perhaps (and likely) it’s an issue with Shortcuts.
Shortcuts is so full of “sporadic issues”, one could consider it to be on itself.
“I was thinking it… and you said it” - hahaha!
Well, it should find the document based on the provided name and open that document. Am I safe to assume that when it fails the
Search action simply does not return any document which is why you’re then asked which document to open?