Vision Template SCAN ERROR Nested Paths not allowed

Ignition Vision Template
8.3.1

In Template custom properties,
I’ve defined several properties.

I am using Tank level NC/NO floats wired to a PLC to determine a value for tank fill level.
The If statement below works when I hard-code the float tag into the formula.
Well not really hared code it, pass it to another custom properties so I can edit the formula in designer

What I would like to do is use the custom properties to determine the float “number

I use the custom properties in the template and it will work in designer when I assign a number to the float.
The float icon color will change correctly based on if tank float is High or Low (1 or 0)

For value of tank level

Hard code the Float number and it will calculate a value.

if(

{[Sample_Tags]Floats/Float 04.value}=1,100,

if(

{[Sample_Tags]Floats/Float 03.value}=1,75,

if(

{[Sample_Tags]Floats/Float 02.value}=1,50,

if(

{[Sample_Tags]Floats/Float 01.value}=1,25,0

))))

If I try to use the “Template Custom Property” as a variable is will give me the error:

SCAN ERROR Nested Paths not allowed.

if(

{[Sample_Tags]Floats/Float {Tank_4Float_2Pump (value).Float_Top_1}.value}=1,100,

if(

{[Sample_Tags]Floats/Float 3.value}=1,75,

if(

{[Sample_Tags]Floats/Float 2.value}=1,50,

if(

{[Sample_Tags]Floats/Float 1.value}=1,25,0

))))

There are several trends on “Nested path errors”
I tried several ways. Custom properties, template parameter tag, Internal properties tag.
I always get the same error. SCAN ERROR Nested Paths not allowed. (line1, char 31)

I thought my best hope was to use CONCAT with in the “IF” statement
but

concat ("{[Sample_Tags]Floats/Float ",{Tank_4Float_2Pump (value).Float_Top_1},".value}")
Will return a value of
{[Sample_Tags]Floats/Float 4.value}
Which is good.

If I try to put that into the “IF” it will not return a value.
if(concat ("{[Sample_Tags]Floats/Float ",{Tank_4Float_2Pump (value).Float_Top_1},".value}")=1,100, …………….

I tried putting () around CONCAT statement but made no difference, will not return a value

I’m at a loss

Any help or thought would be greatly appreciated.

Ps. This is my first project in Ignition.
I’m probably not understanding all the terms in other trends.
Treat me like an idiot when you explain.

The project does work but I would like to make the “IF” statement work using indirect tag to the correct floats.

The more you play, the better you get at making things easier to repeat.

Best regards.

PS, Playing from home so I just made some memory tags to make toggling floats and pumps easier.

Can you edit your post to have your code as preformatted text? It helps with legibility. Please see Wiki - how to post code on this forum.

This line is your issue. Look into how to make and apply indirect tag bindings:

You'll need to create internal custom properties on your template to hold the actual float values. Apply indirect tag bindings to these internal properties, and use them in your if statement.