skarun
Posts: 0
Joined: Fri Sep 18, 2015 2:23 am

Problem facing using read_service

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.

Julian De La Rosa
Posts: 0
Joined: Sat Apr 19, 2014 12:28 am

Problem facing using read_service

you are missing the $eq operator

Julian De La Rosa
Posts: 0
Joined: Sat Apr 19, 2014 12:28 am

Problem facing using read_service

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

skarun
Posts: 0
Joined: Fri Sep 18, 2015 2:23 am

Problem facing using read_service

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.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Problem facing using read_service

Hello,

Please add parameter where to your request:

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

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

skarun
Posts: 0
Joined: Fri Sep 18, 2015 2:23 am

Problem facing using read_service

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!

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Problem facing using read_service

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

skarun
Posts: 0
Joined: Fri Sep 18, 2015 2:23 am

Problem facing using read_service

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

skarun
Posts: 0
Joined: Fri Sep 18, 2015 2:23 am

Problem facing using read_service

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

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

Problem facing using read_service

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.

Return to “Issues”