show (or not) icon in list

I want to show an icon in a tabpanel list view, if certain criteria are met. Otherwise, not. Then, if the icon is visible, the user can click on it for more info. If it is not applicable, the icon doesn’t show.

spyglass.png is an image
rct_howpaid is a textfield, with a valuelist
rct_howpaid_icon is a mediafield and calculation:
if (rct_howpaid == ‘Stock’)
{return ‘what_goes_here?’}
else
{return ‘’}

My question: how do I make the image (spyglass.png) visible? That is, return what in the place of ‘what_goes_here’ to cause it to be visible?

To say it another way, how do I tell Servoy- in a calculation- to either show a stored image in a field or leave it blank?

Thanks,

Jim

Hi Jim,

By heart, you use a html, so far the easy part.

Then you create a link to the media using .

And yes, it is by heart but it is indeed three forward slashes (I think :) )…

Jim

I use this Calculated field to show if a meeting report has been prepared:

if (zrid_meetings)
{
return ‘
}
else
{
return null;
}

In the Table then set the field as HTML with onAction to trigger method to either view the Report or create a new one.

HTH

Graham Greensall
Worxinfo Ltd

Marcel

You beat me by seven minutes this time - I’ll have to learn to type faster :)

Graham

Thanks for the speedy reply, friends!

Jim