0

Hi I have to get a value from parse table. Column name is "isAvailable" of boolean type and my class name is "Presence". I'm having user id example usTremn06. I have to call this particular column and return the record for this particular user. I'm new to parse and I don't how to make a call to parse table. Can anybody help me to solve this and thanks in advance.

2 Answers 2

1

try this if you have user means user.get(column name);

Sign up to request clarification or add additional context in comments.

Comments

1

Try Somthing like this

ParseQuery <ParseObject> query = ParseQuery.getQuery("Presence");
query.whereEqualTo("userId", userId); // userId = 'Tremn06'
query.findInBackground(new FindCallback <ParseObject> () {@
    Override
    public void done(List <ParseObject> objects, com.parse.ParseException e) {
        if (e == null) {
            for (ParseObject parseObject: objects) {
                boolean isAvail = parseObject.get("isAvailable");
            }
        } else {
            // Something went wrong.
            Toast.makeText(getActivity(), "Error: " + e.getMessage().toString(), Toast.LENGTH_SHORT).show();
        }
    }
});

1 Comment

Your answer helped me to solve another problem thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.