Select to view content in your preferred language

Get all the attributes of the selected option in FilteringSelect

1179
2
Jump to solution
05-19-2017 04:19 PM
SaraEL_MALKI
Frequent Contributor

Hi guys,

I have created a filtering Select with five attributes, I wanna get all these attributes after clicking search NOT in "Onchange" method, all what I can get so far is the value of the option selected using .value attributes 

uneVoie={nom:feature.attributes['nom'],nom:""+feature.attributes['nom'],ex_nom:""+feature.attributes['ex_nom'],id:""+feature.attributes['objectid'],tenant:""+feature.attributes['tenant'],aboutissant:""+feature.attributes['aboutissan'],id_voirie:""+feature.attributes['objectid'],};
Lesvoies.push(uneVoie);
new FilteringSelect({
id: "voiSelect",
store: new Memory({idProperty: "id", data: Lesvoies}),
autoComplete: true,
style: "width: 230px;",
searchAttr: "nom"
}, "voiSelect").startup(); }
All I can do is : 
var VoieFound=dijit.byId('voiSelect').value; //ID
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Sara,

Do this:

var fs = dijit.byId('voiSelect');
var item = fs.get('item');
var store = fs.store;
var someValue = store.getValue(item, 'someProperty');

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Emeritus

Sara,

Do this:

var fs = dijit.byId('voiSelect');
var item = fs.get('item');
var store = fs.store;
var someValue = store.getValue(item, 'someProperty');
SaraEL_MALKI
Frequent Contributor

Robert,

your code gave me the error 'store.getValue' is not a function and because of your code I found a shortcut so I will mark your response as correct, thank you sir.

var fs = dijit.byId('nomVoieSel');

var item = fs.get('item');

var valueOfproperty=item['someProperty'];
0 Kudos