同步操作将从 Gitee 极速下载/tooljet 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
id | title |
---|---|
workspace-environment-variables | Workspace Variables |
Workspace Variables are the variables with some value(usually tokens/secret keys/API keys) that can be used in different apps across the same Workspace.
Suppose there is an API key
or a value that you want to use in the queries or widgets in the multiple apps of the same Workspace then the Workspace admin or the user with permissions can add an environment variable.
Workspace
optionsManage Environment Variables
Add New Variable
buttonName
to the variable, set the value, choose Type
, toggle Encryption
, and click Add Variable buttonClient: The client variable can be used in widgets and queries.
Server: The server variables can be used with all the queries except the RunJS
. The reason why we don't allow the server variables to be used with the widgets is that these variables are only resolved during the runtime so they're highly secured.
:::info Variable Type cannot be changed once it has been created. :::
This feature enables us to add a client variable with and without encryption
. The server variables are always encrypted by default.
Let's use the variable that we created here. If you have used ToolJet before, then you know that for getting the values from any variable we use JS notation i.e. {{}}
but for using the Workspace variables we have different opening and closing notation %% %%
. The environment variables will not work inside js code {{}}
.
So, the syntax for using the variable that we created before will be %%client.pi%%
Example for client variable usage:
Example for server variable usage:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。