Page 1 of 1

How to skip response items mapped to a list?

Posted: Thu Apr 25, 2013 10:44 am
by w

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.


How to skip response items mapped to a list?

Posted: Thu Apr 25, 2013 11:06 am
by Maryna Brodina

Hello! Let us know if this helps https://getsatisfaction.com/apperyio/...


How to skip response items mapped to a list?

Posted: Thu Apr 25, 2013 11:13 am
by w

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


How to skip response items mapped to a list?

Posted: Thu Apr 25, 2013 11:43 am
by w

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


How to skip response items mapped to a list?

Posted: Thu Apr 25, 2013 11:59 am
by Maryna Brodina

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


How to skip response items mapped to a list?

Posted: Thu Apr 25, 2013 12:02 pm
by Maryna Brodina

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