Start a new topic
Answered

Define Icon Dynamic Folder

Hi all,


I've tried to define custom icons using rjon (dynamic folder) but it is not working.


I am trying to define it under Properties with the CustomImageName property. I want to refer to a custom path/folder (not the default IconLibrary), and the files are PNG.


Here is what I've tried:


"Type": "Folder",

"Name": "name",

        "CredentialsFromParent": true,

        "Properties": {

            "SecureGatewayFromParent": true,

            "CustomImageName":"full path icon",

       },



Once I run the Dynamic Folder script,  I see a "?" icon instead of the icons - I am using python Script with Dynamic Folder.


Can someone help with this, please?


Thanks


Best Answer

Hi Leandro,


first, please don't nest "SecureGatewayFromParent" in a "Properties" object as it's a natively supported rJSON property.

For more information about RoyalDocument properties vs. rJSON properties and how to mix them, please see the following documentation.


Regarding images...

Currently, the only way to assign a custom icon to an object using rJSON is by using the "IconName" property. And yes, you can only specify icons from our built-in icon libraries there.

Unfortunately, there's currently no way to specify a custom icon from another source.


If you'd like to see support for setting custom images that come from other sources in a future update, please post a feature request in our "Ideas" forum.


thx,

Felix


Answer

Hi Leandro,


first, please don't nest "SecureGatewayFromParent" in a "Properties" object as it's a natively supported rJSON property.

For more information about RoyalDocument properties vs. rJSON properties and how to mix them, please see the following documentation.


Regarding images...

Currently, the only way to assign a custom icon to an object using rJSON is by using the "IconName" property. And yes, you can only specify icons from our built-in icon libraries there.

Unfortunately, there's currently no way to specify a custom icon from another source.


If you'd like to see support for setting custom images that come from other sources in a future update, please post a feature request in our "Ideas" forum.


thx,

Felix

Hi Felix, Thank you. I dropped the custom icons into the library and it is working now.

@LeandroRamos


I'm probably wrong for suggesting this, but I've been able to do this by adding the custom icon as base64 data to the Properties/CustomImage field.  It seems to work, although sometimes needs the folder to reload and/or actually open the connection before I see it.


(PS: I build my rJSON with Powershell, for what it is worth, so the below is part of a PS object which is later made JSON with ConvertTo-JSON.  I'll bet the same works with directly-written rJSON, though.)


(PPS: I can't remember if CustomImageList="{}" is required or not...)


(PPPS: it's the HP logo, if you are interested...)


            Properties = @{
                CustomImage = 'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIpSURBVDhPZVM9a1RREJ0gFiIiIiIiVmJhESxERMRSLESs/AUi1iIhiKSSICEETd5792VREVlCQLGQLYJYWAQLUUnIfXfWKCKaSkRERESW8Dxz7t1dHxazO3tnzpkzHyt1XY/8a5J1RyXXS9J6vVWKcF2cfsf3K3FhRgp/TB7WWxr5A6f1Yae4agrgb0gek7vdHeL8GxDUQ/M/QJZJprsbBAQX1SKSegh+Edc9KvN6AhU3mwS0Hkg6Mvtuz5DA6RQDMWFJple3s9L/4GRrm5KHlrUj7Nn6jEFjvygzn7dBxVXJqxLtbEC6ARZIStN7yH2P2CnBw80EriXzH6UMhyD9MIIXqK6oJkGwLnfW9krpj0jRPZcGnFEFPl4OCJy2Wd2queoBCXJ9ApJbUVVYQvXZOODwlAXj1Pvy9SwVWEXzb6Nq5n9zoFbdZJdvT9K3d9sKHmP/mfdI3McbMAKuFXNwuhKHqtdQ9QUGuAv+DWIiwWDX00zM9RkSJqNkXSYwSl6Bjdn6kBPbzvUTCHBhmf5C38d5aVbdJM+ZTLzP+4MEGbjwB6D0DIB/YtFwH1swkK1EJ9IxbSS5j+Evx01gHrleQXx8oNjISz0tPIZ4NP1DShZ6UlaXOQubdiPGC21znayA2wZJJwVi0pz/KuX6frR2fig5gYvw3AZOrH3Q4XBwGE5/puRHfOdNJLDJdlW7D24Q8Ie1Y+fpqoJ9Uz7+XGwBA7OeIXuIqUf+Au2NImoQtRmdAAAAAElFTkSuQmCC';
                CustomImageList = "{}"
            };

 

Login or Signup to post a comment