Select to view content in your preferred language

How to Add a Dropdown in a Custom Tool To Select Datasets Within a Pro Project

365
2
07-28-2022 10:38 AM
by Anonymous User
Not applicable

I have a custom tool to export attachments from an attachments table. The tool works fine, but I'd like to have a dropdown to select a table that is already in my Pro project. This would make it easier for my users to use the tool so that they wouldn't have to always go inside the database and find the table. Many existing Pro tools have this ability, and it would be nice if there was a way to enable this for a custom created tool. Here's an example dropdown from an existing Pro tool:

jmweidler_3-1659029860726.png

 

0 Kudos
2 Replies
RhettZufelt
MVP Notable Contributor

Right click on the export attachments tool you are using and select properties.  Select the Parameters on the left, select the input field you want as a drop down list of layers in the TOC and change the Data Type to Feature Layer, Direction is Input.

They you will have the dropdown you are wanting.

In fact, if you right-click on the Pairwise Buffer tool used in your example, and select properties, you will see how/where to set parameters like this:

RhettZufelt_0-1659030892827.png

 

R_

0 Kudos
by Anonymous User
Not applicable

Thanks! I originally had the data type set as 'Table', when I switched it to 'Table View' then the dropdown appeared. Not sure why that makes a difference.

jmweidler_0-1659033599210.pngjmweidler_1-1659033625334.png

 

0 Kudos