EMML Input vs Variables

snhal
User offline. Last seen 2 years 41 weeks ago. Offline
Joined: 03/26/2009
Points: 101

hi guys Is whats the difference between the <input name="aString" type="text" /> and <variables></variables><variable name="cvsString" type="string"></variable>

0
Your rating: None
raj
raj's picture
User offline. Last seen 1 week 4 days ago. Offline
Joined: 09/22/2008
Points: 4

inputs allows for user-supplied params at runtime.  variables are for temporary storage.

details here

http://www.jackbe.com/prestodocs/v2.6.1/prestolibrary/PrestoLibrary.1.16...

 

raj.  chief masher @ jackbe

snhal
User offline. Last seen 2 years 41 weeks ago. Offline
Joined: 03/26/2009
Points: 101

hi raj

Thanks for your inputs
i am just wondering if we can use input and variables interchangebly

e.g.

in assign statement

    <variable name="myString" type="string"/>
   
   <assign fromexpr="$fastserxml/SearchResponse" outputvariable="myString" />
   

now should fastserxml be declared as a variable or is it ok if its declared as input type

smitchell
smitchell's picture
User offline. Last seen 15 hours 19 min ago. Offline
Joined: 08/29/2008
Points: 34

They can be used interchangeably in the example you gave. The primary differences between <input> and <variable> are that <input> is exposed as a parameter that can be passed at runtime when a mashup or a macro is invoked.

Sara, technical writer/jackbe

 

polly
User offline. Last seen 2 years 7 weeks ago. Offline
Joined: 02/12/2009
Points: 150

 Is it safe to say that variables do not have to be named explicitedly? i.e., in a variables element.

smitchell
smitchell's picture
User offline. Last seen 15 hours 19 min ago. Offline
Joined: 08/29/2008
Points: 34

You can implicitly declare variables in the outputvariable attributes of most statements. When you do this, Mashup Server creates a variable of that name with a document type -- so as long as that works for your situation -- yes.

Sara, technical writer/jackbe