String variables allow the value of any item type to display as content on any other item.
- Set the ID on the item you want a variable for, such as a Text Input. E.g. altitude.
- Use a string variable to display the variable in another item. E.g. The pattern altitude is ${altitude}
- More complex expressions can also be evaluated. E.g. The pattern altitude is ${Number(runwayElevation) + 1000}
Let’s walk through an example.
Add a new Text Input item. Add the label:
Destination airport identifier
Scroll down and select Characters from Auto Capitalize. This will capitalize each character automatically when we enter the destination airport identifier.
Under the Advanced panel, add an ID for this item:
destAirportCode
Let’s now add another Text Input item. This one we will enter the destination airport elevation. We will do the steps as above, but for this one we will use a Numeric Keyboard Type, and an ID:
destAirportElev
Later on in the checklist, whenever we want to display this information, we can simply use string variables syntax.
For Label 1 we enter:
Pattern altitude at ${destAirportCode}
For Label 2 we enter:
${Number(destAirportElev) + 1000} ft
Notice we can even create expressions in the string variables. Here I am adding 1000 to the airport elevation that we captured earlier. All variables captured in a Text Input are strings. Since we are creating an expression, we need to convert the destAirportElev to a number, as shown. If we were just displaying it we would not have to do that.
Here is the result…