Shawn Johnson
Posts: 0
Joined: Wed Jan 15, 2014 4:17 pm

displaying completed tasks by user

I can manually enter via the database, in which case i can get return values from the where clause. I can also create using by testing the create service for the new collection with the pointers(user_id & task_id) here are the screen shots

I created an entry in the collection with pointers using the database create service
Image

I can use the entries but no values for user_id and task_id

Image

when I run the query I get an error

Image

i was trying to create entries in the collection from the form by use local storage items, and I get the same results

Image

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

displaying completed tasks by user

As we can see on this screenshot: https://d2r1vs3d9006ap.cloudfront.net...
you are changed column name (not as was proposed).

In this case you should use your own column names.

Please change requests accordingly to your DB structure.

If you have not luck on this, please share your DB with us.

Shawn Johnson
Posts: 0
Joined: Wed Jan 15, 2014 4:17 pm

displaying completed tasks by user

I saw this error and I fixed but it didn't fix my issue I have shared access to my database with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a

Nikita
Posts: 0
Joined: Fri Feb 28, 2014 4:02 pm

displaying completed tasks by user

Hi Shawn.

You have used a name of table user in the parameter 'where', but there is collection User_id in your DB. These names should be the same.

Shawn Johnson
Posts: 0
Joined: Wed Jan 15, 2014 4:17 pm

displaying completed tasks by user

hello,

I made the change you suggested. I am still unable to create entries in the table.
can you please try to create entries in the user_chall collection using the create service. I have been trying many different ways and still nothing

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

displaying completed tasks by user

Hi Shawn.

To update pointer field you should pass the object with "collName" and "_id"

To create "user_chall" colllection item please use:

  1. for "user_id" collumn:
    pre{"collName": "users", "id": "5312f844e4b013c661e401fe"}/pre

  2. for "chall_id" collumn:
    pre{"collName": "challdata", "_id": "5313f769e4b07b0d80141dcc"}/pre

    More information how to work with pointer-type columns you can find here: http://docs.appery.io/documentation/b...

Shawn Johnson
Posts: 0
Joined: Wed Jan 15, 2014 4:17 pm

displaying completed tasks by user

The example above dose not populate the challdata id.
Image
See here is the service test
Image

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

displaying completed tasks by user

Dear Shawn.

In post above parameters are:

  1. for "user_id" collumn:

  2. for "chall_id" collumn:

    But in your screenshot you have:
    "user_id" - which is ok.
    "user_challenges" - that's a reason of you problem. As in your "user_chall" collection - there is no "user_challenges" collumn.

    Please sort out your database first.

Shawn Johnson
Posts: 0
Joined: Wed Jan 15, 2014 4:17 pm

displaying completed tasks by user

Thank you

I see the issue was not with my database but with the service I created, while debugging the issues i changed the column name, but never updated the create service request fields.

I have to be more careful about that. Thanks again.

Shawn Johnson
Posts: 0
Joined: Wed Jan 15, 2014 4:17 pm

displaying completed tasks by user

whats the best way to pass local storage variables in the json object

return ('{"collName": "users", "id":"'+localStorage.getItem('Users_ID')+'"}');

is not working I am not getting the user id in json object.

-Shawn.J

Return to “Issues”