Message Boards Message Boards

0
|
13148 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

Reusing variables in Widget Builder

Posted 10 years ago
Posted 9 years ago

Hey Alex,

This might be a tad late, but you can reuse variables by defining them at the end of the query:

[//quantity:${ingestedMass}//] * 0.5 ^ ([//quantity:${elapsedTime}//] / (p * b / (p + b))),
     where p = [//quantity:${phyHI}//], b = [//quantity:${bioHI}//]

Edit: Alternatively, you can use the ReplaceAll[expr, rules] function:

[//quantity:${ingestedMass}//] * 0.5 ^ ([//quantity:${elapsedTime}//] / 
    ReplaceAll[p * b / (p + b)), {p->[//quantity:${phyHI}//], b->[//quantity:${bioHI}//]}]

~a different Alex

POSTED BY: Alex Brooke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract