How to reference custom properties in tasks and templates?
r
ryan.flagler
started a topic
almost 8 years ago
Custom properties are a nice addition, however there is no way to reference them for use in tasks or key sequences. It would be nice if I could do something like the following.
Custom Property Name - user1
Custom Property Value - user1password
sftp user1:$this.cp.user1$@$URI$
Best Answer
S
Stefan Koell
said
almost 8 years ago
Hi Ryan,
you can already refer to custom properties:
You can select the Custom Property in the replacement token menu and then you need to refer to it using only alphanumeric characters without space.
You can select the Custom Property in the replacement token menu and then you need to refer to it using only alphanumeric characters without space.
Regards, Stefan
r
ryan.flagler
said
almost 8 years ago
Oh, very nice! When you reference Custom Properties inside a template, are the properties used from the template itself or from the original connection? Is there an alternative to $this.XXX$ syntax for this? Something like, $source.XXX$ for all properties/fields?
Stefan Koell
said
almost 8 years ago
In general, all replacement tokens refer to the context connection unless the $this.xxx... is used.
Let me know if this helps.
Regards, Stefan
r
ryan.flagler
said
almost 8 years ago
Ahh, this does work. My issue in testing with CustomFields was if the template is set to "inherit from parent" the field will not pull from the context connection. It worked great once i changed that.
This leads me to another question, can CustomProperties be inherited? In my opinion these are much more usable since you can reference them by name compared to custom fields which are more abstract.
Stefan Koell
said
almost 8 years ago
Custom Properties cannot be inherited right now. We could implement that but this would affect all custom properties. Inheriting individual custom properties will not work in the current architecture. Would an all or nothing approach be sufficient?
r
ryan.flagler
said
almost 8 years ago
All or nothing would work, however, what if two custom properties happened to have the same name? Which one would take effect?
Stefan Koell
said
almost 8 years ago
Ok, I will see how fast we can implement inheritance for the custom properties page.
If you have two with the same name, there's no particular order/rule which one is picked. This can be random but I think it will be the first in the list.
r
ryan.flagler
said
almost 8 years ago
Interesting. Obviously we would try to avoid that situation. Would the the reference to a custom property be something that is logged? This would allow us to troubleshoot failed calls if there were issues.
Thanks!
Stefan Koell
said
almost 8 years ago
Right now there's no logging but I will see if we can somehow check if there are duplicates and create a log entry then.
r
ryan.flagler
said
almost 8 years ago
That would be helpful. Thanks Stefan!
Stefan Koell
said
over 7 years ago
Hi Ryan,
the next release will have the inheritance and logging for duplicates on board.
ryan.flagler
Custom properties are a nice addition, however there is no way to reference them for use in tasks or key sequences. It would be nice if I could do something like the following.
Custom Property Name - user1
Custom Property Value - user1password
sftp user1:$this.cp.user1$@$URI$
Hi Ryan,
you can already refer to custom properties:
You can select the Custom Property in the replacement token menu and then you need to refer to it using only alphanumeric characters without space.
Regards,
Stefan
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstStefan Koell
Hi Ryan,
you can already refer to custom properties:
You can select the Custom Property in the replacement token menu and then you need to refer to it using only alphanumeric characters without space.
Regards,
Stefan
ryan.flagler
Oh, very nice! When you reference Custom Properties inside a template, are the properties used from the template itself or from the original connection? Is there an alternative to $this.XXX$ syntax for this? Something like, $source.XXX$ for all properties/fields?
Stefan Koell
In general, all replacement tokens refer to the context connection unless the $this.xxx... is used.
Let me know if this helps.
Regards,
Stefan
ryan.flagler
Ahh, this does work. My issue in testing with CustomFields was if the template is set to "inherit from parent" the field will not pull from the context connection. It worked great once i changed that.
This leads me to another question, can CustomProperties be inherited? In my opinion these are much more usable since you can reference them by name compared to custom fields which are more abstract.
Stefan Koell
Custom Properties cannot be inherited right now. We could implement that but this would affect all custom properties. Inheriting individual custom properties will not work in the current architecture. Would an all or nothing approach be sufficient?
ryan.flagler
All or nothing would work, however, what if two custom properties happened to have the same name? Which one would take effect?
Stefan Koell
Ok, I will see how fast we can implement inheritance for the custom properties page.
If you have two with the same name, there's no particular order/rule which one is picked. This can be random but I think it will be the first in the list.
ryan.flagler
Interesting. Obviously we would try to avoid that situation. Would the the reference to a custom property be something that is logged? This would allow us to troubleshoot failed calls if there were issues.
Thanks!
Stefan Koell
Right now there's no logging but I will see if we can somehow check if there are duplicates and create a log entry then.
ryan.flagler
That would be helpful. Thanks Stefan!
Stefan Koell
Hi Ryan,
the next release will have the inheritance and logging for duplicates on board.
Regards,
Stefan
-
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
See all 275 topics