Zum Hauptinhalt gehen

Feature Label - conditional statement?

Kommentare

2 Kommentare

  • Permanently deleted user
    Hi Carmen,

     

    That is an improvement request (GE-2380) that will not be implemented.  You can however try and use custom CSS to help.  Here is an example that was provided for hiding a blank phone number :

     

    What you can do is add the following CSS selector to your Custom/Desktop.css (and others if desired):

     

    div[layerDescVal=""]

     

    { display:none; }

     

    Then, in the HTML for your feature description and/or feature long description, do something like the following:

     

    <div layerDescVal="

     

    {Phone}"><span>Phone:</span><span>{Phone}

     

    </span></div>

     

    When the phone number is blank, it will be hidden.

     

    Regards,

     

    Wayne Richard

     

    Latitude Geographics Group Ltd.

     

    Head Office: 300 – 1117 Wharf Street  Victoria, BC Canada V8W 1T7

     

    Tel: (250) 381-8130 | Fax: (250) 381-8132 | wrichard@latitudegeo.com 

     

    Developers of Geocortex web-based mapping software | www.geocortex.com

     

    An Esri Platinum Business Partner

     

     
    0
  • John Nerge
    That's really cool, and I'm assuming it would apply to all blank values?

     

    If for some reason you wanted to target that specific layer, you could also use a one to one data link to generate the label on the fly. Something like this:

     

    SELECT

     

    CASE

     

    WHEN UNITTYPE <> 'NA' THEN [FULLADDRESS] + ' ' + [UNITTYPE] + ' ' + [UNIT]

     

    ELSE [FULLADDRESS]

     

    END AS FullAddress

     

    FROM YourTable

     

    WHERE YourID = @Id
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.