Can Articulate Select a Numbered Variable with the Highest Number and Show it?

Mar 14, 2016

Hi guys,

 I've been tasked with creating a checkbox system that creates a diagnosis at the end. I work for a training company and the idea is that the user would tick boxes that apply to areas in which their business could need improvement. The end result would show a course we could offer that could fix most of the problems they have listed. The best suited course for them if you will.

 I don't have the data yet so I've made a mock-up using football teams. There's a few questions on what criteria you prefer then it shows all the current Premier League teams and their respective scores to what you selected. The team with the highest amount of points is more suitable to the users needs.

 Ideally I would like the results page to show the top scoring team ONLY. I'm not sure how I could go about this. Any brainy people out there able to help me out?

 Here's what I've made so far: http://s3.amazonaws.com/tempshare-stage.storyline.articulate.com/stp1adqa2e5r31b6ncjisvh61is24/story.html

 Cheers.

6 Replies
Walt Hamilton

Create 2 variables: BestName and HighestScore

Create two starting triggers: Set BestName to Arsenal and set HighestScore to ArsenalScore

Create two triggers for each option: Set BestName to Aston Villa on Condition AstonVillaScore > HighestScore and set HighestScore to AstonVillaScore  on condition AstonVillaScore > HighestScore.

Continue for each option, and show BestName and HighestScore.

This can be done in javascript, but by the time you populate an array with the data, I don't know if it would any easier or not. Sorry, my javascript is pretty rusty.

Jordan Defty

That's cool. Yeah I've not touched java in years. I understand the code when I see it but can't write it very well. A buddy of mine who writes java suggested doing it as a branch interaction, sort of how dialogue works in modern video games (if you're into that kind of thing). I'll give your idea a go! Thanks for the help!

This discussion is closed. You can start a new discussion or contact Articulate Support.