imperial.mack
Posts: 0
Joined: Thu May 31, 2012 12:45 pm

Mapping to Select Menu

I'm creating a dropdown of different restaurants by type

I tried to drag "Class" to "selectmenuitem1 label" like shown here http://help.gotiggr.com/documentation... but it wouldnt let me. It only works if I drag "$" to "selectmenuitem1" first but then I cant populate the name, address, and phone fields for the restaurants. Im using Kinvey as the backend.

Image

Image

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Mapping to Select Menu

Just to make sure I understand, you want to map the same collection to the menu and grid?

imperial.mack
Posts: 0
Joined: Thu May 31, 2012 12:45 pm

Mapping to Select Menu

Correct. and using kinvey I just thought I'd add a "Class" column to each restaurant and put in the type of restaurant in the cell.

I just want the dropdown to be dynamic and load restaurants depending on the cruisine type selected

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Mapping to Select Menu

Here is what you can do.

Open the service editor, Response Parameters panel. Then manually add another response collection and the data you want to map. For example, you will end up with something like this:

$
__Name
__Class
__....

$
__Name
__Class

this way you can map one of them to the menu and one to the grid.

Do insert at least one static element into the menu, otherwise it won't work (it's a known bug).

imperial.mack
Posts: 0
Joined: Thu May 31, 2012 12:45 pm

Mapping to Select Menu

Works!!! but is there some way to remove duplicate entries in the dropdown?

Image

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Mapping to Select Menu

Unless that's the actual data, you shouldn't get any duplicates. How does your mapping look?

imperial.mack
Posts: 0
Joined: Thu May 31, 2012 12:45 pm

Mapping to Select Menu

yes I see duplicates for each restaurant, 25 "American", and one "African", but problem also is when i select "African" is just refreshes the page and doesnt show the one African restaurant I have in there.

Image

Image

Image

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Mapping to Select Menu

Where exactly do you see duplicates..?

The list won't automatically refresh (two separate components), you need to filter the list based on the value selected form the menu.

imperial.mack
Posts: 0
Joined: Thu May 31, 2012 12:45 pm

Mapping to Select Menu

How would I go about filtering the list based on the value selected from the menu?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Mapping to Select Menu

Read the selected value, make a request to Kinvey (check their API - what filtering options they have), get the result and display it.

Return to “Issues”