Mathematical computations

Is Coranto not working properly for you? Here's where to ask for support help; for best results, follow these steps:
  • - Check your core/addon documentation for possible solutions
  • - Search these forums for similar problems that have already been solved
  • - If you're still stumped, check out THIS TOPIC, and post your question in this forum!!

Moderators: Spunkmeyer, Dale Ray, SrNupsen, Bluetooth, Jackanape

Mathematical computations

Postby Stoneage » Sat Apr 28, 2007 4:04 pm

Here I go again... challenging Coranto! The program hasn't let me down, so far.

I am wondering if it is possible (maybe using PerlCode) to perform a mathematical calculation. I want to subtract a number entered in a text field from a number entered in another text field and have the resulting number automatically calculated and displayed.

In Style:

<Field: CustomField_A> (minus) <Field: CustomField_B> (equals) <Field: CustomField_Total>

I couldn't find anything on this topic in the forum archives. Does anyone have a method for accomplishing this?

Thanks.
Deborah
Stoneage
 
Posts: 52
Joined: Fri Jan 12, 2007 1:07 am
Location: Maine, USA

Re: Mathematical computations

Postby Parahead » Sat Apr 28, 2007 9:06 pm

<Field: CustomField_A> (minus) <Field: CustomField_B> (equals) <Field: CustomField_Total>

Something like this maybe?
Code: Select all
<PerlCode>
$TotalField = $CustomField_A - $CustomField_B;
</PerlCode>
<Field: CustomField_A> (minus) <Field: CustomField_B> (equals) <Field: TotalField>
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby Stoneage » Sun Apr 29, 2007 1:28 pm

Parahead,

Thank you! That works perfectly.

Deborah
Stoneage
 
Posts: 52
Joined: Fri Jan 12, 2007 1:07 am
Location: Maine, USA


Return to Troubleshooting

Who is online

Users browsing this forum: No registered users and 4 guests

cron