I am trying to set up a model to do a task that I do every month. Part of that model is a stand-alone python script that creates a file name with the date tagged on to the end of it. How do I write my script so that it returns this string and I can use it as input for another geoprocessing tool? I have searched the forums and help, but can't find any examples of this.
Thanks for the quick responses. After looking into the output parameter, I have added my script to the model as a script tool and created an output parameter as a string type. The file name is hard coded into the script, so I don't have any parameters in the script. Do I need to create one for the setParameterAsText? Can you point me to some examples of what the a script with an output parameter looks like and I can figure out how to plug it into the model?
Thanks everyone for your help. Thanks for that link Dale, that is what I needed to get what I was calling a return value. I created a derived output string parameter for my script tool and added this line to the end of my script: arcpy.SetParameterAsText(0, fileName).