Forum Discussion

neowinston's avatar
neowinston
Visitor
8 years ago

How to get the string from a selected item in a LabelList?

I need to get the string from a selected item in a LabelList. From the docs I know that itemSelected gives me the index, but not the string. How do I get the selected string? Thank you!

3 Replies

  • I think you need to use the index to look up the value from the LabelList data provider (peudocode, syntax may be wrong)

    list.content[index].title
  • For future reference of others, the specific code I had to use for your use case was:

    m.setList.content.getChild(m.setList.itemSelected).title

    Where m.setList was my LabelList.