Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
pvintona8
Partner - Contributor II
Partner - Contributor II

Specify a default expression for a Measurement in the definition.xml for an extension?

Is there a way to specify a default expression for a Measurement in the definition.xml for an extension?  I'm looking for somthing similar to the Expression attribute that is available for Text objects:

<Text Label="Show Detail?" Type="checkbox" Initial ="" Expression="1" />

<Measurement Label="My Measurement" Initial="" Expression=" ='Default Expression goes here.' "  />

I've tried to "push" a value into the expression via script.js and properties.qvpp, but can't get those methods to work either.  If somebody can help figure out this methodology instead, that would definitely be an acceptable solution too.

Thanks for the help!

1 Solution

Accepted Solutions
ErikWetterberg

You can use the initiate tag:

<Initiate  [Name=""] [Value=""] />

Something like:

<Initiate Name="Chart.Expression.0.0.Definition" value="Default Expression" />

Hope this helps.

Erik

View solution in original post

5 Replies
ErikWetterberg

You can use the initiate tag:

<Initiate  [Name=""] [Value=""] />

Something like:

<Initiate Name="Chart.Expression.0.0.Definition" value="Default Expression" />

Hope this helps.

Erik

pvintona8
Partner - Contributor II
Partner - Contributor II
Author

Thanks, Erik!  Worked perfectly!

pvintona8
Partner - Contributor II
Partner - Contributor II
Author

Erik, any idea why I would get a "Server Error" whenever the Value attribute contains a ">" character?  Every other special character I use seems to work without a problem.  Any ideas for a workaround?

Not applicable

You must escape some characters in xml:

"    &quot;
'
  &apos;
<
  &lt;
>
  &gt;
&
  &amp;

pvintona8
Partner - Contributor II
Partner - Contributor II
Author

Thanks, jgeorge!  That did the trick!