AnsweredAssumed Answered

Display text unless null, if null display text of next attribute colum

Question asked by dafiter Champion on Oct 10, 2014
Latest reply on Oct 13, 2014 by dafiter

I have trail data.

I want to show map tips if the trail has a name.

Unfortunately, I cannot change the data. I want the Name to be displayed. If Name is Null then displayed the Group_ field if not the group then Route_2 and if not Route_2 then Route_1

 

My code right now looks like this:

 

 

dojo.connect(Layer, "onMouseMove", function (evt) { 

 

 

                    if (evt.graphic) { 

                        if (evt.graphic.attributes) { 

                            ShowMapTip(evt, "<b>Name</b>: " + evt.graphic.attributes.NAME ); 

                        } 

                    } 

                }); 

 

                dojo.connect(Layer, "onMouseOut", CloseMapTip);

 

routeNull.png

 

Any suggestions would be greatly appreciated!

Outcomes