I am trying to inform the user about what is going during a GP tool run in my web application. I have used AddMessage and other variations of this, but it is not working, the user is not informed. This is a critical final step in order to make the user aware of the results.
Is there a different way through python to inform the user as the GP tool runs or when it is complete? As I said, all messages are ready, just that they are not appearing in the output pane of the geoprocessing window.
Thanks, I have done this but GP service output just shows the messages for a split second and then removes/hides them. This is quite perculiar to be honest and I am not sure why it does this. On your side do the messages remain in the output pane or they also appear for a split second?
I think that may be something the you'll need to customize with the GP Widget. I found this other Community Post that should get you pointed in the right direction.
https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/wab-how-do-i-customize-output-...
Perhaps there is a timestamp used to display the message so that it does not flicker, but the suggestion above also does not work. Please see below ammended script. And I have checked that the GP parameters to return all Warnings.
# Get the number of affected Households/Parcels
countSelectedFeatures = getCountOfSelectedFeatures(cadastreSelectLayer)
arcpy.AddWarning("Feeder ({0}) in transformer ID {1} will affect {2} Parcels/Households out of {3} household(s)".format(selectedFeederID, transID, countSelectedFeatures, householdNumber))
# Delete the point layer created in order to restart the whole process
arcpy.DeleteFeatures_management(pointLayer)
print (result.GetMessages())
print (arcpy.GetMessages(2))
print (arcpy.GetMessages())