Version: 8.0.24.0
I am not sure what the intended behavior of this setup should be, but its not the way I was hoping it would work:
"ACME" (Group, type Company, Custom Variable 1: acme.local )
> "Datacenter" (Group, type Site, Custom Variable 1: dc01)
>> "Exchange" (Session, Type: Host, Host field set to: $NAME$.$SITE_CUSTOM_FIELD1$.$COMPANY_CUSTOM_FIELD1$)
[ my understanding is $NAME$ should equal "Exchange" by definition of the session name being "Exchange" ]
>>> "RDP" (Sub-connection of "Exchange" of type RDP. Computer field set to $PARENT_HOST$)
Issue: When RDP is dbl-clicked on the "Computer" field calls $PARENT_HOST$ which should use the Hostname from the Parent session holding the sub-connection.
It does appear to do this pretty well, but I get "$NAME$.dc01.acme.local". It appears to substitute the $SITE_CUSTOM_FIELD1$ and $COMPANY_CUSTOM_FIELD1" but it doesn't touch $NAME$.
I don't know the order of operations for variable substitutions. For example does $PARENT_HOST$ A) go to the parent, and do the evaluation and substitution from the perspective of the parent, or does it B) just grab the string from the parent, and then do the evaluation and substitutions from the perspective of the sub-connection.
If it is A, I would expect $PARENT_HOST$ to evaluate to "Exchange.dc01.pivcon.local"
If it is B, I would expect $PARENT_HOST$ to grab "$NAME$.$SITE_CUSTOM_FIELD1$.$COMPANY_CUSTOM_FIELD1$" from the parent, and then evaluate it from the perspective of the sub-connection, and thus $NAME$ should equal RDP, and it would look like "RDP.dc01.pivcon.local".
However, I don't get A or B, I get "$NAME$.dc01.acme.local" indicating $Name$ is not substituted in a subconnection.
Please advise on how this should work. "A" is the preferred behavior as it allows templates w/ sub-connections to be built that require very little editing. Everything is based of the session name of the parent without having to edit a lot of additional fields (provided the session name using the template is the hostname of the system).
Hi,
This seems to be a complex setup. Would you mind to create an Access database for me to reproduce it exactly?
David Hervieux
David,
Please find access data source attached. I tested against latest 8.0.25.0 and was able to duplicate.
Try dbl-clicking on either the "CmdSubConnection" or the "RdpSubConnection" leaf objects and you'll see $NAME$ is not replaced.
Thanks,
Brett
Test[1].mdb
Thanks a lot. I will check that tomorrow morning.
David Hervieux
This is tricky. I've made a fix and it will work for you. However I only resolve the $NAME$ variable and the inherited one.
David Hervieux