Using a page variable to make a specific API call into Backendless


#1

Having issues making an API call into backendless using a page variable. I have used both device and page variables to isolate field that I want to make available during the api call, but can’t figure out what fields to set up in Dropsource. Currently trying to call with page variable.

Initial screen using API call to get all 4 from database:

Upon tap of any of these, make another API call using page variable

How to I bind one of these fields to the page variable to limit the API to only returning the retailerid.

Thanks for the help. I been stuck for a couple of weeks and too shy to ask a beginner question. Haven’t been able to find a good example in the videos.


#2

When trying to bind the “where” I get this message


#3

can you attach network log? have you tried using {object id}?


#4


this appears to be making the right API call

then upon pressing one of the retailers, I store the retailerid in a page variable required for the user coupon page to open.

With this set up:

I get this:

When I remove this where statement, the api just runs and pull back all data in db. It does not filter for retailerid.

Regarding the objectid - the objectid is a unique key for the database and therefore will not pull multiple records. I have not tried to build a test to see if I could just pull an objectid.


#5

Is it possible the retailer id being sent back is of improper type maybe? that error is being sent back from your API. I wonder wonder perhaps your trying to send it a String when it expects an Int maybe?


#6

An update on this. I think we may have found the solution. When using backendless you can use a standard API call and then specify the “where” statement to include something like:

retailerid = ‘6AC96E81-DC59-B92E-FFB0-B231CD4C5D00’

I will be testing this out in the next few days, early test suggest that if I can pass this as a page or device variable, I should get the results that I am looking for. Thanks for the responses.


#7

Excellent to hear. Yes you should be able to use a String type page/device variable as you need for this. Nice work!