Link to API is not showing Array or results for binding to app


#1

Looking for trouble shooting guidance. Using dropsource and backendless. Have business logic on backendless. Using API to call. Appears that dropsource is calling API and getting 200 response. Backendless app is 68610763-2CAC-34B5-FF4F-351A59574400 and a valid objectID for API call is F488F8D8-04F5-85E0-FF54-A0EA59CC8300. The problem is that I can 't get dropsource to show the 200 responses so that I can bind them to fields in the app.

A quick overview of the problem.

Pics attached.


#2

maybe this help you.


#3

Thanks @Mieyaa

hey @david.brotton make sure that you have the service endpoint set to a particular array type. That way the API docs know what structure it needs to be. I posted about this a little while back.


#5

@matt @Mieyaa can you describe how you got to the above image that is showing method type and parameters. I haven’t been able to find any type settings under the business logic area. Thanks!


#6

Hey @david.brotton,

When you setup a method under a service in the Codeless Logic, there is a section for return type. You need to set that return type to whatever model you would like to return or you can create a new model there as well. So for my example, I have a data table of locations and my codeless business logic returns all of my locations in ascending order and by active locations only. I need all of the fields to be returned from that table schema so my return type is set to the below:

To get to that editable option after a method is created, just click the edit button next to whichever method you want to edit:

34%20AM

By setting the return model, you are telling Backendless how you would like your 200 response to be structured. This in turn will translate to the API docs once you export them.


#7

Sorry, still missing any place to edit an existing logic piece. Here is a screen shot. Nothing under permission, response, or codeless. I am sure it’s something simple, just don’t see it.


#8

Just want to tap on @markpiller here as he’s with Backendless and when discussions get into troubleshooting on their side, he really knows this realm in depth.


#9

@david.brotton, hope this will help:


#10

Thanks guys. We are looking to see if we can modify the return of the API from the JS side before we try to re-write on the codeless side.


#11

Thanks for having a look here!


#12

We were able to get it coded in js. Everything is returning correctly. Thanks for the help!


#13

Fantastic news! Thanks for sharing!!!


#14

Spoke too early. It looks like we are getting the API called correctly and returning the results that we would like when checking the log. What I am failing to get is any display in drop source. We have not had this issue before where a successful 200 failed to linkup to a field.


#15

@wade @markpillar Any suggestions on what to look at would be appreciated. Thanks for your help.


#16

I can take a look. Can you share a Build ID and instructions from app opening, to where I can see this occur?


#17

I sent details in message. Please let me know if you have any questions.


#18

I went back this morning through the code and tested with 2 different users. API is responding correctly to both users. In the app I have 2 pages that call the api - the original which is My Coupons (you can get to this page via the rewards page) and the test page MyCouponsDemo. I am able to load images when individual cells appear, this is pulling correctly from the api as well. It appears that I am able to bind responses to fields, but when running the data doesn’t display in the fields.

My guess is that we are using a custom js api and something in that setup Dropsource isn’t recognizing when trying to bind responses to fields.

Sure appreciate your help.


#19

David… I got your private message with instructions. 1 critical piece is missing. I need that Build ID for the build I can pull down and test out locally. There’s an incredible amount of builds created from your fellow Dropsource community… without that number it’s a needle in a haystack over here for me to find the right project and correct build of it.