Infrastructure Map Server General Discussion

Infrastructure Map Server General Discussion

Reply
Active Contributor
soudemans
Posts: 26
Registered: ‎09-10-2009
Message 1 of 4 (677 Views)

Using condition statements in the tooltip

677 Views, 3 Replies
03-18-2010 09:12 AM
I am working with a shape file and have a numentic subclass field that I want to display in a tooltip (i.e. 1 = 'Sanitarty', 2 = 'Storm', etc). The best way I know is to use some kind of condition statement in the expression. Although the "Create/Modify Expressions" dialog has an if function: If ( [condition], [trueValue], [falseValue] ) I can't get that thing to compile. The basic idea being something like:
If ( [FIELD = 1 ], 'Sanitary', 'Other' ). For now never mind the fact that I only have two conditions. If I can get this to work I can figure out the rest.

OR if someone knows of how to use a case statement in the tooltip expression builder that would be even better. :smileyvery-happy:

Thanks
Valued Contributor
sakkaku
Posts: 51
Registered: ‎01-03-2007
Message 2 of 4 (677 Views)

Re: Using condition statements in the tooltip

03-19-2010 07:33 AM in reply to: soudemans
Have you tried the 'Lookup' function under conversion? It looks like it operates similar to a case statement.

{code}
Lookup ( [expression], [defaultValue], [index], [value], [index], [value], [index], [value] )
{code}
Active Contributor
soudemans
Posts: 26
Registered: ‎09-10-2009
Message 3 of 4 (677 Views)

Re: Using condition statements in the tooltip

03-19-2010 11:18 AM in reply to: soudemans
Sakkaku,

Thanks for the response. Indeed Lookup() behaves like an Immediate IF or a Select Case. Who would have thought.
New Member
paulius
Posts: 2
Registered: ‎12-05-2011
Message 4 of 4 (426 Views)

Re: Using condition statements in the tooltip

12-05-2011 07:00 AM in reply to: soudemans

Hello,

 

I have a similar situacion and can't get working IF conversion.

 

The idea is to show or not the url link, depending on value in properties.

 

if(length(urlLink)>0, 'Show url', 'Don't show url')

 

The problem is that it is not working.. it requires "length(urlLink)>0" to be text value.

 

urlLink - text property with url

 

p.s.

if(urlLink, 'Show', 'Don't show') doesn't work. Everytime it returns false.

 

Anybody have any ideas on this?

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.