Niels
Posts: 0
Joined: Fri May 02, 2014 12:36 am

Display DB information of entire row through clicking on a listed item

Dear Community,

I'm new and I've been battling with a problem for the better part of the day now: I have single DB with names and corresponding address, zip code, phone number and other information. I created a list service to list the names in the DB.

Now: from that list I would like to display (through labels on a new page) all the other corresponding information (address, zip code, etc.) belonging to that name when clicking on it.
How can I do that?

Any help is much appreciated.

Tooba Atif
Posts: 0
Joined: Fri Apr 04, 2014 3:07 am

Display DB information of entire row through clicking on a listed item

Hi Niels,

Welcome to the community.
I am assuming you have prepared your front end screen.
Here is what you need to do at your screen:

Data tab:
Create the query service for your DB collection using Create new- DataBase service
On start screen tab add Data source - Service - Your list service
On your list service click on edit mapping.
On request tab map your Name field with where input field.

Image

On response tab map the service output with corresponding column names.

Image

On Events tab you can check the code response on service- Complete - Run JS and paste this:

if(jqXHR.responseText === '[]')
{
alert("No record for this name");
}

Design tab:
When name is entered then on Submit button event, call the invoke service (query service).

Hope it helps.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Display DB information of entire row through clicking on a listed item

Hi Niels.

Here is a brief plan below:

1 Create a list page with list component. Init list component with service you need.

2 Create a details page with several labels/input. Create "read" service and map this service to these labels/inputs.

3 Add list item click event handler which obtains listitem id and saves it to LSV. And navigates to details page.

4 When navigate page is loaded. Value from LSV, stored in step 3, obtain and passed to the "read" service.

That's all.

Please try pass this tutorial to understand how to work with ID.

http://docs.appery.io/tutorials/build...

Regards.

Niels
Posts: 0
Joined: Fri May 02, 2014 12:36 am

Display DB information of entire row through clicking on a listed item

Thank you very much Yurii, it worked :)

Return to “Issues”