How can you display an icon if a field is not null?
Question

I have a text field in one of my tables that holds a URL.  In the table that displays the list of items in that table has a column for that link field.  I'd like to display an icon only if the link field is not empty.  How do I do that condition?


Thanks!

Solution

So you put the if widget

And you do a condition seeing if has url or not, and if not, it will show an icon

You can play with the oml I sent to you, here in this reply. And you can play with this link

https://marcio-carvalho4.outsystemscloud.com/LinkOrIcon/Entry1.aspx?_ts=637606778326888792

I was reading your question, and You need to do the opposite I did because you want to put an icon when as a link/URL and I put an icon when there is not a link/url. But it's the same thing :)

Best regards,

Márcio Carvalho


LinkOrIcon.oml

So

You have to use the if the condition from OutSystems, and when displaying the data in the list if the link/URL is different from "" you put the icon, I will do a demonstration.

Are you doing in a traditional app?

Best regards,

Márcio

Solution

So you put the if widget

And you do a condition seeing if has url or not, and if not, it will show an icon

You can play with the oml I sent to you, here in this reply. And you can play with this link

https://marcio-carvalho4.outsystemscloud.com/LinkOrIcon/Entry1.aspx?_ts=637606778326888792

I was reading your question, and You need to do the opposite I did because you want to put an icon when as a link/URL and I put an icon when there is not a link/url. But it's the same thing :)

Best regards,

Márcio Carvalho


LinkOrIcon.oml

Ahh easy enough.  Got it working, thanks!!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.