system.getProjectName Not returning project name


I have an issue where system.project.getProjectName and system.util.getProjectName are both returning blank responses however when I use system.project.getProjectNames the response shows the project name.

The logging script I've set up is not showing much information as to why this is happening. On my other designers this is not occurring and system.project.getProjectName results in the project name being displayed correctly.

Any ideas on why this could be occurring?


It depends on where you're executing the script which invokes this function. One likely cause is called out in the docs:

When called from a scope that does not have an associated project (a Tag Event Script), the function will return the name of the Gateway scripting project. If a Gateway scripting project has not been configured, then returns an empty string.

1 Like

Thank you cmallonee! We did have a Gateway Scripting Project configured however the name had a typo, so it was returning an empty string. Once the typo was fixed the project name showed up using system.project.getProjectName