×
Back to Geneos FAQ
How do I pass a parameter from one cell to be applied to a command
Related to Copied
Pass values from cell to be available. Pass parameters, xpaths, get rowname into a command.
Problem Copied
- I want to use a value in a cell to make available to a command.
Possible Solutions Copied
Solution Root Cause 1 - Create a command and add the appropriate x-paths
Example
I have the following dataview and I want to pass the value of a cell into a command - as highlighted in the below screenshot
The Below command will achieve this
<command name="Gateway Echo Test Xpath Table Cell">
<targets>
<target>/geneos/gateway/directory/probe/managedEntity/sampler/dataview/rows/row/cell</target>
</targets>
<userCommand>
<type>script</type>
<runLocation>gateway</runLocation>
<args>
<arg>
<static>/bin/echo</static>
</arg>
<arg>
<xpath>ancestor::gateway/directory/@name</xpath>
</arg>
<arg>
<xpath>ancestor::probe/parameters/@HostName</xpath>
</arg>
<arg>
<xpath>ancestor::managedEntity/@name</xpath>
</arg>
<arg>
<xpath>ancestor::sampler/@name</xpath>
</arg>
<arg>
<xpath>ancestor::dataview/@name</xpath>
</arg>
<arg>
<xpath>@rowname</xpath>
</arg>
<arg>
<xpath>@column</xpath>
</arg>
<arg>
<xpath>@value</xpath>
</arg>
<arg>
<xpath>state/@severity</xpath>
</arg>
<arg>
<xpath>@managedEntity</xpath>
</arg>
</args>
</userCommand>
</command>
Right click the desired cell and choose the command to run
Result
Related Articles Copied
["Geneos"]
["Geneos > Gateway"]
["FAQ"]