viperciyes
Posts: 0
Joined: Tue Jan 20, 2015 1:46 am

Create a database app with a Second Level

Hi there.
I watched the video tutorial on youtube "Build a mobile app with database in 5 minutes". After that I followed the tutorial for creating a warehouse app in the databases section. What I can't figure out is how to implement a second level in the database.
For example, in the warehouse app example, we create a database list of products (with milk, cream and tea). If we think of this as level 1, I want to add a level 2 on top of this, so I want to create another collection list: dairy products, hot drinks, cold drinks. When the user selects dairy products, a list should appear with milk and cream, and if the user selects hot drinks, a list with tea should appear. I created the collections but tying them together is really confusing for me. Is there a tutorial for this? I'd be really happy if someone can actually walk me through the steps, as this will be the very base of my app. My database ogizall is open for support. I attached the basic UI I want to use here. With the classes selection, I want to select an item class. when the item class is selected, I want the following list to view any item from the database with the selected item class. I hope I made myself clear. Thanks. Image

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Create a database app with a Second Level

Hello Viperciyes,

Please look at these links, hope they will be useful for you:
https://getsatisfaction.com/apperyio/...
https://getsatisfaction.com/apperyio/...

viperciyes
Posts: 0
Joined: Tue Jan 20, 2015 1:46 am

Create a database app with a Second Level

Thanks. I already scanned the previous questions about this topic. Still can't figure it out. It would be awesome if you guys made a video tutorial or webinar for this. This seems so complicated to do. I'm afraid I won't be able to figure it out without seeing one built and explained in detail.

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

Create a database app with a Second Level

Hello!

Unfortunately there is no way for us to create video tutorials on every specific request...

Please clarify what have you tried and what exactly doesn't work?

viperciyes
Posts: 0
Joined: Tue Jan 20, 2015 1:46 am

Create a database app with a Second Level

I still believe this is an important part of many data-processing applications and there should be a clear and detailed tutorial about it.

What I built is what you can see in the picture. In this veiew, the user will select one class from the dropdown menu, and the list below it will become visible and list the items in the selected class. Now I managed to connect the first collection to thee dropdown menu, the classes show up there ( also the "classes", the name of the collection shows up like an item, I don't know why). What I can't figure out is how to make the list view selected class items. Thanks.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Create a database app with a Second Level

Hi -

You will need to create:
1) A collection that will have name of level2 labels;
2) Add extra column ie 'classes' for level1 collection that should have id of level2 entity to that it belongs;
3) On 'classes' selectmenu value changed add invoke service action which should find all entities from level1 collection with id of selected item in the select menu.
4) On success map result to the list.

viperciyes
Posts: 0
Joined: Tue Jan 20, 2015 1:46 am

Create a database app with a Second Level

3) On 'classes' selectmenu value changed add invoke service action which should find all entities from level1 collection with id of selected item in the select menu.

How can I do that exactly? I know how to invoke service action at valuechanged, but how can I make it search for all entities from level 1?

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Create a database app with a Second Level

Hello,

1) Create local storage variable with at least next structure
[_id|name]
2) On selecmenu value change set variable storage binding to select menu. It will automatically bind it to the current selected item. Set all two variables
3) Then add service invocation action.

Takis
Posts: 0
Joined: Wed Oct 22, 2014 5:10 pm

Create a database app with a Second Level

And how I will keep any values that customer may selected before invocation?

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Create a database app with a Second Level

Hello,

You can set any default value to the Storage variable with a JS code: https://docs.appery.io/docs/appbuilde...

Return to “Issues”