Vermilion Expression Formatter

Minified Expression:

Formatted Expression:


What is Vermilion

Vermilion was acquired by FactSet in 2016 and is most known for their product: Vermilion Reporting Suite (VRS). VRS is a browser-based solution focused on creating highly customizable, automated reports to meet business needs. More information can be found on this brochure provided by FactSet


Visit HG Insights for more information on which companies are using the Vermilion Reporting Suite to enchance their reporting and FactSet to keep updated on future developments.




Change Log

September 2022

  • Initial Release of the Vermilion Formatter

How to Use

Validator

The Vermilion expression validator returns the first errant character and index (base 0).

  • Current Validations:
    • Check for opening paretheses not properly closed*.
    • Check for closing paretheses missing an opening parenthesis*.
  • Future Validations:
    • Check that all opening quotes are properly closed, destinguishing between single and double quotes.
    • Recognize which parts of the Vermilion expression are within quotes allowing for proper handling of quotes and parenteses to be used as text.
    • Recognize which parts of the Vermilion expression are variables to ensure proper formatting of stored procedure, entity, and system-wide variables.

*Currently, parentheses existing within quotes (i.e. you want to return a parenthesis within your expression) will be counted as a parenthesis tied to a function resulting in a potential false-negative validation


Formatter

The Vermilion expression formatter takes the expression from the left text box ("Minified Expression") and outputs an expanded version of the code in the right text box ("Formatted Expression") using the depth of the "IF" statements to determine the appropriate number of indents


The Vermilion expression can then be read by concatentating the text top-down based on the amount of indents. Looking at the example Vermilion expression on line 10 (IF $_Page Header Type.Show Date Range$=1 THEN), we know that, if this statement is true, we want to call the /formatdate function (in this case, prepended with a dash). The first argument is a date resolving to the value of an entity passed into the underlying record set. The second argument is the date format which will always called if line 10 is true as it resides on the same depth as line 11.


Therefore, if we view plus signs ['+'] as concatenation declarations, lines 11 to the end can be evaluated as such in the following scenarios:


$_Frequency.Type$=YTD == True

  • - /formatdate( + /date(1,1,/year($_Date.SysDate$)) + ,"mm/dd/yy") through /formatdate($_Date.SysDate$,"mm/dd/yy").

$_Frequency.Type$=Weekly == true

  • - /formatdate( + $QueriedStartDate$ + ,"mm/dd/yy") through /formatdate($_Date.SysDate$,"mm/dd/yy").

And so on...

Contact


Feel free to reach out regarding any bugs you find or features you would like to see added