w
Posts: 0
Joined: Tue Mar 26, 2013 12:30 pm

How to skip response items mapped to a list?

If I have a service response connected to a list, how can I skip items based on certain criteria, and not adding them to the list?

So suppose my service response consists of a list of emailaddresses. I connect this response in the "edit mapping" to a list in the UI.

But some of the emailaddresses returned will be empty, and I don't want them to be in the list as empty list items.

If I do "edit js" with the mobilItem, and return an empty string or null, then still an empty list item is shown in the list.

w
Posts: 0
Joined: Tue Mar 26, 2013 12:30 pm

How to skip response items mapped to a list?

So the technique is to use element.closest("table").hide(); ? Is "table" the tablename or mobilelistitem or literally "table" ?

w
Posts: 0
Joined: Tue Mar 26, 2013 12:30 pm

How to skip response items mapped to a list?

Why is it element.closest and not $(element).closest ?

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

How to skip response items mapped to a list?

In this case https://getsatisfaction.com/apperyio/... "table" is a literal. There user searches the closest table and hide it (as he maps results to outputGrid - Grid component).

In your case you would need to use selector for you current situation. So if you work with list - selector would be "li". On service success event add the following JS to refresh the list:

codeAppery("mobilelistName").listview('refresh');/code

where mobilelistName - List name

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

How to skip response items mapped to a list?

Because you transmit JQ element, you don't need to use $.

Return to “Issues”