How to do a value look up in a template

I have a view that has the following options
{ view:“select”,
value: 2,
label:“Action”,
width:200,
height:45,
labelPosition:“top”,
options:[
{ value:"-", id:1 },
{ value:“Read”, id:2 },
{ value:“Meet”, id:3 },
{ value:“Attend”, id:4 }
]
}

The question is how do I display the option value in the template portion of the list view?

template:"#Follow_up_date# - I want the Action value here #Note#",

Hello,

I’m afraid that it is impossible to set template for “select” options.

You may try to use “richselect” instead. richselect allows to customize templates using “suggest” property that allows to customize list inside popup:

...
{ 
    view:"richselect", 
    ...
    suggest:{
	template: "#id# #fruit#",
	data:[
		{ id:1, fruit: "Banana" },
		{ id:2, fruit: "Papai" },
		{ id:3, fruit: "Apple" }
	]
    }
}, 
...

So in the out put there is not a way to display the value in stead of the id. Not it I put #Action# in the template line I get 1, or 2 or whatever the id is but I want the value associated with 1,2,or whatever the action id is. I was looking to call a function of something within the template line.

Make sense?

Can you call a function that will iterate for each time the line is displayed - may be a better way to ask the question.

Template can be set as a function. Template function is called to each data item when it’s rendered and should return html string with item innerHTML. The template from my previous demo can be rewrite as in:

...
template: function(obj){
     return obj.id+" "+obj.fruit
},
...