[Solved] Substitution Syntax in Automate Instance



I’m trying to understand the substitution syntax within automation instance fields. I created an instance (System Request type, but I believe it does not matter now) and sent an attribute/value pair to this instance. The value represents a name of another instance I want to launch through a relationship field.

So I tried to substitute this attribute in the value field of the relationship and got confused. Scripting Actions writes the syntax is $\{} with the substitution located between the brackets but that did not work for me. So I looked around in the ManageIQ automation domain for samples and got my relation working with the following syntax: /MyNameSpace/MyClass/${/#myattribute} . However, based on this documentation # represents a message (and I’m not sending one here). I don’t know what the forward slash means here either.

Can you explain how to use substition properly or point to a more verbose documentation?


The format for substitution is


Where object_name can be
/ for root object
. for current object

In the example you mention ${/#my_attribute} you are getting the my_attribute from the root object


Thanks @mkanoor. Omitting the object name completely ${#myattribute} means the current object or is this an invalid substitution?

What is the syntax $\{} the documentation is talking about? I have not seen the backslash in any relations yet.


You are correct if the object name is not specified then the current object is assumed


This picks up the my_attribute from the current object.