Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

How to map a distinct array of results from a column (field) to a list?

Hi, instead preFoundList&#46;append('<li>' + option + '<&#47;li>');/pre please use preFoundList&#46;append('<li> <a name="mobilelist_FoundItems_ITEMNAME">' + option + ' <&#47;a> <&#47;li>');/pre
where mobilelist_FoundItems_ITEMNAME is the item name in mobilelist_FoundItems List where you add the event.

bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

How to map a distinct array of results from a column (field) to a list?

Awesome !

It works.

Thank you soooo much

Sam Safo
Posts: 0
Joined: Tue Sep 23, 2014 8:44 pm

How to map a distinct array of results from a column (field) to a list?

just for clarification, what do you mean by ITEMNAME, I thought mobilelist_FoundItems is the item name.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

How to map a distinct array of results from a column (field) to a list?

Hello!

What is your List component name and listitem name?

Sam Safo
Posts: 0
Joined: Tue Sep 23, 2014 8:44 pm

How to map a distinct array of results from a column (field) to a list?

The list component name is mobilelist_2, and the listitem name is makeList.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

How to map a distinct array of results from a column (field) to a list?

Then instead mobilelist_FoundItems_ITEMNAME you should use makeList. Let me know if works this way.

Sam Safo
Posts: 0
Joined: Tue Sep 23, 2014 8:44 pm

How to map a distinct array of results from a column (field) to a list?

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?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

How to map a distinct array of results from a column (field) to a list?

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

&#47;&#47;GetItem text
var currentItemText = jQuery(this)&#46;text();

&#47;&#47;Set text to LSV&#46;
localStorage&#46;setItem("itemText", currentItemText);

alert("text = " + currentItemText);

/pre

That's all.

Regards.

Rui Song Chong
Posts: 0
Joined: Sat Jan 17, 2015 10:51 am

How to map a distinct array of results from a column (field) to a list?

Hi, is there a way to get the distinct list to display on the collapsible set?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

How to map a distinct array of results from a column (field) to a list?

Hi Rui -

Any list can be mapped to a component that has list-alike structure, collapsible set is one of them.

Return to “Issues”