AnsweredAssumed Answered

What condition can I use to enable a button when a feature is selected?

Question asked by sarahjackel on Oct 1, 2020
Latest reply on Oct 1, 2020 by sarahjackel

I have added a custom button to my config.daml file.  I only want this button to be enabled when there is a feature selected on the map.  Is there a way to be even more specific and enable only when a feature from a certain layer has been selected?

 

I found this condition in the help files, but it enables the button when I select a layer in the Contents list:

condition="esri_mapping_onlyFeatureLayersSelectedCondition"

 

If there is not something already available, how would I create a condition to do this?

 

<button id="ModifyAttributesButton"
   caption="Modify Attributes"
   className="TestProject.Buttons.ModifyAttributesButton"
   loadOnClick="true"
   smallImage="Images\16x16\ModifyAttributes16.png"
   largeImage="Images\32x32\ModifyAttributes.png">
   <tooltip heading="Tooltip Heading">
      Modify project attributes<disabledText />
   </tooltip>
</button>

Outcomes