This afternoon I moved a collection. I used the “File > Move” command to perform the process. When I went to run a report - nothing happened. On investigating I realised that the report script was using a file path to specify the location of a report template. The file path was not updated when the files were moved.
Is it possible to use relative paths or to use system variables in the script files? I’m able to print templateparent
and dataparent
in the template but when I try to use system variables in the script I get errors. Here’s the output in the log file.
Starting to play script located at /Users/malcolm/Library/Mobile Documents/iCloud~com~powersurgepub~notenik~shared/Documents/WorkRecords/reports/query_script.tcz on 18/01/2024 at 8:08:03 PM
Setting maximum directory depth to 1
Initializing Collection
Collection: /Users/malcolm/Library/Containers/com.powersurgepub.notenik.macos/Data
This path does not point to a Notenik Collection
Problems opening the collection at /Users/malcolm/Library/Containers/com.powersurgepub.notenik.macos/Data
Field label of ticket could not be found in input source
Creating filter rule: ticket eq Artworks
0 Notes passed the filter rules
0 Notes were filtered out
Sort field label of title could not be found in input source
Creating sort field: ascending
Sort field label of ticket could not be found in input source
Creating sort field: ascending
Error reading Template from =$templateparent$=/query_template.html -- file:///Users/malcolm/Library/Containers/com.powersurgepub.notenik.macos/Data/
Template Read Error: Error Domain=NSCocoaErrorDomain Code=260 "The file “query_template.html” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/malcolm/Library/Containers/com.powersurgepub.notenik.macos/Data/=$templateparent$=/query_template.html, NSUnderlyingError=0x600000d68300 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
Template not ready for output generation!
0 lines read from template file
Script execution complete on 18/01/2024 at 8:08:03 PM