Notice that I have 4 rows imported and the last row completes the calculation even though the "260" is a text item. but the 1st 3 rows fail. The only difference being that the first 3 rows contain a £ symbol.
What i would like to do is adjust this Calculation script for Column C so that the calculation will ignore the £ sign in Column A (IF one exists) and thus completing the calculation.
NOTE: the £ symbol should still be visible in Column A, only the calculation in column C should ignore it.
Please can some1 help me with the code for this!!?
I do not understand why you have 'hard coded' that currency symbol? Use text field properties to format fileld as number, use numeric value and a currency symbol as £! Then you will get rid of that problem.
Freelancer
According to most IT HelpDesk people, the most common reason for user error (regardless of Operating System) is ID 10T.
Because the data is imported from an excel file, that particular column will import currencies (£2600.00) AND numbers (260.00) from excel.
Im not quite sure what you are saying but...
I have already tried setting the field to a numeric field. This causes a problem as it imports "0" from excel as it does not understand the '£' symbol and is expecting a number.
So, I think you should get rid of that Excel £ and just take those numeric values. How you are taking those values from Excel into PDF? C&P? VBA?Freelancer
If I had 8 hours to chop down a tree, I'd spend 6 sharpening my ax. -- Abraham Lincoln --
According to most IT HelpDesk people, the most common reason for user error (regardless of Operating System) is ID 10T.
i cant, thats the whole point. I need to import with £'s or without £'s. Thats why I have set it to a text field. I know the text field works in the multiplication as long as the £ is ommitted when doing the calculation - hence my question and why I need help.
The Values are taken from Excel using a ODBC connection and some code to bind the data to the correct fields.
Is anyone able to help me, im sure its such a simple thing....
which works aside from the fact row 4 calculation is wrong as it also ignores the number '2' in the "260" value. I need to modify this so it only skips £ symbols.
also I have a problem using this method as i get a bunch of errors on all the empty rows (row 5 onwards are empty so javascript seems to be having a panic attack)
stock_t1.rawValue has no properties 1:XFA:form1[0]:table_1_rows[4]:tvos_t1[0]:calculate stock_t1.rawValue has no properties 1:XFA:form1[0]:table_1_rows[4]:tvos_t1[0]:calculate stock_t1.rawValue has no properties 1:XFA:form1[0]:table_1_rows[5]:tvos_t1[0]:calculate stock_t1.rawValue has no properties 1:XFA:form1[0]:table_1_rows[5]:tvos_t1[0]:calculate stock_t1.rawValue has no properties 1:XFA:form1[0]:table_1_rows[6]:tvos_t1[0]:calculate stock_t1.rawValue has no properties 1:XFA:form1[0]:table_1_rows[6]:tvos_t1[0]:calculate
again it works but I have the problem that rows 5-7 contain no values so produce this error, can I get around this?
stock_t1.rawValue has no properties 1:XFA:form1[0]:table_1_rows[4]:tvos_t1[0]:calculate stock_t1.rawValue has no properties 1:XFA:form1[0]:table_1_rows[4]:tvos_t1[0]:calculate stock_t1.rawValue has no properties 1:XFA:form1[0]:table_1_rows[5]:tvos_t1[0]:calculate stock_t1.rawValue has no properties 1:XFA:form1[0]:table_1_rows[5]:tvos_t1[0]:calculate stock_t1.rawValue has no properties 1:XFA:form1[0]:table_1_rows[6]:tvos_t1[0]:calculate stock_t1.rawValue has no properties 1:XFA:form1[0]:table_1_rows[6]:tvos_t1[0]:calculate
Please see image, much easier to understand this way!
[img]http://docs.google.com/File?id=dcj7tdvs_22dfs2zvg5_b[/img]
Column A and B are imported via an excel file.
Column A is a TEXT field (otherwise the £ symbol will not import)
Column B is a Numeric field
and Column C is A x B using the equation:
this.rawValue = stock_t1.rawValue * market_price_t1.rawValue;
Notice that I have 4 rows imported and the last row completes the calculation even though the "260" is a text item. but the 1st 3 rows fail. The only difference being that the first 3 rows contain a £ symbol.
What i would like to do is adjust this Calculation script for Column C so that the calculation will ignore the £ sign in Column A (IF one exists) and thus completing the calculation.
NOTE: the £ symbol should still be visible in Column A, only the calculation in column C should ignore it.
Please can some1 help me with the code for this!!?