i want to return value of user who already registerd by putting name inside edittext
and i allready know how to return the value from whereclause " somthing = 'of somting ’ "
example putting name in edittext and getting the phonenumber
i want to return value of user who already registerd by putting name inside edittext
and i allready know how to return the value from whereclause " somthing = 'of somting ’ "
example putting name in edittext and getting the phonenumber
Hi. Could you clarify, please, what was the problem you faced with ?
i am trying to take user input from edittext field to return value from the backendless data
putting user name inside edittext and return the phone number value from backendless data
Hi amir
Just want to clarify, please correct me if I’m wrong
You want to retrieve user from the server by userName value and then get userPhone value, right?
yes the userName came from string inside the edtitext in my app and i want to ask the server the phone number of that user , i know it could be multiple user name but i want to see the way it can be accomplished
Hi Amir,
You need to search for users in your Users table with a where clause. In a callback you can extract required property for every object from the returned list of Backendless users. It can be done in the following way:
DataQueryBuilder queryBuilder = DataQueryBuilder.create();
queryBuilder.setWhereClause( whereClauseFromEditText );
Backendless.Data.of( BackendlessUser.class ).find( queryBuilder, new AsyncCallback<List<BackendlessUser>>()
{
@Override
public void handleResponse( List<BackendlessUser> backendlessUserList )
{
backendlessUserList.forEach( backendlessUser -> backendlessUser.getProperty( "phoneNumber" ) );
}
@Override
public void handleFault( BackendlessFault backendlessFault )
{
System.out.println("Error: " + backendlessFault.getDetail());
}
} );
Regards,
Anton