I have a custom DropDown field populated with prevalues and want to display it in the list view, however the listview shows the id stored, not the text prevalue:
How can I get the text prevalue in the angular controller. e.g. in Razor you could use something like @umbraco.library.GetPreValueAsString(Model.YourProperty)
Get Text value for DropDown field in custom ListView Layout
Hi,
I am using Umbraco 7 and following the tutorial at https://24days.in/umbraco-cms/2016/custom-list-view-layouts/ for creating a custom ListView Layout.
I have a custom DropDown field populated with prevalues and want to display it in the list view, however the listview shows the id stored, not the text prevalue:
How can I get the text prevalue in the angular controller. e.g. in Razor you could use something like @umbraco.library.GetPreValueAsString(Model.YourProperty)
Thanks,
Nick
The question is 5 years old at this point, but I ran into the same problem.
The solution is to take the first value from the array like so: {{value[0]}}
In the listview you would set it like this:
Hope this helps someone.
is working on a reply...