Change icon dynamically in mobile

Hello,

My problem is the same as this thread

https://www.outsystems.com/forums/discussion/56619/dynamic-icons/

But mine is in mobile, I tried to put a variable containing the icon name in the Icon properties but instead it just plainly shows the variable name instead of what the variable holds.

I wonder if its possible to do this in mobile? 

Thanks in advance!

Hi, friend!

How many different icons you need to show?

An if condition won't work?

Hi Kevin,

Can you provide oml so we can check.


Solution

Hi Kevin Wie,


As per your requirement, I created a small demo application (OS 11 - Mobile application).


Check this: Dynamic Icon List Demo Application

PFA - Includes .oml solution File


-- Use HTML Element as mentioned below


Hope this helps you!

Regards,
Benjith Sam

Solution

Hi,

You can change icons dynamically. Just add the variable to the icons CSS (Style field)

  • For example: "icon " + var1

Where var1 consist the icons css value. For home icon it is "fa-home".  

You can find the values from font awesome homepage.


Please check this document too.


I hope this help you

Cheers

NUno

Benjith Sam wrote:

Hi Kevin Wie,


As per your requirement, I created a small demo application (OS 11 - Mobile application).


Check this: Dynamic Icon List Demo Application

PFA - Includes .oml solution File


-- Use HTML Element as mentioned below


Hope this helps you!

Regards,
Benjith Sam

Thank You Benjith, this is exactly what I needed.


Kevin Wie wrote:

Benjith Sam wrote:

Hi Kevin Wie,


As per your requirement, I created a small demo application (OS 11 - Mobile application).


Check this: Dynamic Icon List Demo Application

PFA - Includes .oml solution File


-- Use HTML Element as mentioned below


Hope this helps you!

Regards,
Benjith Sam

Thank You Benjith, this is exactly what I needed.


You are welcome Kevin :) 

Glad I could be of help!


Regards,

Benjith Sam