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.
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.
Best Answer
S
Stefan Koell
said
almost 6 years ago
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?
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
B
B3nd3r
said
almost 6 years ago
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.
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
B
B3nd3r
said
almost 6 years ago
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.)
Stefan Koell
said
almost 6 years ago
Glad to hear that! I hope we can fix this issue in the parser with the next release.
B3nd3r
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.
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?
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstStefan Koell
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
B3nd3r
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.
Stefan Koell
What exact version are you using?
B3nd3r
Version: 4.3.60912
Stefan Koell
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
B3nd3r
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.)
Stefan Koell
Glad to hear that! I hope we can fix this issue in the parser with the next release.
1 person likes this
-
What happened to the forum?
-
About this Forum
-
Security Information
-
Supported Secure Gateway (SSH) ciphers
-
Why is no remote file browser in SCP available?
-
What encryption is used in the rtsz files when enabled?
-
Royal TS V4 License File
-
How to resolve RDP resolution issues in Windows 7 with high resolution screen
-
Auto Fill in web page connection
-
How to reference custom properties in tasks and templates?
See all 275 topics