Searching in binders

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

Previous topic - Next topic

Piotr

Always glad to help, if the question is correct ;)

Rhazor

Quote from: Piotr on April 03, 2013, 06:15:40 PM
Always glad to help, if the question is correct ;)

Let me post another question, then...  ;)

I'm trying to create a filter that allows me to know the cards I have four copies of. I tried to "reuse" the previous SUBQUERY, which would say: <STRONG>SUBQUERY ( binderentries, $x, $x.binder.name = 'Complete Collection' ).@count = 4</STRONG>

It gives me 0 results even though I have plenty of "4-copies-cards".

I also tried substituting "= 4" by "> 3" but it doesn't work either.

It would be very useful for me to know which cards I can throw to the "give away box" and not bother to put in the binder.

Thanks in advance for your help!

Rhazor

Piotr

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

swallowtail

Quote from: Piotr on April 03, 2013, 08:24:58 PM
SUBQUERY ( binderentries, $x, $x.binder.name = 'Complete Collection' and $x.count = 4 ).@count > 0

This is awesome.  Question from me then please, how do I add a specific expansion to the query? I tried
SUBQUERY ( binderentries, $x, $x.binder.name = 'My Precious' and $x.count = 4 and $x.expansion = 'isd' ).@count > 0 to show me what ISD cards I have 4 of and iMTG just immediately crashes on applying the filter.

Is there a list of keywords that the database can be queried on?

Rhazor

Quote from: swallowtail on April 03, 2013, 10:15:44 PM
Quote from: Piotr on April 03, 2013, 08:24:58 PM
SUBQUERY ( binderentries, $x, $x.binder.name = 'Complete Collection' and $x.count = 4 ).@count > 0

This is awesome.  Question from me then please, how do I add a specific expansion to the query? I tried
SUBQUERY ( binderentries, $x, $x.binder.name = 'My Precious' and $x.count = 4 and $x.expansion = 'isd' ).@count > 0 to show me what ISD cards I have 4 of and iMTG just immediately crashes on applying the filter.

Is there a list of keywords that the database can be queried on?

I can answer this!!! There's no real need to!!! Once you have selected the saved filter, you only have to click on the "Filter" button, surf to expansions and select the one you want...

I used it last night and it worked like a charm!!!

Best,

Rhazor

Rhazor

Quote from: Piotr on April 03, 2013, 08:24:58 PM
SUBQUERY ( binderentries, $x, $x.binder.name = 'Complete Collection' and $x.count = 4 ).@count > 0

Gee! Almost missed it!!!

I went directly to read the following reply and I didn't realize you had answered!!!

Thanks! It also made the trick!!!

Piotr

Quote from: swallowtail on April 03, 2013, 10:15:44 PM
Is there a list of keywords that the database can be queried on?

There used to be but got lost due to the old wiki being spammed and me missing the entry when I moved contents here. I will compile it again, just keep nagging me if it takes too long. $x.expansion.code will fix you query.

Quote from: Rhazor on April 04, 2013, 02:59:26 AM
I can answer this!!! There's no real need to!!! Once you have selected the saved filter, you only have to click on the "Filter" button, surf to expansions and select the one you want...

Is that a lie? Not at all ;)

Rhazor


Piotr

As a side note, there's no backup nor sync system for Bookmarks yet, so I would advise to keep a backup in some text editor outside iMtG, just in case.

Rhazor

Quote from: Piotr on April 04, 2013, 07:28:21 AM
As a side note, there's no backup nor sync system for Bookmarks yet, so I would advise to keep a backup in some text editor outside iMtG, just in case.

Very good advise. Thanks!

swallowtail

Quote from: Piotr on April 04, 2013, 06:54:45 AM
Quote from: swallowtail on April 03, 2013, 10:15:44 PM
Is there a list of keywords that the database can be queried on?

There used to be but got lost due to the old wiki being spammed and me missing the entry when I moved contents here. I will compile it again, just keep nagging me if it takes too long. $x.expansion.code will fix you query.


Thanks Piotr. When I try this:

SUBQUERY ( binderentries, $x, $x.binder.name = 'My Precious' and $x.count < 4 and $x.expansion.code = 'rtr' ).@count > 0

iMTG crashes. Have I got wrong syntax in that somewhere?

swallowtail

Quote from: Rhazor on April 04, 2013, 02:59:26 AM
Quote from: swallowtail on April 03, 2013, 10:15:44 PM
Quote from: Piotr on April 03, 2013, 08:24:58 PM
SUBQUERY ( binderentries, $x, $x.binder.name = 'Complete Collection' and $x.count = 4 ).@count > 0

This is awesome.  Question from me then please, how do I add a specific expansion to the query? I tried
SUBQUERY ( binderentries, $x, $x.binder.name = 'My Precious' and $x.count = 4 and $x.expansion = 'isd' ).@count > 0 to show me what ISD cards I have 4 of and iMTG just immediately crashes on applying the filter.

Is there a list of keywords that the database can be queried on?

I can answer this!!! There's no real need to!!! Once you have selected the saved filter, you only have to click on the "Filter" button, surf to expansions and select the one you want...

I used it last night and it worked like a charm!!!

Best,

Rhazor

Thanks Rhazor. :) I'd like to be able to have it bookmarked, and ideally have a bookmark that shows me which of an expansion I have less than 4 of,including if I have 0, but we can work on that! :)

Rhazor

Quote from: swallowtail on April 04, 2013, 08:54:35 AM
Quote from: Rhazor on April 04, 2013, 02:59:26 AM
Quote from: swallowtail on April 03, 2013, 10:15:44 PM
Quote from: Piotr on April 03, 2013, 08:24:58 PM
SUBQUERY ( binderentries, $x, $x.binder.name = 'Complete Collection' and $x.count = 4 ).@count > 0

This is awesome.  Question from me then please, how do I add a specific expansion to the query? I tried
SUBQUERY ( binderentries, $x, $x.binder.name = 'My Precious' and $x.count = 4 and $x.expansion = 'isd' ).@count > 0 to show me what ISD cards I have 4 of and iMTG just immediately crashes on applying the filter.

Is there a list of keywords that the database can be queried on?

I can answer this!!! There's no real need to!!! Once you have selected the saved filter, you only have to click on the "Filter" button, surf to expansions and select the one you want...

I used it last night and it worked like a charm!!!

Best,

Rhazor

Thanks Rhazor. :) I'd like to be able to have it bookmarked, and ideally have a bookmark that shows me which of an expansion I have less than 4 of,including if I have 0, but we can work on that! :)

Well, then, once you've refined your filter with the specific expansion, click on the blue thing in the search field and select "New from actual filter" (or something similar...).

And voilá, there's your bookmark!

;)

Piotr

That's when I go all Like :D Thanks man!

Rhazor

Quote from: Piotr on April 04, 2013, 09:50:16 AM
That's when I go all Like :D Thanks man!

Happy to help (both the other user and you... heheheh)  ;)