Create Project inside a Folder

OK with Apple Script but how to create a new project inside a folder in JavaScript is confusing me!!

var project = projectNamed(projectName) || new Project(projectName,position:(“Events”))

The above is not doing it?

Peter H

The second argument of that constructor takes Folder or Folder.ChildInsertionLocation objects.

As an example, assuming you have a folder named “Events” at the root of your database, you would obtain a reference to it using folderNamed('Events') — this function returns a Folder object. Is that clear ?

1 Like

Perfectly clear, thank you … working now!

1 Like