How do I create a new location in the current group?

Hi

I am wondering whether it is possible to create a new location in the current group, without having to specify the full path to the current group, i.e. something like:

create location “/[name of group]” in current group

Thanks

Nick

The command “create location” simplifies the creation of hierarchies and also checks whether the location/hierarchy already exists and therefore adds/creates only missing groups.

To create a new group in the current group, you could e.g. use “create record with {name:“New group”, type:group } in current group” but this doesn’t check whether the group already exists.

Thanks. So, as I need to check whether the group exists I will need to use ‘create location’ command.

I have entered the following line in my script:

set x to create location “snippets” in current group

but even though the current group is a group somewhere down in the hierarchy of my database, the group that is created by this line in the script appears at the top level of the hierarchy in the database, rather than under the current group.

Why would this be so, and is there any way around this?

The “in” parameter supports only databases, the path/location is always absolute starting at the top level.