M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

Way to display lots of database data

As for this question

I'm not sure im going to be able to have all the data on one line?. How could i make it that each list item becomes a link to a new page with all the data from that db entry?

I'd say that when someone clicks on that list item, save the values to either local storage varibles, or global JS variables, and then in the page show event of the new page, populate the labels with those values.

Cheers,
M&M

Simon Hutchinson
Posts: 0
Joined: Thu Jun 13, 2013 11:18 am

Way to display lots of database data

Thanks again!

What type of control are you using to display the data, just a list? Im sorry if you already answered that but the screenshot looks a diff to what i see?

Simon Hutchinson
Posts: 0
Joined: Thu Jun 13, 2013 11:18 am

Way to display lots of database data

ahh you're using labels :)

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

Way to display lots of database data

I am using a list component...but i guess even the select component should work equally well

Cheers,
M&M

Simon Hutchinson
Posts: 0
Joined: Thu Jun 13, 2013 11:18 am

Way to display lots of database data

So it appears you've used a list and then put labels on top of the list, is that right? and i assume that those labels are hidden?

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

Way to display lots of database data

Well, let me try to post the code based on your screenshot and components

The mapping over here
Image

Should carry the following JS Code

var strConcatenated = value.Name + " " + value.Team + " " + value.ID + " " + value.shirt + " " + value.Minute + value.Reason;

var componentConcatenated = element.find('[name="mobilelabel_18"]');
componentConcatenated.text(strConcatenated);
return value;

Simon Hutchinson
Posts: 0
Joined: Thu Jun 13, 2013 11:18 am

Way to display lots of database data

hi thanks for your help!

i have done this mapping

http://snag.gy/r8v6N.jpg

but i am still only getting one record back, where do you think i might be going wrong?

From what i can tell the JS is used to concatenate data as opposed to loop the data so i don't think its that? (cheers for that, it really helps though!)

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

Way to display lots of database data

I'd say proceed with the troubleshooting this way

First - Just do a regular mapping - to all the individual components...and see if all the records are being retrieved. If yes then we can proceed to the next step, where we just add another label component...and get the JS Script to populate it with the concatenated values.

Cheers,
M&M

Simon Hutchinson
Posts: 0
Joined: Thu Jun 13, 2013 11:18 am

Way to display lots of database data

hi yep absolutely thats what i've been doing and i just cannot get it to loop.

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

Way to display lots of database data

oke can I see the resulting screen? And also the Screen in Design Mode?

M&M

Return to “Issues”