Hello,
Im using typeform questions to generate a set of 10 numerical variables dependent on how they respond to two questions, is there a way to then determine what is the top 6 variables so I can calculate the sum of these.
Thanks in advance,
Niall
Hello,
Im using typeform questions to generate a set of 10 numerical variables dependent on how they respond to two questions, is there a way to then determine what is the top 6 variables so I can calculate the sum of these.
Thanks in advance,
Niall
Best answer by john.desborough
i was faced with a client project that had 25 variables and they wanted to get the to 5 to pass over to their shopify cart page.
it’s not wonderfully pleasant to do all the code inside typeform’s logic rules to get to the top 1 value - essentially you have to evaluate each each variable to see if it is uniquely the highest - individually, in the first set of rules (ie is v1 gt v2 and v1 gt v3 and v1 gt v4 etc… and IF it is uniquely the highest set v1_highest = yes… and do this for each one)
if there is nothing that is uniquely highest you can use rules to evaluate how many times v1 is higher than other variables, adding 1 to a separate variable (ie v1_ishigher_than) and then look at which vx_ishigher_than variable score to which variable is higher..
but what happens if there is a tie for high score? that is another issue
just to get that done to are 2 tied or 3 tied, is a lot of additional rules as well.
NOW if you want to try and get the top 6, you could do this by going from highest score down or from lowest score up - ie reverse the logic approach in the example above → if you did the lowest up, you would only have to the following sort of gyrations for 4 values and not 6… just sayin
the gyrations:
Not really fun at all.. and I have NOT been able to make this work in typeform as of yet - i have spent a number of hours working on it and had to draw the line at making it work cuz it was ‘eating my life’
I even tried to do this inside Google Sheets after connecting the typeform - all the data is in a row for the form entry. all of the Google (and Excel) functions to RANK, SORT etc work on columnar data and not row data .. conceptually you would have to do an arraytranspose on the row data into a column in order to then do the rank/sort function and then do another arraytranspose to write the ‘result data’ into a new set of columns in your data row… That’s how it would work conceptually but my wizardry and appetite to try and make it work ran out of time and no paying client to cover the cost of the ‘research’ it would take to do it.
You SHOULD be able to use the API/Webhooks to push the data into a database and run something there and pull it back into your process BUT that is not ‘my jam’. You should be able to do that with some python coding as well - again ‘fruitless’ for me to do this ..
Pushing it into Google Data Studio may work better to make it all come out in the wash but I just don’t have the time to do that testing at this point.
and after all that yadda yadda… i hope it doesn’t scare you off..
I would check with
des
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.