Welcome, Guest Login

Support Center

Adding a Selected Icon to a List

Last Updated: Mar 18, 2014 02:40PM EDT
Let's say you'd like to flag the current item in a list with a special icon, here's how you can do it.

First, when the user taps on item in the list that's associate with the data source, set the variable "mychoice" to hold a unique value from the current record. Let's say that's stored in [[ds:/mydb/items/uniqueid]] .

Secondly, in one of the image fields in the list (right image, disclosure icon or left image) use an expression like this:

    [[ds:/mydb/items/uniqueid:ifequalvar mychoice,matches.png,does-not-match.png]]

In this case, each item in the list will display either "matches.png" or "does-not-match.png". If you'd prefer to only show an image when the two things match, use an expression like this one.

    [[ds:/mydb/items/uniqueid:ifequalvar mychoice,matches.png]]

By omitting second value, you'll get an empty string back if the value in the uniqueid field doesn't match the variable "mychoice".

Help us improve! Rate this article:

Yes I found this article helpful

Ask a Question   

support@eachscape.com
http://assets1.desk.com/
false
eachscape
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete