Property Binding - Project Name

I am trying to build an expression that needs the current project name? Is their a reference document with the locations of Property Bindings. I searched the help and the forum. Sorry if this has been asked before!

Are you using Vision or Perspective?

Perspective - had that specified and then changed the title of my post.

You could just add a projectName Perspective session variable and reference that. You’d only have to update it once any time you copy and rename a project.

https://docs.inductiveautomation.com/display/DOC81/system.util.getProjectName

2 Likes

Ah yeah, just gotta add the tag, but it helps a lot.

I am just being clear - I need to write a python script somewhere to move this somewhere usable? I can not use this is an expression correct?

I think that @Transistor has the right idea to just write the to a custom property and then once and done. It may have to be that I am not sure how to write it to view params using a python script or the like without moving it to a tag. I am trying to avoid any tags for this project for internal political reasons.

Make a session custom property and give it a binding with runScript("system.util.getProjectName", 0), and it’ll automatically evaluate and update once on session startup.

1 Like

That was the piece that I was missing. I forget that we could imbed “runScript” into an expression to get the crossover.