I've already kind of asked this question, but i'm going to try to be more specific in the hope of being a little clearer.
I have a xamarin Android project, using Parse.com as the back end. I have two tables (or classes), one which contains a list of beacons (called Beacons), and one which contains a list of categories (called BeaconCat). The headings of the table for the beacons class looks like:
ObjectID | minor | major | CatID (this is the 'pointer' column to BeaconCat)
111111 | 200 | 999 | 12345
The headings of the BeaconCat class looks like:
ObjectID | Category
12345 | Sports
All i'm trying to do, is run a query that passes in a 'minor' number, that number gets looked up in the first table, and returns the value of the category column in the second table.
So in the example above, i want to pass in the minor of 200, and get back the string 'sports'.
Seems like it should be very easy but i'm really struggling.
I've been trying variations of the following:
public async void getBeaconCat(Int32 minor)
{
try{
var innerQuery = ParseObject.GetQuery("Beacons");
innerQuery.WhereEqualTo("minor", minor);
innerQuery.Include("CatID");
var newQuery = ParseObject.GetQuery("BeaconCat");
newQuery.WhereMatchesQuery("Category", innerQuery);
IEnumerable<ParseObject> Myresults = await innerQuery.FindAsync();
foreach (var result in Myresults)
{
var category = result.Get<string>("Category");
Console.WriteLine ("Category is " + category);
}
}
catch{
Console.WriteLine ("There was a problem fetching data from parse");
}
}
Anything i try just seems to go straight to the catch and not return a string value.
Any help on this appreciated.