how to work with collections

Hi dear Backendlesses!

trying to asynchronously retrieve a single row from a database.

String whereClause = "name = 'Picard'";
final BackendlessDataQuery dataQuery = new BackendlessDataQuery();
dataQuery.setWhereClause( whereClause );

Backendless.Data.of(Contacts.class).find(dataQuery, new AsyncCallback<BackendlessCollection<Contacts>>(){

        @Override
        public void handleResponse( BackendlessCollection<Contacts> foundpicard )
        {
            // all Contact instances have been found
            contact = foundPicard;

        }

now how do I get the single “Picard” out of the “contact” collection ? so that I could use “.setproperty” etc…

thanks!!

get first object from collection:

foundPicard.getCurrentPage().get( 0 )

tried it before but couldn’t work with it. ok I’ve done it, now how do I use it Mark ?

solved it.

defined a Contact and put in it the :

foundPicard.getCurrentPage().get( 0 )

gil, it sounds like you just want us to write the program for you )))

Please study the examples here first:

https://backendless.com/blog-a-feature-a-day-challenge/

Every single question you asked is already answered there. We really cannot provide support by writing your code line-by-line…

dear Mark,

I didn’t know about this blog. I have read the PDF documentary a few times and watched your relevant youtube clips. now I will gladly read and watch everything there. thanks.

I write my own code, I only ask for the proper syntax when there are things that are not in the official documentations or that don’t work the way they are written in there. you can check yourself by comparing the answers you’ve given me with what is written or not written in the official documentation.

appreciate all the help from you guys. love you all and will keep recommending other ex Parse users like me to migrate to Backendless.

Thanks, Gil. An easy way to get to that page is on our website, use the Developers main menu - see the API CookBook in the drop down from the main menu.

Mark, I can’t connect to my developer console, nor can my apps connect to the server.

is something wrong?

it should be working now, we had to do something urgent with the database

yes up and running.

thanks Mark.