[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Math Calaculation code

Posted on 2011-10-03
Medium Priority
Last Modified: 2012-05-12
Hi Experts,

Im trying to perform the below calc which is in a loop,

FlxGridInvoiceInfo(rowskip_markup, "MARKUP") = Val(FlxGridInvoiceInfo(rowskip_markup, "EX_VALUE") * Val("QTY") / 100) * Val(Markup.Text)

FlxGridInvoiceInfo(rowskip_markup, "MARKUP") uses the row and column name "MARKUP", I just cant get the calc right....

FlxGridInvoiceInfo(rowskip_markup, "MARKUP") is a position on the grid
Val("QTY")  Is a column, which uses the same row as line above.
Val(Markup.Text) is a test box on the form.

Question by:deanlee17
  • 2
LVL 25

Expert Comment

by:Luis Pérez
ID: 36902560
And what's the problem? Do you get any exception? Can you post any error codes or messages?

Author Comment

ID: 36902567
Just comes up with 0 as the value
LVL 25

Accepted Solution

Luis Pérez earned 2000 total points
ID: 36902606
I think the problem is in the Val("QTY") part.

Even if the QTY column is in the same row, you are calling to the Val function passing only the string value "QTY" as parameter, not the real cell value for that column.

Try qualifying correctly the QTY value:

FlxGridInvoiceInfo(rowskip_markup, "MARKUP") = Val(FlxGridInvoiceInfo(rowskip_markup, "EX_VALUE") * Val(FlxGridInvoiceInfo(rowskip_markup, "QTY")) / 100) * Val(Markup.Text)

Hope that helps.

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question