Tag Property Nested Parameter Binding

Is this going to work to have a parameter binding offset bound to another parameter?

ns=1;s=[{Device_ascpt}]{Legacy_ascpt}SLUDGE_STG_ANALOGS{Analogs_ascpt}[{Hr_Index_ascpt+{Hr_Mn_Offset_ascpt}}]

If not, how do I do this? Sometimes it’s +10, other times it’s +6

should just be {Hr_Index_ascpt + Hr_Mn_Offset_ascpt}, I think. No need for nested curly braces

No, I just get a general config error with that

Not sure but this might work:

{"Hr_Index_ascpt" + "Hr_Mn_Offset_ascpt"}

Weird, seems to work fine for me

try {Hr_Index_ascpt} and {Hr_Mn_Offset_ascpt} in your binding by themself and see if you get the parameter value by them self at all?

1 Like

Ok, ya it worked. By binding on the parent UDT was messed up. Thanks!

1 Like

Wait, so this works?

yes

1 Like

Nice! I never knew this was possible

UDT parameter "bindings" like this are weird. They run way before anything else in the stack, essentially by doing literal string replacement on the raw configuration, before anything has had a chance to run.
This is both powerful, and headache inducing (see the ~bimonthly posts where someone asks why they can't use "{}".format() in a UDT script). :person_shrugging:

everyone just ignores this, myself included :smile:

image

1 Like

I’d forgotten about that one. I think it’s only an issue if you put names inside the braces e.g. “{0}”.format(…) compared to "{}”.format(…)

I got Claude to find relevant posts for an example: