FormulaValidator - Quick Notes
=============================

If Windows blocks the EXE before first run
------------------------------------------
If FormulaValidator.exe was downloaded and Windows blocks it, unblock the file before running it:

- Right-click FormulaValidator.exe
- Select Properties
- Check Unblock
- Select Apply

Or use PowerShell:
Unblock-File "C:\path\to\FormulaValidator.exe"

What this tool does
-------------------
Checks Archer calculated field formulas and creates an HTML report for each application you ask it to process.

Interactive mode
----------------
Run FormulaValidator.exe with no arguments to enter values step by step.
The tool prompts for base URL, token type, token, and one or more application names separated by commas.
After each batch, the tool asks: Process more applications? (y/n):
Enter y to select more applications (connection details are reused) or n to exit.

Recommended way to run it
-------------------------
Use the named-argument format below. It is the easiest option for Command Prompt, PowerShell, and batch files.

FormulaValidator.exe --base-url "https://your-instance.example.com" --token "YOUR_SESSION_TOKEN" --applications "Policies,Audit Plan"

If you leave off http:// or https:// in the base URL, the tool defaults to https://.
Use a token for a user with access to the applications, levels, and calculated fields you want to validate.
Processing every application in a single run is intentionally not supported to avoid excessive system load.

Authentication note
-------------------
The tool supports Archer session tokens and PAT tokens.
For the standard REST API login flow used to obtain a session token, see:
https://help.archerirm.cloud/api_2026_02/content/api/restfulapi/segmentsresources/authentication.htm#Login

If you use a PAT token
----------------------
Add --token-type pat

Example:
FormulaValidator.exe --base-url "https://your-instance.example.com" --token "YOUR_PAT_TOKEN" --token-type pat --applications "Policies,Audit Plan"

If application names have spaces
--------------------------------
Keep the full application list inside quotes:

--applications "Policies,Audit Plan,Third Party Oversight"

Optional one-line format
------------------------
The tool also supports a single quoted argument:

FormulaValidator.exe "https://your-instance.example.com|YOUR_TOKEN|Policies,Audit Plan|session"

Important:
- Quote the whole value because the | character is special in Command Prompt and PowerShell.
- If you leave off the last value, the tool assumes a session token.

Simple batch example
--------------------
@echo off
FormulaValidator.exe --base-url "https://your-instance.example.com" --token "YOUR_SESSION_TOKEN" --applications "Policies,Audit Plan"

Output
------
The report is written to the same folder where you run the command.
Each report file name uses this format:

<application-name>_yyyyMMdd_HHmmss_report.html

Need help?
----------
Run:

FormulaValidator.exe --help
