What is wrong with this AppleScript to move item to a specific group?


The purpose of the script below is to move an item with the name “Testing Move Script” located in a group called Temp to a group called Temp1. Both groups are located within the global inbox and the script is triggered from within the global inbox database.

As you can see my understanding of AppleScript is elementary of less.

The error message states that the variable Temp1 is not defined which I don’t understand because it is the name of a group.

thanks very much

tell application id "DNtp" 
set theDatabase to current database
set Target to Temp1
move record "Testing Move Script" to Target
end tell

“set Target to Temp1” specifies variable Temp1
It says nothing about Temp1 being the name of a group

1 Like

thank you. I don’t know how to define group name. May I ask you how to do so ?

I would use something like
set Target to get record with uuid “aaaaaaaaa”

You can retrieve the uuid for your group record via the note link
(I’m not at my Mac, so I can’t be more specific)

1 Like

It puts me on the right track. thanks very much