DropSource Newbie UI question


#1

I haven’t played with the product extensively and I’m wondering about a UI I have in mind. There would be a list of room numbers (text/labels) and next to it there would be one or more icons based on status information for each room (see mockup below). Is there a UI widget that will allow me to dynamically display a set of icons? I don’t know how many icons would be visible for each room, but I could limit the display height to say 5 icons and make people scroll to the right to see others.
ScreenHunter%202082


#2

Maybe something like this…

Dynamic List
-List Row
—Room Name
—Icon space 1
—Icon space 2
—Icon space 3
—…
-…

On the list row add action for:
if api value for Icon space 1 = chair
—Set “Icon Space 1” to image object “Chair Icon”

if api value for Icon space 1 = wifi
—Set “Icon Space 1” to image object “Wifi Icon”

if api value for Icon space 1 = pet
—Set “Icon Space 1” to image object “Pet Friendly Icon”

if api value for Icon space 1 = none
—Set “Icon Space 1” to image object “”

if api value for Icon space 2 = chair
—Set “Icon Space 2” to image object “Chair Icon”

if api value for Icon space 2 = wifi
—Set “Icon Space 2” to image object “Wifi Icon”

if api value for Icon space 2 = pet
—Set “Icon Space 2” to image object “Pet Friendly Icon”

if api value for Icon space 2 = none
—Set “Icon Space 2” to image object “”

if api value for Icon space 3 = chair
—Set “Icon Space 3” to image object “Chair Icon”

if api value for Icon space 3 = wifi
—Set “Icon Space 3” to image object “Wifi Icon”

if api value for Icon space 3 = pet
—Set “Icon Space 3” to image object “Pet Friendly Icon”

if api value for Icon space 3 = none
—Set “Icon Space 3” to image object “”

The API could return the following:
Unique API ID
-Room Name - String
-Icon Space 1 - String = Pet
-Icon Space 2 - String = Chair
-Icon Space 3 - String = Wifi
Unique API ID
-Room Name - String
-Icon Space 1 - String = Wifi
-Icon Space 2 - String = Pet
-Icon Space 3 - String = Chair
Unique API ID
-Room Name - String
-Icon Space 1 - String = Pet
-Icon Space 2 - String = Wifi
-Icon Space 3 - String = none

Does that make sense?


#3

Thanks for the thoughts. The logic makes sense, but it might grow large. There will be about 20 different icons. They could be input in any order. So, for each “Icon Space 1”, I would have to do a test for each of the 20 icons. An then I would have to do this for each string from the API. If the maximum limit of API string returned is 10, I would need 10x20 or 200 conditional statements. It should like I might be better off just displaying the first two letters of the API string instead of converting it to an icon?


#4

Yeah, there might be an easier way but that’s just what comes to mind.


#5

Nothing comes to mind that’s a better solution here then really the ingenious solution @mackenly.j suggest (nice work there!) .

Perhaps considering a UI change would bode a more favorable result? It’s not the most common of situations to have potentially 20 icons appear or not in a cell like that. Maybe a details page to display on the tap of a cell and in a details page you show a table with an icon in each cell so that the data can fill something dynamic?

The original design (dynamic data structure within a dynamic data structure isn’t a strong point for Dropsource. We can do some custom things on the platform but nesting dynamic data within other dynamic data isn’t 1 of those spots. In our defense, I’ve coded apps where I needed to fulfill this need and it’s never a pretty outcome in the source code either.