Before the end of 2017 the board will be down for a brief period of time for an upgrade.
Past experience says less than 30 minutes but I can't predict the future.
Also, there is a high probability that the forum will move to a different host, but that will not happen in 2017.
Thanks,
Doug

[Solved] Count series and custom16

Discuss using and your tips/tricks for BookCAT
User avatar
Alex Ivanovich
Posts: 287
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

[Solved] Count series and custom16

Postby Alex Ivanovich » Sun Dec 18, 2016 10:33 am

what is the code for the field custom16/@bool to count only in the "series"? :roll:

this does not work,returns the value "0", the correct value is 10 :|

Code: Select all

##CMD:COUNT:book,series=<xsl:value-of select="series"/>custom16/@bool=True##



this works ;)

Code: Select all

<a href="BookList.xsl?Custom16={custom16/@bool}@Series={series}@orderby=series,releaseno@xslparam:doctitle={/data/fld/book/custom16/@name} {series}" TARGET="_BLANK">
Last edited by Alex Ivanovich on Mon Dec 19, 2016 6:41 am, edited 3 times in total.

User avatar
LotsOCds
Posts: 173
Joined: Thu Aug 20, 2015 4:23 am
Location: California, USA

Re: Count series and custom16

Postby LotsOCds » Sun Dec 18, 2016 2:18 pm

Try this

Code: Select all

##CMD:COUNT:book,series=<xsl:value-of select="series"/>@custom16=True##
Cheers,
Dave

User avatar
Alex Ivanovich
Posts: 287
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: Count series and custom16

Postby Alex Ivanovich » Sun Dec 18, 2016 2:33 pm

It works :)

thank you Dave ;)

User avatar
Alex Ivanovich
Posts: 287
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: Count series and custom16

Postby Alex Ivanovich » Sun Dec 18, 2016 2:47 pm

I have a doubt
This code should not work, as the "true" parameter is not set
custom16/@bool :|
but it works :roll: :!:

Code: Select all

<a href="BookList.xsl?Custom16={custom16/@bool}@Series={series}@orderby=series,releaseno@xslparam:doctitle={/data/fld/book/custom16/@name} {series}" TARGET="_BLANK">

User avatar
LotsOCds
Posts: 173
Joined: Thu Aug 20, 2015 4:23 am
Location: California, USA

Re: Count series and custom16

Postby LotsOCds » Sun Dec 18, 2016 3:15 pm

I do not understand your question. Can you be more specific about what you think is wrong? The code looks fine to me. The value in the query to match for Custom16 is taken the current record. It will be either True or False. Hover your mouse over the link and look at the bottom of the BookCAT window. You will see the link with all the query values filled in.
Cheers,
Dave

User avatar
Alex Ivanovich
Posts: 287
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: Count series and custom16

Postby Alex Ivanovich » Sun Dec 18, 2016 3:25 pm

I badly explained myself :oops:
Now this works

Code: Select all

##CMD:COUNT:book,series=<xsl:value-of select="series"/>@custom16=True##


this works well,
but it should not work
because the TRUE parameter is not set
then why does it work? :!:

Code: Select all

<a href="BookList.xsl?Custom16={custom16/@bool}@Series={series}@orderby=series,releaseno@xslparam:doctitle={/data/fld/book/custom16/@name} {series}" TARGET="_BLANK">

User avatar
LotsOCds
Posts: 173
Joined: Thu Aug 20, 2015 4:23 am
Location: California, USA

Re: Count series and custom16

Postby LotsOCds » Sun Dec 18, 2016 4:09 pm

because the TRUE parameter is not set


Where is it not set?
Cheers,
Dave

User avatar
Alex Ivanovich
Posts: 287
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: Count series and custom16

Postby Alex Ivanovich » Sun Dec 18, 2016 4:56 pm

This

Custom16={custom16/@bool}

because it works?

Code: Select all

<a href="BookList.xsl?Custom16={custom16/@bool}@Series={series}@orderby=series,releaseno@xslparam:doctitle={/data/fld/book/custom16/@name} {series}" TARGET="_BLANK">


It should operate so

Custom16=True

User avatar
LotsOCds
Posts: 173
Joined: Thu Aug 20, 2015 4:23 am
Location: California, USA

Re: Count series and custom16

Postby LotsOCds » Sun Dec 18, 2016 7:51 pm

I still see nothing wrong. Remember that "{custom16/@bool}" is replaced with the value from the current record.
It should operate so

Custom16=True

It will if the current record has custom16 checked (therefore True) then the query will resolve to "Custom16=True". If custom16 for the current record is not checked (therefore False) the query will resolve to "Custom16=False".

If you want the query to always use custom16=True then just use "custom16=True".
Cheers,
Dave

User avatar
Alex Ivanovich
Posts: 287
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: Count series and custom16

Postby Alex Ivanovich » Mon Dec 19, 2016 6:41 am

Yes,
in my code I have set to "True" and "False" by <xsl: choose> and </ xsl: when>

thanks for the explanation, and the help

thanks Dave ;)


Return to “Using BookCAT”

Who is online

Users browsing this forum: No registered users and 1 guest