Get displayvalue from variable set by name?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2023 03:25 PM - edited 08-08-2023 03:39 PM
I would like to get a specific value from a variable set. I can do this by indexing to the specific value in the array but I would like to pull it by its name. Any thoughts on the correct syntax for this?
var vs = set.getFlatQuestions();
template.print("Print 0: " + vs. Get(0).getDisplayValue() + "<br>");
template.print("Print 0 Name: " + vs.get(0).getName() + "<br>");
template.print("Print by Name: " + vs.get('<name from above>') + "<br>");
Have tried multiple ways to get the Print by Name line to work that either end with a blank line or "unspecified" as a result.
0 REPLIES 0