I defined a function as attached picture:
I passed the array of query name and then trigger it sequentially.
I have tested and it worked.
But I have trouble to get the query name and output to the text .
Another question how to reuse this function in other queries?
This post explains how to create reusable functions.