You could make a dictionary that maps slider names to result cards and "go[]" to the card corresponding to the top-ranked result:
on click do sliders:likesDogs,likesCats,likesFish,likesChickens order:extract value..name orderby value..value desc from sliders results.likesDogs:"TheDogCard" results.likesCats:"TheCatCard" results.likesFish:"TheFishCard" results.likesChickens:"TheChickensCard" go[results[first order]] end
If your quiz result cards are named to correspond to the sliders, you could skip the dictionary and "go[]" to a card by name:
on click do sliders:likesDogs,likesCats,likesFish,likesChickens order:extract value..name orderby value..value desc from sliders go[first order] end
(Using consistent naming conventions for cards and widgets can often make scripts a good bit simpler!)
If the sliders aren't on the same card as the result-calculating button, you'll need to reference them through their container card. Say the card with the counters is named "counters":
on click do sliders:counters.widgets.likesDogs, counters.widgets.likesCats, counters.widgets.likesFish, counters.widgets.likesChickens order:extract value..name orderby value..value desc from sliders go[first order] end
Or- more concisely-
on click do sliders:counters.widgets @ "likesDogs","likesCats","likesFish","likesChickens" order:extract value..name orderby value..value desc from sliders go[first order] end
Or, if the sliders are the only widgets on that card:
on click do sliders:range counters.widgets order:extract value..name orderby value..value desc from sliders go[first order] end
Does that help at all?