I'm having difficulty understanding and implementing the queryTask at startup of a widget. That is, I need to perform a queryTask and based upon the result.features.length use that value in a conditional statement to continue to load/startup the rest of the way.
The problem is that queryTask.execute happens after the loading is completed and therefore my condition statement will never evaluate correctly. I know this because if you see where there are two console.log() statements, and print out in the console in this order:
First -- console.log("2 workplanCheck value is: ", this.workplanCheckValue)
Second -- console.log("1 workplanCheck value is: ", this.workplanCheckValue)