GP tools support variables like %t% — Where is documentation?

452
2
Jump to solution
04-21-2023 05:35 PM
Bud
by
Notable Contributor

In a related post@JonathanNeal said:

Tools support %t%, but looks like I can only make it stick to a double field, not a DateTime field. 

[That's] because the number is too large.

Bud_0-1682123464918.png

…There is also %t%, %n%, and %v% (%i% is legacy replaced by %n%).

Where can I find information about those 'percent' variables in the docs?

Thanks.

0 Kudos
1 Solution

Accepted Solutions
JonathanNeal
Esri Contributor

@Luke_Pinner Yeah, the above are system inline variables and apply to all tools, it would be nice to doc these somewhere, but struggling to find the right location other than ModelBuilder...  Will send a note to our doc lead and see if there is a place we can expand.

How it works:
The tool dialog input generally runs validation on each input.  But, if the input has %something% input validation is postponed until runtime validation is called.  At that point the Geoprocessing framework populated the above variables %t%, %n%, and %v% (%i% is legacy replaced by %n%) and knows what values to replace them with prior to running the validation.

View solution in original post

2 Replies
Luke_Pinner
MVP Regular Contributor

Inline variable substitution

But I didn't know that was applicable to tools as well as model builder.

JonathanNeal
Esri Contributor

@Luke_Pinner Yeah, the above are system inline variables and apply to all tools, it would be nice to doc these somewhere, but struggling to find the right location other than ModelBuilder...  Will send a note to our doc lead and see if there is a place we can expand.

How it works:
The tool dialog input generally runs validation on each input.  But, if the input has %something% input validation is postponed until runtime validation is called.  At that point the Geoprocessing framework populated the above variables %t%, %n%, and %v% (%i% is legacy replaced by %n%) and knows what values to replace them with prior to running the validation.