ModelBuilder: Fields not available when selecting attributes as a parameter

322
1
11-28-2022 12:52 PM
LDort
by
New Contributor

Hello,

I am creating a tool to be used in the Geoprocessing pane that has data brought in from my organizations Portal connection. I need attributes to be selectable in the geoprocessing pane so I created a variable (an expression) and set it as a parameter. The users of this tool can write an SQL expression to select their attributes but I am wondering if there is a way to have the fields (and possibly the fields unique values) show up in the drop down menu, rather than it be blank. 

I have tried creating a .lyrx template but it seems to just affect the symbology rather than giving me the data's fields. Any guidance would be greatly appreciated.

0 Kudos
1 Reply
DuncanHornby
MVP Notable Contributor

It's not entirely clear what you are asking for, always good to include images in your question rather than blocks of text...

That said is this what you want? I expose the two parameters and when I run it as a tool I get the default drop downs, as if I was running the tool by itself.

 

DuncanHornby_0-1669740028666.png

 

0 Kudos