Difference between revisions of "Template:Chembox parametercheck"

From blackwiki
Jump to navigation Jump to search
imported>DePiep
m (DePiep moved page Template:Chembox CASNo/parametercheck to Template:Chembox parametercheck: Pagename reflecing its broader action)
imported>DePiep
(Refine counting and tracking categories)
Line 1: Line 1:
{{#ifexpr:{{{_CASnone|0}}} = 1 |[[Category:Chemicals that do not have a CAS Registry Number assigned]]}}<!--
+
<!--
-->{{#switch:{{#expr:{{{_countCASNo|0}}} + {{{_CASnone|0}}} }}
+
without a CAS registry number (no CASNo''n'' input)
|0=[[Category:Chemical articles without CAS Registry Number]]
+
-->{{#ifexpr:{{{_countCASNo|-1}}} + {{{_CASnone|-1}}} = 0 |[[:Category:Chemical articles without CAS registry number]] }}<!--
|1=
+
 
|#default=[[Category:Chemical articles with multiple CAS Registry Numbers|{{{_countCASNo|}}}]]
+
  CAS registry number = none
 +
-->{{#ifexpr:{{{_CASnone|-1}}} = 1 |[[:Category:Chemicals that do not have a CAS registry number assigned]]}}<!--
 +
 
 +
Counts >=2:
 +
-->{{#switch:{{{_countCASNo|-1}}}
 +
|2=[[:Category:Chemical articles with multiple CAS registry numbers|B]]
 +
|3=[[:Category:Chemical articles with multiple CAS registry numbers|C]]
 +
|4=[[:Category:Chemical articles with multiple CAS registry numbers|D]]
 +
|5=[[:Category:Chemical articles with multiple CAS registry numbers|E]]
 +
|6=[[:Category:Chemical articles with multiple CAS registry numbers|F]]
 +
|#default=<!-- |-1|0|1|other/err = no tracking -->
 +
}}<!--
 +
 
 +
-->{{#switch:{{{_countPubChem|-1}}}
 +
|2=[[:Category:Chemical articles with multiple PubChems|B]]
 +
|3=[[:Category:Chemical articles with multiple PubChems|C]]
 +
|4=[[:Category:Chemical articles with multiple PubChems|D]]
 +
|5=[[:Category:Chemical articles with multiple PubChems|E]]
 +
|6=[[:Category:Chemical articles with multiple PubChems|F]]
 +
|#default=<!-- |-1|0|1|other/err = no tracking -->
 
}}<!--
 
}}<!--
  
--><noinclude>{{documentation}}</noinclude>
+
-->{{#switch:{{{_countChEBI|-1}}}
 +
|2=[[:Category:Chemical articles with multiple ChEBIs|B]]
 +
|3=[[:Category:Chemical articles with multiple ChEBIs|C]]
 +
|4=[[:Category:Chemical articles with multiple ChEBIs|D]]
 +
|5=[[:Category:Chemical articles with multiple ChEBIs|E]]
 +
|6=[[:Category:Chemical articles with multiple ChEBIs|F]]
 +
|#default=<!-- |-1|0|1|other/err = no tracking -->
 +
}}<!--
 +
 
 +
--><noinclude>{{documentation}}</noinclude><!--
 +
 
 +
TEST
 +
CAS:{{trim|1={{{_countCASNo|blank}}} }}
 +
PubChem:{{{_countPubChem|blank}}}
 +
ChEBI:{{{_countChEBI|blank}}}
 +
max:{{#invoke:math|max|{{{_countCASNo|-1}}} |{{{_countPubChem|-1}}} |{{{_countChEBI|-1}}} }}<br/>-->

Revision as of 16:52, 23 November 2016