Template:Program: Difference between revisions

no edit summary
(add trim)
No edit summary
 
Line 47: Line 47:
}}
}}
Stored: {{#cargo_query:|tables=Program|fields=ProgramName|where=ProgramName="{{{ProgramName|}}}"|format=list}}
Stored: {{#cargo_query:|tables=Program|fields=ProgramName|where=ProgramName="{{{ProgramName|}}}"|format=list}}
{{#if: {{#trim:{{#cargo_query:|tables=Program|fields=ProgramName|where=ProgramName="{{{ProgramName|}}}"|format=list}}}}
{{#ifeq: {{#cargo_query:|tables=Program|fields=ProgramName|where=ProgramName="{{{ProgramName|}}}"|format=list}} | No results
   | <!-- If query returns a non-empty trimmed result (e.g., ProgramName), no category -->
   | [[Category:Cargo Storage Failed]] <!-- If query equals "No results", add category -->
   | [[Category:Cargo Storage Failed]] <!-- If query returns empty after trim (e.g., "No results"), add category -->
   | <!-- If query returns ProgramName or anything else, no category -->
}}
}}
<div style="clear: both;"></div>
<div style="clear: both;"></div>