The "math" command does not exist as a command, only as a function.

You can create it easily enough with a line or two like this in your
config file.

function BOLTXmath($value, $field) {
        BOLTcomm2func($value, $field);
        }

The BOLTcomm2func function takes a form command and runs it through a
corresponding function, then returns the value.

Haven't tested this, but let me know if it doesn't work. It wouldn't
be a bad idea to have a math command in the core, but it's not there
yet.

Cheers,
Dan


On Mon, Nov 8, 2010 at 2:37 PM, karlh626 <[email protected]> wrote:
> I am trying to modify the value in a page data variable.
>
> Eventually, I would like to do this with a script which is run upon a
> page load however for right now I am trying to get it to work in a
> form.
>
> Steps:
> 1.  retrieve current variable value
> 2.  subtract a value from the retrieved value
> 3.  save the new value back to the page data.
>
> Here is the syntax of the latest form I have tried.
>
>
> [form]
> [submit]
> [session current {:data1}]
> [session var2 5]
> [session math {=current}-{=var2}]
> [session data1 {=math}]
> [session savedata data1]
> [form]
>
> what is saved to the data variable is the string 100-5 if the data
> variable, data1 contains 100 to being with.
>
> If someone could please point out what I might have wrong, I would be
> very appreciative.
>
> Karl
>
> --
> You received this message because you are subscribed to the Google Groups 
> "BoltWire" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/boltwire?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/boltwire?hl=en.

Reply via email to