Documentation/4.0/Developers/Sandbox
From Slicer Wiki
Revision as of 08:37, 2 February 2012 by JChris.FillionR (talk | contribs) (→Use of get_web_data and external_value)
Home < Documentation < 4.0 < Developers < Sandbox
Back to Developers Information←
Contents
Use of get_web_data and for_external_table
The raw set of data retrieved using this URL is reported below:
| There are two extra empty lines ! |
Name,Color,Shape Apple,Red,Round Banana,Yellow,Oblong Orange,Orange,Round Pear,Yellow,"Pear-shaped"
| The following table should contains Fruits |
{{#get_web_data:url=http://wiki.slicer.org/slicerWiki/index.php/Special:GetData/Documentation/4.0/Developers/Sandbox_data|format=CSV with header|data=name=Name,color=Color,shape=Shape}}
{| class="wikitable"
! Name
! Color {{#for_external_table:<nowiki/>
{{!}}-
{{!}} [[{{{name}}}]]
{{!}} {{{color}}} }}
|}
Use of get_web_data and external_value
Using filter as template parameter
{{#get_web_data:
url=http://wiki.slicer.org/slicerWiki/index.php/Special:GetData/Documentation/4.0/Developers/Sandbox_data
|format=CSV with header
|data=bananashape=Shape
|filters=Name=Banana
}}
* {{#external_value:bananashape}}
- Error: no local variable "bananashape" was set.
Using filter as URL parameter
{{#get_web_data:
url=http://wiki.slicer.org/slicerWiki/index.php/Special:GetData/Documentation/4.0/Developers/Sandbox_data,Name=Banana
|format=CSV with header
|data=bananashape=Shape
}}
* {{#external_value:bananashape}}
- Error: no local variable "bananashape" was set.
Using fullurl
{{#get_web_data:
url={{fullurl:Special:GetData/Documentation/4.0/Developers/Sandbox_data,Name=Banana}}
|format=CSV with header
|data=bananashape=Shape
}}
* {{#external_value:bananashape}}
Error: No contents found at URL https://www.slicer.org/wiki/Special:GetData/Documentation/4.0/Developers/Sandbox_data,Name%3DBanana.
- Error: no local variable "bananashape" was set.