Skip to content

FlexVars ​

What this is ​

FlexVars are named variables you define once and reuse in scripts, FlexDash widgets, and reports. Each variable has a type, optional default, and a scope (organization, client, site, or device). Values resolve from the most specific scope upward.

Who can use it ​

Anyone with FlexVars access. Creating or changing variables needs create/edit rights for FlexVars.

How to open it ​

  1. In the left side menu, click Flex Center™.
  2. On the Flex Center page, open the FlexVars tab.

Left side menu with Flex Center™ selected

Flex Center page with FlexVars tab selected

Do the task ​

Create a FlexVar ​

  1. Click Add (or Add FlexVar when the list is empty).
  2. In Add New FlexVar, set the name, type, and default value.
  3. Choose scope (organization, client, site, or device). For client-scoped vars, pick the client.
  4. Types include string, number, boolean, json, checkbox, encrypted, and html (sanitized HTML cards for FlexDash).
  5. Optionally enable:
    • Encrypt this variable — store the value encrypted at rest (not allowed with html)
    • Mark as secret — mask the value in Script Execution RuntimeVars UI (not allowed with html)
    • Required variable — devices must provide a value
  6. Click Create.

Add New FlexVar modal with name, type, and options

Names ending in Key, Password, Secret, or Token suggest Mark as secret on create (you can uncheck).

Edit or delete a FlexVar ​

  1. Stay on the FlexVars tab.
  2. Use the row actions to open Edit FlexVar, then click Update — or delete the variable.
  3. Deleted items may move to the Recycle Bin tab.

HTML cards (agent or system) ​

Use an html FlexVar when you want a rich card on FlexDash. Example from a script:

powershell
Set-FlexVar -Name STATUS_CARD -Value '<div style="padding:8px"><strong>OK</strong></div>'

Values are size-limited and sanitized (scripts and handlers are stripped). FlexDash renders them safely in the portal.

System-managed vars ​

Some FlexVars show as Managed by Security. Agents and portal users cannot overwrite them. An example is SECURITY_VULN_SUMMARY (device HTML card from security disposition). Refresh those from disposition actions on the device when needed.

Scopes and inheritance ​

Effective value resolves Device → Site → Client → Organization → Default within your organization.

Device overrides win for that endpoint. Breaking inheritance stops a device from picking up parent values until you restore it.

Use in scripts ​

  1. In the left side menu, click Scripts.
  2. Open FlexVars Help for Get-FlexVar / Set-FlexVar syntax.
  3. For one-shot values at execute time, use RuntimeVars when you run a script.

Tips ​

  • Prefer Mark as secret for credentials and tokens so they stay masked in runtime UIs.
  • Do not combine html with encrypt or secret options — the form blocks those combinations.
  • After deleting a FlexVar by mistake, restore it from Recycle Bin before permanent delete.

OnPoint RMM knowledge base