If you look at the piped text, there’s an option for “Displayed Choices”, this will give you a list (comma seperated) of all the choices that were displayed.
If you don’t have any special characters or comma’s in your choices, this JS should store them in an ED called choices_shown:
Qualtrics.SurveyEngine.addOnReady(function () {
const quest = this;
const numChoices = quest
.getChoices()
.map((a) => quest.getChoiceDisplayed(a))
.filter((a) => a).length;
Qualtrics.SurveyEngine.setEmbeddedData("choices_shown", numChoices);
});
@ahmedA, thanks for responding. We have special character like comma present in our choices, so do you have any work around to tackle this. Might be if we can replace comma with any other text before counting the displayed choices.