The Lens States in the Indicator tool are controlled by the three fields: 'Lens' Output1, 'Lens' Output2, and 'Lens' Output3 (these are located under the Type and Action settings under the Indicator object properties).
These three fields provide a binary pattern that corresponds to a particular 'Lens' State with 'Lens' Output1 being the LSB and 'Lens' Output3 being the MSB.
For example, if the fields evaluate as 'Lens' Output1 = True, 'Lens' Output2 = False, 'Lens' Output3 = True, this corresponds to the binary pattern 101 which equates to 5 and thus Lens State 5 will be the active one.
So, how do I control the Lens state with a numeric value 0 through 7 then? This simply requires a little logic added to each field. If my tag is called "TagName" then:
The Value for 'Lens' Output1 would be: TagName & 1
The Value for 'Lens' Output2 would be: TagName & 2
The Value for 'Lens' Output3 would be: TagName & 4
This will apply a bitwise AND function between the tag value and the bit we care about for each field. So if my TagName contained the value of 5, the above logic would provide the TRUE, FALSE, TRUE pattern we want (101) and thus Lens State 5 would be active.
Note - you can edit the appearance of each Lens state under the Appearance section of the Indicator object properties.