Page 1 of 2

Problem facing using read_service

Posted: Mon Feb 15, 2016 1:11 pm
by skarun

Having a bit of a problem with read_service.

Apperyio.get("Papyrus_Brochures_read_service")({"OrgId":id}).then(

All the records are being returned as the result, and not just OrgId = id.

I have my app public - so hopefully you will be able to check (BrochureList Scope init()) - let me know if further info is required.

Thanks always for your help.


Problem facing using read_service

Posted: Mon Feb 15, 2016 2:40 pm
by Julian De La Rosa

you are missing the $eq operator


Problem facing using read_service

Posted: Mon Feb 15, 2016 2:41 pm
by Julian De La Rosa

Apperyio.get("Papyrus_Brochures_read_service")({"OrgId":{"$eq":id}}).


Problem facing using read_service

Posted: Tue Feb 16, 2016 4:03 am
by skarun

It doesn't work.
I didn't see this being used in any tutorial - can you give any reference, sample, tutorial.
Anyway thanks for your response.


Problem facing using read_service

Posted: Wed Feb 17, 2016 11:17 am
by Serhii Kulibaba

Hello,

Please add parameter where to your request:

prevar requestData = {
data: {
where :{
OrgId:"56544a29e4b0ecf32b4ef353"
}
}
};

Apperyio.get("Papyrus_Brochures_read_service")(requestData);/pre


Problem facing using read_service

Posted: Sat Feb 20, 2016 9:14 am
by skarun

Hi Sergiy - thanks much for your reply. I didnt get time for 3 days to work on this. Well, I tried today and it doesnt work. Again, the app is public so you may be able to check Or here is the code.

var requestData = {data: {where :{OrgId:id}}}; // I have tried "OrgId" (with quotes as well and also replacing the actual string value of id)
Apperyio.get("Papyrus_Brochures_read_service")(requestData).then(
function(success) {
$scope.list = success.data;
},
function(error) {});

  1. Why wouldnt this work which was what I initially tried.
    Apperyio.get("Papyrus_Brochures_read_service")({"OrgId":id}).then(
    [as described in https://devcenter.appery.io/tutorials...
    var serviceName = custom=='true' ? "PizzaDelivery_CustomPizza_read_service" : "PizzaDelivery_Menu_read_service";
    Apperyio.get(serviceName)({"_id":id}).then(]

  2. Any reference on how to use requestData - what are the other fields I can use other than where clause.

    Hope you can help. Thanks!


Problem facing using read_service

Posted: Tue Feb 23, 2016 8:21 pm
by Serhii Kulibaba

Please provide us with the following information:

1) App name
2) Test credentials if login functionality is implemented in your app
3) Detailed steps to reproduce the issue


Problem facing using read_service

Posted: Wed Feb 24, 2016 10:18 am
by skarun

this is the link to the app and the appname is Papyrus:
http://appery.io/app/mobile-frame?src...

Click on any link, it will display the details of that id. Both master & detail pages displays the id. But currently it is displaying all the records.

For eg. if you click 1st link (Creeds with id 56bee1ebe4b03ef3938a12b3) but in details 56bee1ebe4b03ef3938a12b2 is displayed as well.

Thanks for your efforts trying to help.

The code is at Pages BrochureList init()


//On load screen logic
var $routeParams = Apperyio.get("$routeParams");
var id = $routeParams['id'];
var Name = $routeParams['Name'];
$scope.id = id;
$scope.Name = Name;
$scope.header.title = Name;

//var requestData = {data: {where :{"OrgId":"56bee1ebe4b03ef3938a12b3"}}};
alert(id);
Apperyio.get("Papyrus_Brochures_read_service")({"OrgId":id}).then(
//Apperyio.get("Papyrus_Brochures_read_service")({"OrgId":{"$eq":id}}).then(
//Apperyio.get("Papyrus_Brochures_read_service")(requestData).then(
function(success) {
$scope.list = success.data;
//TODO: this for loop to be removed once the above Apperyio.get works - ie. filters correctly
//for (var i=0; i


Problem facing using read_service

Posted: Fri Feb 26, 2016 1:50 am
by skarun

Appreciate if I can get some help to get this resolved today.


Problem facing using read_service

Posted: Sat Feb 27, 2016 7:40 pm
by Illya Stepanov

Please make sure that you have enabled sharing with support for this app.
We don't see such app name "Papyrus" among the shared apps with us.