Fabian Unruh
Posts: 0
Joined: Thu Aug 01, 2013 12:15 pm

using user choice to build new list

i'm trying load a second list (villages) from my db based on the selection of the first list (countries).

how can this be done? am i right if i store a local variable based on the user selection to load the right list with the query_service (where column_name = variable?)? are there any examples / tutorials?

i'd really appreciate any ideas.

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

using user choice to build new list

Hello! In mapping to localStorage in request parameter "where" add the following JS:
codereturn '{"columnName": ' + value + '}';/code
where columnName - column name you use to selec
More examples here http://docs.appery.io/documentation/b...

Fabian Unruh
Posts: 0
Joined: Thu Aug 01, 2013 12:15 pm

using user choice to build new list

thanks for the reply.

I inserted the JS into the where clause into the local storage mapping. It only returns an empty list.

Here's what I do:

Page 1: A select box is displayed. Event: On value change I store the local storage variable (name: zipcodeuser value: 8142 (static for testing), then i navigate to the next page.

on Page 2: i have another select box where i map the local variable to the Where clause with JS: return '{"ZIPCode": ' + value + '}'

what am I doing wrong?

I also recognized, that the second page only loads when I make a selection for the second time. the first time it always reloads page 1.

thanks so much for your support.

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

using user choice to build new list

See my reply here https://getsatisfaction.com/apperyio/.... Let's continue there.

Return to “Issues”