Page 6 of 7
How to map a distinct array of results from a column (field) to a list?
Posted: Wed Oct 02, 2013 8:08 pm
by Maryna Brodina
Hi, instead preFoundList.append('<li>' + option + '</li>');/pre please use preFoundList.append('<li> <a name="mobilelist_FoundItems_ITEMNAME">' + option + ' </a> </li>');/pre
where mobilelist_FoundItems_ITEMNAME is the item name in mobilelist_FoundItems List where you add the event.
How to map a distinct array of results from a column (field) to a list?
Posted: Fri Oct 04, 2013 2:11 am
by bahar.wadia
Awesome !
It works.
Thank you soooo much
How to map a distinct array of results from a column (field) to a list?
Posted: Tue Sep 23, 2014 8:44 pm
by Sam Safo
just for clarification, what do you mean by ITEMNAME, I thought mobilelist_FoundItems is the item name.
How to map a distinct array of results from a column (field) to a list?
Posted: Wed Sep 24, 2014 11:43 am
by Maryna Brodina
Hello!
What is your List component name and listitem name?
How to map a distinct array of results from a column (field) to a list?
Posted: Wed Sep 24, 2014 12:01 pm
by Sam Safo
The list component name is mobilelist_2, and the listitem name is makeList.
How to map a distinct array of results from a column (field) to a list?
Posted: Wed Sep 24, 2014 12:07 pm
by Maryna Brodina
Then instead mobilelist_FoundItems_ITEMNAME you should use makeList. Let me know if works this way.
How to map a distinct array of results from a column (field) to a list?
Posted: Wed Sep 24, 2014 12:15 pm
by Sam Safo
Thanks Maryna.
I have got it to work but the problem is that when you click on the resulting list, the click event is not working.
i.e. I wanted to assign a local storage variable with the text of the item I have clicked on. The process I used was;
I assigned a click event to makeList which 'Set storage variable' but when I click nothing happened.
what am I doing wrong?
How to map a distinct array of results from a column (field) to a list?
Posted: Thu Sep 25, 2014 1:24 am
by Yurii Orishchuk
Hi Sam,
For this goal you can use following solution:
1 Activate list item. http://prntscr.com/4q1saf/direct
2 Add "Click" JS event handler to this item. And populate it with following code: http://prntscr.com/4q1try/direct
pre
//GetItem text
var currentItemText = jQuery(this).text();
//Set text to LSV.
localStorage.setItem("itemText", currentItemText);
alert("text = " + currentItemText);
/pre
That's all.
Regards.
How to map a distinct array of results from a column (field) to a list?
Posted: Thu Jan 29, 2015 6:56 am
by Rui Song Chong
Hi, is there a way to get the distinct list to display on the collapsible set?
How to map a distinct array of results from a column (field) to a list?
Posted: Thu Jan 29, 2015 4:35 pm
by Illya Stepanov
Hi Rui -
Any list can be mapped to a component that has list-alike structure, collapsible set is one of them.