Document Generation
...
Template-Resources
Runtime Variable
3 min
introduction a runtime variable in cloudfiles stores a value that can be used within a document template during document generation these variables are used to define static or default values that act as placeholders within a template they are useful for managing values that need to be referenced multiple times within the same template, without hardcoding them in multiple places this makes templates easier to maintain and update runtime variables are commonly used for storing fixed values within a template such as company name, address or standard disclaimers controlling template logic such as showing or hiding content avoiding repeated edits by defining a value once and reusing it across the template runtime variable to create a runtime variable, follow the steps below click resources to open the resource manager in the ' new resource ' pane, select resource type from the drop down as ' runtime variable ' enter a label , and the api name will automatically populate assign a value type based on your requirement such as string, integer, double, etc assign default value as needed once created, the runtime variable can be referenced inside the template and used wherever required value types the value type determines the format of data stored in the runtime variable and how it behaves inside the template string string variables store text based values and are the most commonly used type examples include company name, email address, urls or any static text integer all number fields without decimals can be passed in as integers examples number , phone or fixed numeric values double all numeric fields that allow decimal values can be passed as doubles examples currency , percent , number(with decimals) boolean true/false fields can be passed as boolean values date date variable store calendar dates without time these can be used for fixed dates such as agreement dates or policy effective dates datetime datetime variables store both date and time values these are useful when both components are required in the document time time variable store only the time component without a date rich text area fields storing formatted text content can be passed in as rich text, which includes styling such as bold, italic, and underline; paragraph formatting like line breaks, bullet points, and numbered lists; embedded hyperlinks; and basic html tags (e g\<br>,\<i>, \<p>, \<ul>, \<b>) this type is especially useful for reusable content blocks such as terms and conditions or formatted descriptions
