Start a new topic

Key sequence task question

I am making a new key sequence task and unless I'm doing something wrong It's not working the way I thought it would. Below is my little scenario.


Linux machine and on the machine is a alias for the username. we'll call it $user  in the royalts document is a custom field $customfield1$ that has the command date.


The key sequence looks like this

$user

$CustomField1${ENTER}


However when I run it, it runs the $user variable and outputs the correct info but when it tries to run the $CustomField1$ command I get the following on my screen.


server:~$ $CustomField1$

$: command not found


How come when you run a alias in linux it works but the next line simply tries to type in $CustomField1$ in the terminal instead of passing in what $CustomField1$ actually is. Which is simply the date command. 


I was expecting it to send the $user variable and the value in $CustomField1$


If I change it a little bit and run a non variable first it works correctly. 


Key sequence:

uptime

$CustomField1${ENTER}


It passes in uptime (enter) and then $CustomField1$(date) Enter and I get the following like I would expect. 


server:~$ uptime

 16:19:54 up 92 days, 54 min, 1 user, load average: 0.01, 0.04, 0.02

server:~$ date

Fri Jan 18 16:19:54 UTC 2019


Not sure what I'm doing wrong, but I would love to be able to mix running environment variables and custom fields in the same key sequence task. 


Hi,


by default, the tokens are always resolved in context of the connection you are running the task against. The way you specified the $CustomField1$ token requires you to have the command configured in the connection's custom field 1. In case you want to configure the command in the key sequence task itself, use the token $this.CustomField1$


Let me know if this helps.


Regards,
Stefan

That didn't work. I've attached a couple screenshots showing how the task is set up. It will run the first alias correctly but the second one it will simply output $this.CustomField1$ to the terminal.



What exact version are you using?

Version: 4.3.60912

It seems there's an edge case in the token parser which gets confused when you start with something like $update. When you put a blank behind the $uptime it should help the parser to know that this is not a token. Can you try this workaround with your V4 version?


1 person likes this

HEY that worked. If I have the key sequence like this it works.


$update<space here>

$this.CustomField1$  (passes the word "date" as defined in the custom field 1 slot for this key sequence task.)



Glad to hear that! I hope we can fix this issue in the parser with the next release.


1 person likes this
Login or Signup to post a comment