Searching in binders

Started by darkshanx, March 26, 2013, 04:07:20 PM

Previous topic - Next topic

darkshanx

Is there a way to search for cards like you can in card database but with only cards in a binder?

Also what's the predicate in card database where it currently had TRUEPREDICATE
What's it do?

reezel

I want so bad in the filters to be able to include/exclude specific binders and decks.

darkshanx

Yeah. In trying to use the predicate which I think is SQL or whatever which I've no clue about.
Put in this in to try to do it

SUBQUERY( bindernames, $x, $x.binder.name = 'Complete Collection ).@count = 0

Complete collection is my binder name so I can search just that. I check it it says looks ok but then click back and the app crashes

Piotr

Quote from: darkshanx on March 26, 2013, 05:02:23 PM
Yeah. In trying to use the predicate which I think is SQL or whatever which I've no clue about.
Put in this in to try to do it

SUBQUERY( bindernames, $x, $x.binder.name = 'Complete Collection ).@count = 0

Complete collection is my binder name so I can search just that. I check it it says looks ok but then click back and the app crashes

Well it should, you created properly broken predicate and the check is very dumb. Try this:

SUBQUERY( bindernames, $x, $x.binder.name = 'Complete Collection' ).@count = 0

and this

SUBQUERY( bindernames, $x, $x.binder.name = 'Complete Collection' ).@count > 0

You can save these as Bookmarks and that's it, iMtG can do what you wanted already.

darkshanx

Quote from: Piotr on March 26, 2013, 05:40:21 PM
Quote from: darkshanx on March 26, 2013, 05:02:23 PM
Yeah. In trying to use the predicate which I think is SQL or whatever which I've no clue about.
Put in this in to try to do it

SUBQUERY( bindernames, $x, $x.binder.name = 'Complete Collection ).@count = 0

Complete collection is my binder name so I can search just that. I check it it says looks ok but then click back and the app crashes

Well it should, you created properly broken predicate and the check is very dumb. Try this:

SUBQUERY( bindernames, $x, $x.binder.name = 'Complete Collection' ).@count = 0

and this

SUBQUERY( bindernames, $x, $x.binder.name = 'Complete Collection' ).@count > 0

You can save these as Bookmarks and that's it, iMtG can do what you wanted already.

Thanks the second one worked. I worked it out before I checked here again but the > sign made it work. I took another predicate and was editing it. I've no idea about this stuff but took a guess an it works. What else can it do? The predicate?

Piotr

Quote from: darkshanx on March 26, 2013, 05:52:56 PM
Quote from: Piotr on March 26, 2013, 05:40:21 PM
Quote from: darkshanx on March 26, 2013, 05:02:23 PM
Yeah. In trying to use the predicate which I think is SQL or whatever which I've no clue about.
Put in this in to try to do it

SUBQUERY( bindernames, $x, $x.binder.name = 'Complete Collection ).@count = 0

Complete collection is my binder name so I can search just that. I check it it says looks ok but then click back and the app crashes

Well it should, you created properly broken predicate and the check is very dumb. Try this:

SUBQUERY( bindernames, $x, $x.binder.name = 'Complete Collection' ).@count = 0

and this

SUBQUERY( bindernames, $x, $x.binder.name = 'Complete Collection' ).@count > 0

You can save these as Bookmarks and that's it, iMtG can do what you wanted already.

Thanks the second one worked. I worked it out before I checked here again but the > sign made it work. I took another predicate and was editing it. I've no idea about this stuff but took a guess an it works. What else can it do? The predicate?

O my world, it can do magic indeed. I think I had a post on predicates on the old wiki that I forgot to move. Or maybe I didn't.

darkshanx

Oh right. It would be cool if I could find that. I like the predicate thing only guessed how to do some because I've been doing computing GCSE but using a dead programming language which is a bit stupid. Thanks for the help. Guess I can do the same with decks by replacing binder with deck

reezel

That predicate example was very helpful. The issue I see now is I am not getting total cards. I would like to, for example , see how many white cards I have in my binder 'Cube'. Is there a way to do that?

darkshanx

Quote from: reezel on March 27, 2013, 12:29:59 AM
That predicate example was very helpful. The issue I see now is I am not getting total cards. I would like to, for example , see how many white cards I have in my binder 'Cube'. Is there a way to do that?

Closest I can get is each type of card not every copy. Using the predicate to search only that binder go into filter again and select only white create a new bookmark of what you have filter and use that bookmark. It will count all the white cards (including hybrid and double if you've not selected exclude unselected colour) but not all copies of them

reezel

Quote from: darkshanx on March 27, 2013, 02:51:12 AM
Quote from: reezel on March 27, 2013, 12:29:59 AM
That predicate example was very helpful. The issue I see now is I am not getting total cards. I would like to, for example , see how many white cards I have in my binder 'Cube'. Is there a way to do that?

Closest I can get is each type of card not every copy. Using the predicate to search only that binder go into filter again and select only white create a new bookmark of what you have filter and use that bookmark. It will count all the white cards (including hybrid and double if you've not selected exclude unselected colour) but not all copies of them
Thank you. I was able to make a bookmark for just the white spells in my cube, which is exactly what I was looking for. The next filter I am looking for is just the gold/hybrid cards in a Binder. Anyone have any idea if this is possible at the moment.

darkshanx

Quote from: reezel on March 27, 2013, 08:53:54 AM
Quote from: darkshanx on March 27, 2013, 02:51:12 AM
Quote from: reezel on March 27, 2013, 12:29:59 AM
That predicate example was very helpful. The issue I see now is I am not getting total cards. I would like to, for example , see how many white cards I have in my binder 'Cube'. Is there a way to do that?

Closest I can get is each type of card not every copy. Using the predicate to search only that binder go into filter again and select only white create a new bookmark of what you have filter and use that bookmark. It will count all the white cards (including hybrid and double if you've not selected exclude unselected colour) but not all copies of them
Thank you. I was able to make a bookmark for just the white spells in my cube, which is exactly what I was looking for. The next filter I am looking for is just the gold/hybrid cards in a Binder. Anyone have any idea if this is possible at the moment.

For that one I have no idea. Poitr or someone else may know but I'll try and have a go

darkshanx

Been having a go for you and haven't got any success. You'll have to ask Piotr or somebody else

Rhazor

Quote from: Piotr on March 26, 2013, 05:40:21 PM

SUBQUERY( bindernames, $x, $x.binder.name = 'Complete Collection' ).@count > 0


Very curious. Whenever I try to set this filter (this is, I paste it substituting "TRUEPREDICATE", Check it OK and then click "Filter"), iMtG shuts down... I've tried with different binders (in the "Complete Collection" binder I have 15571 cards and wanted to discard it was a matter of too many cards) and it happens the same with the "My Precious" binder (only 828 cards).

I tried to shut down the iPad and start it again, but it didn't work either.

I have an iPad 2 (iOS 6.1.3) and version 3.10.0 of iMtG. Any idea why this could happen?

Piotr

Should be binderentries not bindernames.

Rhazor

Quote from: Piotr on April 03, 2013, 06:01:09 PM
Should be binderentries not bindernames.

Thanks for the fast reply, Piotr! That did the trick!!! ;)