[mapguide-users] Tooltip - Expression Editor - IF THEN

Diego Ordonez diordonezr at hotmail.com
Thu Jun 3 09:41:14 PDT 2021


Thanks Gordon.

This is Real Time data from Public Lamps (lights) in a city in Colombia, it works really well by the way.

I'm writing the Tooltip like this:

'Estado: ' , estado, ' -- ',
IF ('Trim(estado) = "Encendida"' , 'ON', 'OFF'), '</BR>',

But still it always shows "OFF" regardless of the value of the column "estado"
May be my syntax is wrong, something about the quotes ??

[cid:9ebf0fc6-b090-4e51-be57-c1659c7e89e8]

[cid:352c4256-9675-4e4e-9f24-d56ea401c8c8]






________________________________
From: mapguide-users <mapguide-users-bounces at lists.osgeo.org> on behalf of Gordon Luckett <gordon.luckett at arrowgeomatics.com>
Sent: June 3, 2021 12:02
To: MapGuide Users Mail List <mapguide-users at lists.osgeo.org>
Subject: Re: [mapguide-users] Tooltip - Expression Editor - IF THEN

Perhaps it's not matching?
Try the TRIM() function?

On Thu, Jun 3, 2021, 4:59 PM Diego Ordonez <diordonezr at hotmail.com<mailto:diordonezr at hotmail.com>> wrote:
Hello All

I have a question that in theory should be fairly easy, but I'm having trouble

Trying to show a tooltip based on the value of an attribute (From Postgresql 12 - Mapguide 4.0 Ubuntu 16.04)

The name of the column is estado, it has two values "Encendida" (ON) or "Apagada" (OFF)

'Estado: ' , estado, '</BR>',
IF ("estado" = 'Encendida', 'ON', 'OFF'),


The first line works with no issue, showing the right "estado" (status).

What is the syntax to write in the ToolTip Expression Editor ? The second line

I've tried different ways but it always shows OFF even if the LAMP is on in the database.

Thanks in advance for your help

Diego


_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org<mailto:mapguide-users at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/mapguide-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapguide-users/attachments/20210603/494d4a5a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 60923 bytes
Desc: image.png
URL: <http://lists.osgeo.org/pipermail/mapguide-users/attachments/20210603/494d4a5a/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 79378 bytes
Desc: image.png
URL: <http://lists.osgeo.org/pipermail/mapguide-users/attachments/20210603/494d4a5a/attachment-0001.png>


More information about the mapguide-users mailing list