You can dynamically assign the value of a variable in EMML, using the <template> statement. If you're not familiar with <template>, you can find documentation on <template> at http://www.jackbe.com/prestodocs/v2.7.0/index.html. Then search for "template". The topics on Dynamic Strings and Creating Generic Mashup Scripts are probably the most appropriate.
If that doesn't give you what you need, take a look at using EMML to generate an EMML mashup script dynamically and then execute it within the parent EMML. The topic on Generating Mashup Scripts Dynamically in the docs covers this possibility.
Hope this helps
<!--Session data-->
Sara, technical writer/jackbe
Hi Sara,
thanks for the reply. I took a look at <template> but can't quite see how to use it to do what I want.
Here's what I'm trying to do: create a variable 'myVariable' that contains the value 'abcd' from the contents of two other variables, one that contains the variable name and the other that contains the variable content.
e.g. varName="myVariable" and varContent="abcb" used to create to $myVariable="abcd"
Cheers, Innes
I'm trying to confirm, Innes, but I believe that variable names cannot be assigned dynamically. What you can do, instead, is use my second suggestion. Basically, write an EMML that writes the EMML with your dynamic varriable name defined statically and then execute that built EMML.
<!--Session data-->
Sara, technical writer/jackbe



Hi fellow mashers,
Does anyone know if it's possible to dynamically create a variable in an emml script.
For example:
Some variable that contains a string value:
then
<assign literal="a bit of data" outputvariable="{$dynamVar}" />resulting in:
producing:
I've tried a few things, but will find another approach to the problem I have if this isn't possible.
Cheers, Innes