In 2020 everyone is spending more time at home and having video calls with families, friends and colleagues and some are holding quizzes during these calls. It led me to think was it possible to use Alteryx to host these. The short answer is yes you can! I have to acknowledge this is not an original idea and Dr Tim Rains (DRains) first showed me this was possible in 2018. I did though take this on as a challenge, with the objective of not reaching out to him to ask how he solved this. Therefore on a Saturday morning I came up with the following to make Alteryx a Quiz Master.
It was relatively easy to build a process in Alteryx the below screenshot shows the entire workflow, a text input of words you want your computer to speak and a batch macro. In summary how this works is each row of the text input, is read into the batch macro. Per batch the computer speaks out the text within that row of data, plus also waiting a specified amount of time to give the quiz participants time to write down their answers.
The Text Input holds all the text I want my computer to speak, including a welcome message and a list of questions to be asked.
The configuration of the batch macro is really simple with no fields being used in the Group By tab and then for the Questions tab I’m using the field “Questions”, which has all the text to spoken by my computer.
The macro itself has few tools a Macro Input a Filter tool which is being used to select the correct batch every time it runs. Then the next tool is WaitASecond which I can specfity the amount of seconds before the data in the macro is passed downstream in the macro.
The WaitASecond tool is actually a CReW Macro released in 2016 more information about this macro can be found here.
In the Formula tool I am creating two columns one is a VBS_script with the Question column with the text to be spoken, being inputted as a parameter per batch. The second column is a File path location to output the file later in the process.
Next in the process I use a Select tool to remove unwanted fields however it not a requirement. I use a Blob Convert tool, to convert the VBS_Script field created in my Formula tool into a Blob data type.
The reasons for this conversation is shown in the Blob Output tool, where I output the Blob field as a VBS file. With also the option of “Modify File Name By:” with the drop down of “Replacing Entire Path with Field” using the column “Field”.
The result of this Blob conversation and output is a VBS file, where the highlighted text is being replaced per batch. This VBS file alone will play once it’s clicked however I want the file to be played automatically without needing to be clicked.
This is where the Run Command tool comes in and executes a batch file, which calls on the VBS file I’m creating per batch. These makes my computer speak the text within that VBS file every batch.
The syntax within the bat file is very simple it’s just start and the name of the VBS file.
The result of all of this is when I press run in Alteryx Designer is that Alteryx will now become a quiz master and starts to fire off questions.