1

I am trying to name an output using inline variable substitution. I first use the calculate value utility to obtain the string I want (its name is Date in the model). I set this as a precondition so the value gets calculated before the name is required. It all works well, except that when running the tool from the geoprocessing panel it should show the calculated value as a name suggestion which is a tool parameter, instead it shows %Date%.

How do I show the calculated string itself as a suggestion for the tool parameter instead of the inline expression when running the tool?

See image below

enter image description here

1 Answer 1

1

I'm pretty sure what you want is not achievable. The inline variable is evaluated when the tool is executed, not when it has been opened up as a tool ready to take an input, as in your case the default value %Date%.

Logically if the value is calculated and the user has no control over this calculation then there appears to be no need for it to be exposed as a parameter. This would avoid users seeing %Date% and becoming confused.

2
  • To honor the add to display command it requires to be a parameter, plus I am trying to suggest a name that the user can then modify
    – Oscar
    May 13 at 14:35
  • If you are simply suggesting a template to the name but always want them to create it you could put an example of what you want in the item description of the parameter, so when they click on the info icon they see your advice, this is good tool design anyway. It then relies on them actually following your advice! If the structure of the name is crucial to the remaining model logic I would go for computing it and not exposing it as a parameter.
    – Hornbydd
    May 13 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.