So I've got a website that I want to extend by letting people look up postal/zip codes for an address they enter. I've already got all the addresses (with their postal codes) for the city in an ArcSDE geodatabase.
What I'd like to happen is that the user will enter a civic number, select a street from a dropdown list and then upon clicking a button the postal code for the address will appear in it's text box.
I've created a script tool that takes two arguments: civicNumber and streetName and then uses a search cursor to get the postal code for the address. If it finds the postal code the tool uses arcpy.AddMessage() to return the postal code.
This actually works, I've turned the tool into a GP Service and tested it from the web and the postal code is indeed being returned in a esriJobMessageTypeInformative
JSON object.
My question is this: Is there any way for the Python script to return the Postal Code as a string without using the arcpy.AddMessage()
function?