Page 1 of 1

Add Username to a list of photos saved to database

Posted: Wed Apr 30, 2014 2:43 pm
by Bill Clanton

I am in the process of building a photo sharing app. So far i have my camera page working perfectly getting the photo from the camera or local library and saving it to the database. That part is great. So now i want to show those photos in a feed (list) but i want to include the username of the person that submitted it next to the photo. So i need to be able to grab the name from the users collection in the database for each of the photos.

So far i created a hidden user_id field and i am passing that back to a custom REST service that i used elsewhere in the app to just grab information for a specific user based on their id. But in this case it doesn't seem to be working in the loop to grab it with the list of photos.

I have it set to fire the get user info service after the list service is complete, but I don;t think that is correct.

I think that i am like 90% of the way there i'm just missing a final step i think.

Can you help???


Add Username to a list of photos saved to database

Posted: Wed Apr 30, 2014 3:44 pm
by Evgene Karachevtsev

Hello.

You have to use pointer type for saving your user id in photo collection. You may look here for more information: http://docs.appery.io/documentation/b...
Also you have to use include parametr to retrieve images from collection: http://docs.appery.io/documentation/b...


Add Username to a list of photos saved to database

Posted: Wed Apr 30, 2014 10:32 pm
by Bill Clanton

What is the syntax or setting to pass the current user's id number to the request field? I'm guessing there is some javascript i might need to add there some sort of [value] type wild card. I'm just at a loss as to how to do it.

I'm adding the user's id as a pointer column in my photos collection to take the users's id with the photo they upload.

Thanks for your help.


Add Username to a list of photos saved to database

Posted: Thu May 01, 2014 12:17 am
by Bill Clanton

never mind i found the answer in this post.

https://getsatisfaction.com/apperyio/...

it's working now.