Volatile:ListField

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
m
m
 
(3 intermediate revisions by one user not shown)
Line 1: Line 1:
 
<!----List fields of name "<nowiki>{{{1}}}</nowiki>" in namespace "<nowiki>{{{2}}}</nowiki>"---->
 
<!----List fields of name "<nowiki>{{{1}}}</nowiki>" in namespace "<nowiki>{{{2}}}</nowiki>"---->
{{#def:ARG1|{{{1}}}}}{{#def:ARG2|{{{2}}}}}{{#def:ARG3|{{{3|0}}}}}{{#formtag:form|action="/wiki/Volatile:ListField"| Showing groups of size >
+
{{#def:ARG1|{{{1}}}}}{{#def:ARG2|{{{2}}}}}{{#def:ARG3|{{{3|0}}}}}<!---{{#formtag:form|action="/wiki/Volatile:ListField"| Showing groups of size >
 
{{#formtag:select|name="ARG3"|
 
{{#formtag:select|name="ARG3"|
 
{{#formtag:option|value="0" {{#ifeq:{{#var:ARG3}}|0|selected="yes"}}|0}}
 
{{#formtag:option|value="0" {{#ifeq:{{#var:ARG3}}|0|selected="yes"}}|0}}
Line 6: Line 6:
 
{{#formtag:option|value="2" {{#ifeq:{{#var:ARG3}}|2|selected="yes"}}|2}}
 
{{#formtag:option|value="2" {{#ifeq:{{#var:ARG3}}|2|selected="yes"}}|2}}
 
{{#formtag:option|value="3" {{#ifeq:{{#var:ARG3}}|3|selected="yes"}}|3}}
 
{{#formtag:option|value="3" {{#ifeq:{{#var:ARG3}}|3|selected="yes"}}|3}}
{{#formtag:input|type="submit"}} }} }}
+
{{#formtag:input|type="submit"}} }} }}--->
 
+
==Search Results of '''{{{1}}}'''==
 
{{#lua:
 
{{#lua:
 
   function trim(s) return (string.gsub(s, "^%s*(.-)%s*$", "%1")) end
 
   function trim(s) return (string.gsub(s, "^%s*(.-)%s*$", "%1")) end
Line 25: Line 25:
 
   end
 
   end
 
   table.sort(id)
 
   table.sort(id)
 +
  print("Total " .. table.getn(id) .. " groups.")
 
   local coff = tonumber("{{#var:ARG3}}")
 
   local coff = tonumber("{{#var:ARG3}}")
   if (coff == nil) then coff =0 else print("Printing groups more than size=" .. coff) end
+
   if (coff == nil) then coff =0 else print("Showing groups more than size=" .. coff .. "only") end
 
   for _,v in ipairs(id) do
 
   for _,v in ipairs(id) do
 
     if (table.getn(list[v]) > coff) then
 
     if (table.getn(list[v]) > coff) then
       print("* {{{1}}} '''" .. v .. "'''")
+
       print("* '''" .. v .. "'''")
 
       table.sort(list[v])
 
       table.sort(list[v])
 
       for i = 1,table.getn(list[v]) do
 
       for i = 1,table.getn(list[v]) do

Latest revision as of 18:47, 11 April 2012


[edit] Search Results of '

Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox