Hi Everyone,
I am new to OS. Working on O11. I have a static entity and I have assigned a custom icon to each record of the entity. How can I show these icons instead of record labels in dropdown and tables?
Regards,
Rahul Singhal
Hi @Rahul Singhal
I am not aware to any way to fetch static entity record icon but I would suggest to put the icons on the images folder section. After that create a IconURL field on the static entity and pass URL path of the correspondent icon to that field.
I hope it'll help you
ThanksDeep
Hi @Deepsagar Dubey, Thanks for the response but how are you getting the URL for an image, uploaded in image folder. Is it the 'Runtime Path' of the image? Though I used the runtime path but it did not work.
1. Go to Images folder in your Interface tab and import image
2. Go to static entity and add an entity attribute named IconURL (Data Type - Text) and for each record in entity add corresponding IconURL
3. In your screen or table use OS image element and select Type property to external URL and pass IconURL in URL
I hope it'll help you.
Thanks @Deepsagar Dubey. Worked like a charm.
Hi Rahul,
To show the icon in table you can simply use Icon widget and you can set it like this :
For dropdown, you can use DropdownSearch widget that have option to set image url or icon class.
Status.Icon is an attribute that hold the value for icon class name.For instance, fa-check.
Please find the attached oml file for your reference.
Aqil
Hi @Ahmad Aqil, Thanks for the response. In the demo, you are using icon which is already available in OS. How can I use a custom icon/image or how can I add new icon to OS studio?
Here is the updated oml file, in this application here are the steps required :
Useful function. Thanks.