I am new to Qlik VB script. I created following script based on my understanding on my knowledge with VBA. I then saved this script in Edit Module and linked the action to a button so every time I click the button it could randomly select x samples from the chart.
Following is my script. All I am trying to do is to randomly generate a row number and put that row number in an array so I can check if that sample is already selected.
The check function in Qlikview did not note any syntax errors. However when I actually click the button, it always open the Edit Module without doing any sampling. Would someone be able to point out anything incorrect in my script and how to fix. I think the vPopulationSize = FieldValueCount("RecordNumber") was not correct but wasn't sure why. Please help!