lowcoder-org/lowcoder

[Feat]: Add global variable for application name

Opened this issue · 3 comments

Having a variable containing the current application name would help streamline some functionality; we propose adding this alongside, e.g., the url and currentUser variables.

Alternatives
This could be found using the url variable and an API query, but it would be nice if that were more easily accessible via a Lowcoder global data variable.

We agree. Next to "currentUser" could be an "currentApp" variable.

How would this work for modules? Inside the module, I think should return the module name. Outside the module, the app name. However, it might be useful for the module to "know" which app is calling it, so from inside the module, maybe some way to see what the "parent" app is at the moment?

You can get the application ID, if it helps you, follow the code below:
{{url.href.match(/\/apps\/([^\/]+)\//)[1]}}

Image