<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thank you.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
the LOOKUP seems to be a natural alternative to IF-THEN, it worked well.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Cheers</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Diego</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Scott Hameister <scotth@mpowerinnovations.com><br>
<b>Sent:</b> June 3, 2021 16:51<br>
<b>To:</b> MapGuide Users Mail List <mapguide-users@lists.osgeo.org><br>
<b>Cc:</b> Diego Ordonez <diordonezr@hotmail.com><br>
<b>Subject:</b> Re: [mapguide-users] Tooltip - Expression Editor - IF THEN</font>
<div> </div>
</div>
<div>
<div dir="ltr">LOOKUP(streetname, 'NO MATCHING VALUE', 'WALNUT STREET', 'IS WALNUT STREET', 'INTERSTATE 495', 'IS I-495')<br>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Thu, Jun 3, 2021 at 1:20 PM Gordon Luckett <<a href="mailto:gordon.luckett@arrowgeomatics.com">gordon.luckett@arrowgeomatics.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">I am not sure the IF statement is working as designed right now.
<div>You could try it as 'CALCULATION' in the data source, and then you have it without having to do it in the Tooltip.</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Thu, Jun 3, 2021 at 5:41 PM Diego Ordonez <<a href="mailto:diordonezr@hotmail.com" target="_blank">diordonezr@hotmail.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Thanks Gordon.</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
This is Real Time data from Public Lamps (lights) in a city in Colombia, it works really well by the way.</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I'm writing the Tooltip like this:</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-family:Consolas,Courier,monospace">'Estado: ' , estado, ' -- ',</span><br>
<span style="font-family:Consolas,Courier,monospace">IF ('Trim(estado) = "Encendida"' , 'ON', 'OFF'), '</BR>',</span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
But still it always shows "<b>OFF</b>" regardless of the value of the column "estado"</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
May be my syntax is wrong, something about the quotes ??</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<img size="60923" style="max-width: 100%; height: auto;" data-outlook-trace="F:1|T:1" src="cid:183041f3-dbe4-49bf-aa58-1f6960d9635f"><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<img size="79378" style="max-width: 100%; height: auto;" data-outlook-trace="F:1|T:1" src="cid:7d9afb48-151c-4fcb-a89d-a94e6e3eeddb"><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div>
<div id="x_gmail-m_8999857123586964244gmail-m_8757427647448924579appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr style="display:inline-block; width:98%">
<div id="x_gmail-m_8999857123586964244gmail-m_8757427647448924579divRplyFwdMsg" dir="ltr">
<font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> mapguide-users <<a href="mailto:mapguide-users-bounces@lists.osgeo.org" target="_blank">mapguide-users-bounces@lists.osgeo.org</a>> on behalf of Gordon Luckett <<a href="mailto:gordon.luckett@arrowgeomatics.com" target="_blank">gordon.luckett@arrowgeomatics.com</a>><br>
<b>Sent:</b> June 3, 2021 12:02<br>
<b>To:</b> MapGuide Users Mail List <<a href="mailto:mapguide-users@lists.osgeo.org" target="_blank">mapguide-users@lists.osgeo.org</a>><br>
<b>Subject:</b> Re: [mapguide-users] Tooltip - Expression Editor - IF THEN</font>
<div> </div>
</div>
<div>
<div dir="auto">Perhaps it's not matching?
<div dir="auto">Try the <span style="background-color:rgb(245,245,245); color:rgb(218,16,57); font-family:ui-monospace,sfmono-regular,menlo,monaco,consolas,"liberation mono","courier new",monospace; font-size:14px">TRIM()
</span>function?</div>
</div>
<br>
<div>
<div dir="ltr">On Thu, Jun 3, 2021, 4:59 PM Diego Ordonez <<a href="mailto:diordonezr@hotmail.com" target="_blank">diordonezr@hotmail.com</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hello All</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I have a question that in theory should be fairly easy, but I'm having trouble</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Trying to show a tooltip based on the value of an attribute (From Postgresql 12 - Mapguide 4.0 Ubuntu 16.04)</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
The name of the column is estado, it has two values "Encendida" (ON) or "Apagada" (OFF)</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<b>'Estado: ' , estado, '</BR>',<br>
</b></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<b>IF ("estado" = 'Encendida', 'ON', 'OFF'),</b><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<b><br>
</b></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="background-color:rgb(255,255,255); display:inline">The first line works with no issue, showing the right "estado" (status).</span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="background-color:rgb(255,255,255); display:inline"><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
What is the syntax to write in the ToolTip Expression Editor ? The second line </div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I've tried different ways but it always shows OFF even if the LAMP is on in the database.</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Thanks in advance for your help</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Diego</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<b><br>
</b></div>
</div>
_______________________________________________<br>
mapguide-users mailing list<br>
<a href="mailto:mapguide-users@lists.osgeo.org" rel="noreferrer" target="_blank">mapguide-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapguide-users" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
</div>
_______________________________________________<br>
mapguide-users mailing list<br>
<a href="mailto:mapguide-users@lists.osgeo.org" target="_blank">mapguide-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapguide-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="x_gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr"><br>
</div>
<div dir="ltr">
<p class="x_MsoNormal">Scott Hameister<br>
Director of Product Development, mPower <br>
Office: (920) 204-4660<br>
Mobile: (920) 419-6250<br>
<a href="https://app.salesforceiq.com/r?target=5c34f41b4cedfd007747a3b5&t=AFwhZf3uRUFWDgvND2EbqI2crJOi53NBE6Ls4CS5iEOCXbh9jil0WVTsMm4fezKWqPb1SeT_s-8clggtORXGYKDi83WlBKQsv0OzcZ-faieKtZuJzqXtVIo_15rPtWIkHUGrc_gC8v51&url=http%3A%2F%2Fwww.mpowerinnovations.com%2F" title="http://www.mpowerinnovations.com/" target="_blank" style="color:rgb(17,85,204)">www.mpowerinnovations.com</a></p>
<span style="font-size:11pt; line-height:15.6933px; font-family:Calibri,sans-serif">Follow us on <a href="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" title="https://www.linkedin.com/company/mpower-innovations-inc/?viewAsMember=true" target="_blank" style="color:rgb(17,85,204)">LinkedIn</a><a href="https://app.salesforceiq.com/r?target=5c34f41b4cedfd007747a3b6&t=AFwhZf3uRUFWDgvND2EbqI2crJOi53NBE6Ls4CS5iEOCXbh9jil0WVTsMm4fezKWqPb1SeT_s-8clggtORXGYKDi83WlBKQsv0OzcZ-faieKtZuJzqXtVIo_15rPtWIkHUGrc_gC8v51&url=https%3A%2F%2Ftwitter.com%2Fmpower_GIS" title="https://twitter.com/mpower_GIS" target="_blank" style="color:rgb(17,85,204)"></a>!<br>
Like us on <a href="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" title="https://www.facebook.com/MPower-Innovations-Inc-1887644641563150/?ref=bookmarks" target="_blank" style="color:rgb(17,85,204)">Facebook</a>!</span><br>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>