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

Scott Hameister scotth at mpowerinnovations.com
Thu Jun 3 13:51:19 PDT 2021


LOOKUP(streetname, 'NO MATCHING VALUE', 'WALNUT STREET', 'IS WALNUT
STREET', 'INTERSTATE 495', 'IS I-495')

On Thu, Jun 3, 2021 at 1:20 PM Gordon Luckett <
gordon.luckett at arrowgeomatics.com> wrote:

> I am not sure the IF statement is working as designed right now.
> You could try it as 'CALCULATION' in the data source, and then you have it
> without having to do it in the Tooltip.
>
>
>
> On Thu, Jun 3, 2021 at 5:41 PM Diego Ordonez <diordonezr at hotmail.com>
> wrote:
>
>> 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 ??
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ------------------------------
>> *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>
>> 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
>> https://lists.osgeo.org/mailman/listinfo/mapguide-users
>>
>> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapguide-users
>


-- 

Scott Hameister
Director of Product Development, mPower
Office: (920) 204-4660
Mobile: (920) 419-6250
www.mpowerinnovations.com
<https://app.salesforceiq.com/r?target=5c34f41b4cedfd007747a3b5&t=AFwhZf3uRUFWDgvND2EbqI2crJOi53NBE6Ls4CS5iEOCXbh9jil0WVTsMm4fezKWqPb1SeT_s-8clggtORXGYKDi83WlBKQsv0OzcZ-faieKtZuJzqXtVIo_15rPtWIkHUGrc_gC8v51&url=http%3A%2F%2Fwww.mpowerinnovations.com%2F>
Follow us on LinkedIn
<https://app.salesforceiq.com/r?target=5c34f41b4cedfd007747a3b7&t=AFwhZf3uRUFWDgvND2EbqI2crJOi53NBE6Ls4CS5iEOCXbh9jil0WVTsMm4fezKWqPb1SeT_s-8clggtORXGYKDi83WlBKQsv0OzcZ-faieKtZuJzqXtVIo_15rPtWIkHUGrc_gC8v51&url=https%3A%2F%2Fwww.linkedin.com%2Fcompany%2Fmpower-innovations-inc%2F%3FviewAsMember%3Dtrue>
<https://app.salesforceiq.com/r?target=5c34f41b4cedfd007747a3b6&t=AFwhZf3uRUFWDgvND2EbqI2crJOi53NBE6Ls4CS5iEOCXbh9jil0WVTsMm4fezKWqPb1SeT_s-8clggtORXGYKDi83WlBKQsv0OzcZ-faieKtZuJzqXtVIo_15rPtWIkHUGrc_gC8v51&url=https%3A%2F%2Ftwitter.com%2Fmpower_GIS>
!
Like us on Facebook
<https://app.salesforceiq.com/r?target=5c34f41b4cedfd007747a3b9&t=AFwhZf3uRUFWDgvND2EbqI2crJOi53NBE6Ls4CS5iEOCXbh9jil0WVTsMm4fezKWqPb1SeT_s-8clggtORXGYKDi83WlBKQsv0OzcZ-faieKtZuJzqXtVIo_15rPtWIkHUGrc_gC8v51&url=https%3A%2F%2Fwww.facebook.com%2FMPower-Innovations-Inc-1887644641563150%2F%3Fref%3Dbookmarks>
!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapguide-users/attachments/20210603/01c51ac0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 60923 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapguide-users/attachments/20210603/01c51ac0/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 79378 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapguide-users/attachments/20210603/01c51ac0/attachment-0001.png>


More information about the mapguide-users mailing list