lowcoder icon indicating copy to clipboard operation
lowcoder copied to clipboard

[Feat]: Add global variable for application name

Open lanedsmu opened this issue 9 months ago • 2 comments
trafficstars

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.

lanedsmu avatar Feb 12 '25 15:02 lanedsmu

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

FalkWolsky avatar Feb 13 '25 12:02 FalkWolsky

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?

BobLouderback avatar Feb 13 '25 17:02 BobLouderback

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

Image

milversilva avatar Jun 04 '25 20:06 milversilva