Variables:
A variable is the basic unit of data in Knackly. Think of variables as the smallest building blocks on which your automation system is built. There are several different kinds of variables, which are explained further in the Variable Types section below.
Instructions:
An instruction is a command used to tell Knackly to perform a specific task within your template. Examples of instruction tasks include bringing in content if certain conditions are selected and displaying a list of variables.
Example: if statements are a common use of instructions. They open with an if instruction that includes a True/False variable and close with an endif instruction. Anything in between the if and endif instructions comes into document only when the referenced True/False variable is true. For a True/False variable Married to bring in a spouse’s name only for a married client, you would use: {[if Married]}{[SpouseName]}{[endif]}
Initial Rules:
- Instructions or variables in a docx template or Knackly field must be in paired curvy and plain brackets: i.e., {[VariableName]}
- Instructions or variables that are part of expressions (specific fields in Knackly that are clearly marked as requesting an “expression”) do not need to be in paired brackets: i.e., VariableName
- Instructions must be in lowercase and be one word: i.e., {[elseif]}, not {[else if]}.
- Filters, punctuation, and formatting use the pipe character |. {[PersonName|upper]} with input content “John Doe” would bring JOHN DOE into the template. A list of filters, punctuation, and formatting examples is located here.
- Selections require a double equals sign – the syntax for a single selection variable is {[if ClientState == “Utah”]}, not {[if ClientState = “Utah”]}. This will make more sense once you get further into using Knackly.However, to do the opposite – refer to when a selection variable is NOT a certain value – you use a single equals sign ({[if ClientState != “Utah”]}).