Expected numeric/value expression
Hi experts,
I'm new in VC and have very strange problem:
When I'm trying to format fields or write IF expression, I'm getting an error "<b>Expected numeric/value expression"</b>.
For example, NSTR(@value,"9.2") or IF((ISNULL(@value1),@value2,@value3).
What is the problem?
Thanks in advance,
Inna
P.S.
We have EP7 SP11 and I'm trying to edit fields in <b>charts series</b>.
Hi Inna,
this error occurs, because you have the wrong data type as return value.
One example:
You have an expression box, which needs a boolean value then you use a formula like
IF((ISNULL(@value1),@value2,@value3)
@value2 or @value3 is not from the data type boolean.
You should use instead e.g.:
BOOL(IF((ISNULL(@value1),"false","true"))
Hope that helps.
Best Regards,
Marcel
Similar Messages
-
Using substring to pick the numeric value from a string failing
Hi,
I have a string like fffd_1234.com from this I need to pick the numeric value from which is in between the _ and . , for that I have wriiten the expression as
Reverse(SUBSTRING( REVERSE( "fgfg_asdd.com" ),
FINDSTRING(Reverse( "fgfg_asdd.com" ), ".", 1 )+1 ,findstring(
Reverse( "fgfg_asdd.com" ),"_",1 )-FINDSTRING(Reverse("fgfg_asdd.com"
), ".", 1 )-1))
This is throwing me the error or its giving me with the result with _123.Why all the "reverse" calls? Do you expect underscores or periods to occur more than once in the file name?
This should work:
SUBSTRING("fffd_1234.com", FINDSTRING("fffd_1234.com", "_", 1) + 1, FINDSTRING("fffd_1234.com", ".", 1) - FINDSTRING("fffd_1234.com", "_", 1) - 1)
Talk to me now on -
Two strings and a numeric value to write to a measurement file
Hi all, I need to write two string values and a number value to file. I made a basic VI showing what is needed. I figured to cheat a little by sending my time stamp to the comment node. I then converted the id string to a decimal number and merged it to my numeric value. All is great with the output in Excel, accept my ID string dropped the last two digits and replaced them with a zero. Even if I used a numeric constant with this same value, it replaces the last to with zero's. The problem seems to reside with the write to measurement file VI. If I open it directly with wordpad it saves it as 2.602189E+8. Any ideas to save these three values? Thanks
GeraldWhen you use one of the Express VIs, you are limited to what you can do. The Write to Measurement File expects to writing measurements (numerics) and not string constants so eveything gets converted to floating point. You could probably modify it but using the lower level file I/O functions is just as simple. Here's a modification. I put the file write inside the loop because I would assume you want every value written. With your example, you would only save the very last iteration. If you do only want to save the last result, then it can be suitably modified.
Attachments:
time_insert_mod.vi 15 KB -
'Variable Substitution' error - Expected numeric element index
Hello everyone!
I'm using the 'variable substitution' property in XI to replace the filename of the output file to a value in the message payload.
Here are the parameters I provided:
File Name Scheme: %filename%.xml
Variable Name: filename
Reference: payload:ORDERS05,1,recordset,1,IDOC,1,E1EDK02,BELNR,1
I'm getting this error in the adapter engine:
Caught exception while initializing variable substitution engine: Cannot parse pseudo-path for variable substitution: 'filename': Expected numeric element index, got 'BELNR': For input string: "BELNR"
Can anyone tell me what this means, and how I can fix this problem?
Thanks in advance!
GlennYup, raj! it's IDOC to file.... I did what you asked but I'm now getting this error:
MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: The Adapter Message Property 'FileName' was configured as mandatory element, but there is no 'DynamicConfiguration' element in the XI Message header: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: The Adapter Message Property 'FileName' was configured as mandatory element, but there is no 'DynamicConfiguration' element in the XI Message header
any idea what it means?
Kind regards,
Glenn -
Popup Key LOV, NULL and "Invalid numeric value undefined for column"
Hello.
I've created an item based on database column of NUMBER type and set the following properties:
Display As = Popup Key LOV (Displays description, returns key value)
List of values definition=select 'display_value' d, 1 r from dual
Null display value=%
Null return value=
Display Null=Yes
When I select "%" in the LOV and try to apply changes to database I get error:
ORA-20001: Error in DML: p_rowid=1781, p_alt_rowid=N1, p_rowid2=, p_alt_rowid2=. ORA-20001: Invalid numeric value undefined for column N2
Error Unable to process row of table TTT.
If I set Display As = Select List, all works fine. But I need Popup Key LOV.
Could anybody help me?
I use Application Express 2.2.1.00.04Hi all,
I did my homework and solved this issue. First I would like to thank Patrick Wolf for the invaluable help he gives out on thread Re: Null value handling in LOVs The code presented here is just a minor edit to his code, but an essential one when dealing with Popup Key LOV items.
Here's what I did:
1. Create an Application Process.
Name: RemoveNulls
Sequence: 0
Point: On Submit: After Page Submission - Before Computations and Validations
Process Text:
BEGIN
FOR rItem IN
( SELECT ITEM_NAME
FROM APEX_APPLICATION_PAGE_ITEMS
WHERE APPLICATION_ID = TO_NUMBER(:APP_ID)
AND PAGE_ID IN (TO_NUMBER(:APP_PAGE_ID), 0)
AND LOV_DISPLAY_NULL = 'Yes'
AND LOV_DEFINITION IS NOT NULL
AND LOV_NULL_VALUE IS NULL
LOOP
IF (V(rItem.ITEM_NAME) = '%null' || '%' OR V(rItem.ITEM_NAME) = 'undefined')
THEN
Apex_Util.set_session_state(rItem.ITEM_NAME, NULL);
END IF;
END LOOP;
END;Error Message: #SQLERRM#Condition: None
2. You should be able to submit a Popup Key LOV with a NULL value now.
Once again, THANKS, Patrick! You rock! I'm seriously thinking of trying ApexLib now :)
Georger -
Assigning a Numeric Value in a Cell Based on Text in Another Cell
In advance, thanks for your assistance. I'm trying, in vain, to assign a numeric value in a cell based on text (from a dropdown menu) in another cell. For example, in cell A5 I have a dropdown list that includes the options "blue", "red", "white", and "gold." I want cell C15 to be 2 if A5="blue"; I want C15 to be 0 if A5="red"; I want C15 to be 2 if A5="white"; and, I want C15 to be 1 if A5="gold."
Tippet,
This is a job for LOOKUP.
The expression for the Result cell is: =LOOKUP(A2, Lookup :: A1:A4, Lookup :: B1:B4)
The aux. table contains the matches that you assign for the colors.
Regards,
Jerry -
How to pass a numeric value without its format to a subsequence?
I have a sequence with a numeric parameter that is interpreted as a 16-bit bit mask. The numeric format of the parameter of that sequence is therefore "%#.16b".
I also have a Sequence Call step in a second sequence (in the same file) that calls this first sequence. That second sequence passes literal values for that bit mask in the Sequence Call. My specific problem at this point is that, while debugging, I don't see the parameters in the numeric format I explicitly specified for them, but rather in one of three possible formats:
- Literal values seem to come with a "system"-wide (maybe sequence-file-specific?) default format, which is decimal instead of binary.
- Variable values (e.g. from the Locals) have their specific (and also explicitly defined) numeric format, which can be anything instead of binary.
- If I don't pass a value but use the parameter default, this default is shown in the parameter's actual numeric format, binary. This is the only case that works as intended.
How do I get the parameters to *always* keep the numeric format I specified for that sequence?
The attached file tries to reproduce the problem and the intended result using only Sequence Calls and Message Popups. My version is TestStand 3.1f1.I just want to debug my subsequence and see its parameter represented as "0b0000000000011010" when I supply a literal value of 26.
Ok, I try to be more explicit and show my problem using your suggestion: (The resulting sequence file is attached.)
- Create a new sequence file.
- Insert a new sequence "Sequence".
- In "Sequence", create a parameter "Parameter" of type "Number".
- Change the numeric format of "Parameter" to Binary with a minimum of 16 digits and *without radix*, ie. "%.16b". (In the other sequence file I used "%#.16b".)
-> Intention: I want to see the supplied parameter value in this numeric format when debugging or converting to a string using Str().
- Still in "Sequence", create a local "Local" of type "Number".
- Change the numeric format of "Local" to the same as above, "%.16b".
-> Intention: I want to demonstrate your way here, which actually works (I can use it as the "reference string" of the yet-to-be-defined message box), but does in an indirect way what I want to do directly using only sequence parameters.
- Insert a "Statement" step in "Sequence".
- Of "Statement", "Edit Expression" and use "Locals.Local = Parameters.Parameter" as the expression.
- Insert a "Message Popup" step in "Sequence".
- Of "Message Popup", do "Edit Message Settings", and use the following expression as the Message Expression:
"I have this: " + Str(Parameters.Parameter) + "\n" +
"I want this: " + Str(Locals.Local)
- Insert a "SequenceCall" step in MainSequence.
- Point "SequenceCall" to sequence "Sequence" of the current file and supply exactly the literal value 26 for the parameter.
- In "MainSequence", create a local "Local" of type "Number".
- Change the numeric format of this "Local" to something very dangerous, eg. "%9.16o".
- Assign the exact numeric value 4616 to this "Local" variable.
-> Intention: I want to demonstrate that there are cases where a propagation of numeric formats to subsequences can actually be more than a mere nuisance.
- In "MainSequence", insert a second Sequence Call step, "SequenceCall_2".
- Let "SequenceCall_2" call the same sequence "Sequence", but supply Locals.Local for the parameter.
- Now run the sequence file in "Single Pass" mode.
- In the first popup, you see that I get the (binary!) representation 0000000000011010 only for the local variable, but I also want it for the parameter value.
- In the second popup, you see that I get the (octal!) representation 0000000000011010 for the parameter value, which would be correct (for what I want) if I had supplied the decimal literal 26 again. You see that the binary representation is something entirely different here!
I hope you now get the point. Thanks for answering!
Attachments:
numeric-format-02c.seq 35 KB -
Hi,
How to retrive the value of below query.
I am encountered with numeric value error.
select power(10,333333333333) from dual;Thanks in advanceYou did look up the error in the online documentation?
Why not?
If you would have done so you would have gotten
Cause: Evaluation of an value expression causes an overflow/underflow.
Action: Reduce the operands.
Looks clear to me.
Looks like you should have done this first in order to avoid redundant questions.
Sybrand Bakker
Senior Oracle DBA
Edited by: sybrand_b on 25-jun-2009 2:49 -
JMS Queue XML numeric value out of range
Hi
I have an interface that process the root element of the JMS message.
It is failing on the step Load JMS to XML. The error states: numeric value out of range.
I've analysed the message and determined the exact data item which is 11 digits long.
The JMS model only accomodates for numeric(10,0). I tried changing it, but still get the error.
Any idea what I need to do so that this step will process that data without error?
Cheers
PS ODI 11.1.1.6Hi All, I have one scenario to read the source file . The file delimiter is '|' . The no of pipeline for each line is 17. So if a line containing more than 17 , send an error email. For this first i am printing tota pipeline in ecah line to afile called pipelinecount.txt . Then i will read this file and send each value to while loop /for loop , where it will get > 17 , it will exit the process and send an email. But here in script i am getting error at while line. Could anyone help. #! /bin/kshset -x SOURCE_DIR=/vp01/SrcFilessed 's/[^|]//g' /vp01/SrcFiles/Test.txt | awk '{ print length }'> /vp01/SrcFiles/pipelinecount.txtcd $SOURCE_DIRwhile line in `cat pipelinecount.txt`; do if [ $line -eq 17 ];thenecho "No issue in pipeline"exit 0;fiif [ $line -gt 17 ];thenecho "No of pipelines exceeded the expected. Please verify the source file." | mailx -s "WKFS Load: Failed" [email protected]
-
Numeric value in words (for Cheque printing)
Hi All,
To convert numeric value in words (for Cheque printing), I created two functions in Forms and reports 6i.
1) FUNCTION Spell (val number) RETURN CHAR IS
sp varchar2(100);
BEGIN
if val > 0 then
return(initcap(to_char(to_date(val, 'SSSSS'), 'SSSSSSP')));
else
return('');
end if;
END;
2) function SPELLED_AMOUNTFormula return Char is
cents number;
c_str varchar2(80);
val number;
begin
val := :p_instr_amt;
cents := (val mod 1) * 100;
if cents > 0 then --creates string for cents
c_str := ' and ' || spell(TO_CHAR(cents)) || ' fils Only';
else
c_str := ' Only';
end if;
if val < 1000 and val > 1 then
return (initcap(spell(floor(val))) || c_str);
elsif val > 1000 then
return(initcap(spell(floor(val/1000))) || ' Thousand ' ||
spell(floor(val mod 1000)) || c_str);
else
return('Zero'||c_str);
end if;
end;
This convert value up to thousands. How to convert the value more than 1 lac. please configure this code.
Thanks in advanceHi,
To spell integers as high as 5,373,484, use 'Jsp' instead of 'ssssssp'.
TO_CHAR ( TO_DATE ( n -- n = integer to be spelled
, 'J'
, 'Jsp' -- Case-sensitive
)5373484 is the Julian date of December 31, 9999, the latest DATE value in Oracle. In Oracle 10.2, you can actually spell numbers a little bit higher using the expression above, but I'm not sure why, and I wouldn't count on being able to do so in future versions.
There's no need for INITCAP here. If the 2nd argument to TO_CHAR is initcapped (as above), then the output will be, too.
To spell even larger numbers, see this page by Tom Kyte, which also includes languages other than English, and lakh-crore-arab-kharab wording.
Edited by: Frank Kulash on Oct 13, 2012 7:21 AM -
Searching for numeric values in a text field / SQL Server
Hi all,
here's a problem that I've been trying to solve for several days: I try to select rows from an MS SQL Server via JDBC that contain a certain numeric value at a certain position in a long varchar field.
I'm using queries like
select * from table where substring(field_1, 37, 7) like '1011234';Those queries always return an empty ResultSet. If I use the same queries in WinSQL, I get correct results (several rows).
The application code is working in principle; if I search for a text instead of a numeric value, for example select * from table where substring(field_1, 4, 5) like 'Paper'; , I get a complete ResultSet.
I've tried many variations (= instead of like, search in the entire field (without substring but with like '%1011234%'), with or without ', and more), but that didn't change anything.
It's also most probably not caused by the JDBC driver; I have tried JTDS first, and then the MS driver (newest versions) - no difference.
One idea was that the sort order is not correct, tried some COLLATE settings, but that didn't help so far. In this context I'd like to know how to determine the collation sequence of a certain column.
Another thing I tried was using CAST, for example SELECT * FROM table WHERE CAST(SUBSTRING(field_1, 37, 7) as bigint) = CAST('1011234' as bigint); or SELECT * FROM table WHERE CAST(SUBSTRING(field_1, 37, 7) as bigint) = CAST(1011234 as bigint);, but that didn't help either.
Some facts:
Server: Microsoft SQL Server, version 09.00.2047
Driver in WinSQL: SQLSRV32.DLL, version 03.85.1117
JDBC-Driver:
- JTDS, version 1.2
- Microsoft SQL Server 2005 JDBC Driver, Version 1.2
JVM: jre1.5.0_11
I didn't find anything on Google, or in this forum, or other forums. I really hope someone here can help me. Thanks in advance!
Best regards,
UicaYour note suggests to me that this is a coding problem, not a JDBC or SQL problem unless you are hitting a bug in the SQL Server JDBC driver. Others may have ideas from what you have written, but I think it would be helpful to see the actual code that you are executing that does not bring back the results that you are expecting (don't forgot to use code tags to format your code correctly).
It might also be helpful to execute a query (from within your Java code) to ensure that you are connecting to the right database, accessing the correct table and that your substring is using the correct offset. The query would look something like this (and then of course display the list of results):
SELECT substring(field_1, 37, 7) from table -
Numeric values longer than 32bit?
Greetings,
I'm an EE student currently working as a LV instrument driver developer
for a well-known T&M equipment manufacturer here in Munich.
My problem is the following: Is it possible to handle numeric values
longer than 32bit in LV? Specifically, one of my instrument driver VIs
needs to supply an initialization value to the Wideband CDMA "long code"
configuration menu of a versatile vector signal generator. This value
can range from 0x0 to 0x1FF,FFFF,FFFF (which accounts for 41 bits, if
I'm not mistaken). The instrument expects this value in hexadecimal
form.
A quick and dirty solution could be either to split up the control range
in 32+9 bits, i.e. place two controls on the front panel, or to use a
string control an
d have the user specify the hex value as a string. Both
solutions are not very desirable though, especially since instrument
driver VIs are meant to be used as sub-VIs in customer-specific programs
and for that reason aren't usually accessed from their front panels.
So, are there any other, more elegant solutions than the ones mentioned
above?
Thanks a lot in advance!
(c) Tobias HermannIn <[email protected]> Tobias Hermann writes:
>My problem is the following: Is it possible to handle numeric values
>longer than 32bit in LV? Specifically, one of my instrument driver VIs
>needs to supply an initialization value to the Wideband CDMA "long code"
>configuration menu of a versatile vector signal generator. This value
>can range from 0x0 to 0x1FF,FFFF,FFFF (which accounts for 41 bits, if
>I'm not mistaken). The instrument expects this value in hexadecimal
>form.
FORMING THE 41-bit STORAGE
You can create any arbitray numerical data length by using a binary
array. This is the best and most direct solution to your needs.
Just remember, LabView allocates binary arrays in multiples of bytes,
so a 41-bit array will be rounded up to a length of 6 bytes or
48-bits; however, LabView knows to return only the first 41-bits to
you upon request.
GENERATING AN ARRAY OF 41-bit VALUES
The next issue is that you need an array of 41-bit numbers. You simply
define this as a 2-dimensional array of binary values. When
initializing this array, be certain you order the dimension indices
such that the fastest moving index has a size value of 41. The slowest
moving index will then be for the actual numerical size of your array.
If you transpose the index definition, nothing will work right! Be
careful!
When your array (above) is defined, it should be shown in LabView as a
brown wire, which deplicts it as a binary 2-dimensional array. If it
is instead shown in a magenta color, then you instead defined and array
(cluster) of 41-bit binary numbers. That will work okay too (and will
even be easier the used), but it will take more storage and will take
LabView longer to handle. However, if you're more confortable will the
latter choice, I can understand that. It does have the feature of being
able to address each 41-bits number directly. With the 2-dim approach
I initially outlined, you'll need to slice out each 41-bit number from
the 2-dim array each time you access (read/write) it.
FORMATTING BINARY INTO HEX
Formatting your storged numbers is an entirely _separate_ issue and
your 41-bits numbers only need to worry about formatting when you
send them to an output device. For a LabView control panel, simply
open a binary array control, then select the appropriate options so
they are displayed in base-2, octal, or hex. LabView supports all
three display formats with any binary indicator.
If you need to format your numbers to a hex string (for an output
device), try the "To Hexadecimal" or "Format & Append" function.
Again, if you're using the 2-dim binary array apprach, you'll need to
slice out each 41-bit number indivdually. If you're using the cluster
(array) if 1-dim 41-bit array approach, you can skip that step.
Frankly, I'm not sure how well LabView's formatting functions work with
1-dim binary arrays, but in principal they should. If they don't work
directly, no big deal. Just cast the 41-bit arrays into U8 numbers
(bytes) and have the formatting function format those numbers into hex
strings; simply one more step.
One question: Why on earth do you want to format the data going
into your instrument in the first place? Almost all instruments will
take binary input _directly_ without formatting it into ASCII (octal,
hex, etc) first. This is much faster because the ASCII of all this
hex stuff requires many more bytes to transfer to your instrument.
Moreover, the instrument then needs to convert the ASCII (hex) back
into binary before it can use any of it. You should investigate
skipping the formatting step altogether. The exception might be
if you're using an RS-232 connection to your instrument where raw
binary isn't allowed. Newer interfaces like GPIB, 1394, etc will
allow binary transfer directly.
COMMENTS ON STRINGS
Don't use strings in LabView. By default, each string get a minimal
memory allocation of 2K. If you define a 100 element (array) string,
that's 200K of memory just to hold those strings. Not a big deal, but
when the memory manager starts doing garbage collection (which is
required with string manipulations), things will really slow down.
String are important, but data should always be stored in a binary
form within any computer, not in ASCII formatted form (hex included).
/\ Mark M Mehl, alias Superticker (Supertickler to some)
<><> Internet: [email protected]
\/ Preferred UUCP: uunet!iastate.edu!mehl
Disclaimer: You got to be kidding; who would want to claim anything I said? -
Validating numeric value in a filename
I have a file and the filename should be like ABC_12345_RES_20150410.txt and i have to validate the filename.I am facing problem in validating the numeric value which can change and its length also can change.
I am using the following expression to validate whether its the numeric value /not:
(DT_I4)(SUBSTRING( @[User::FileName] ,FINDSTRING( @[User::FileName] ,"_", 1)+1, FINDSTRING( @[User::FileName] ,"_", 2)-FINDSTRING( @[User::FileName] ,"_", 1)-1)) == (DT_I4)(SUBSTRING( @[User::FileName]
,FINDSTRING( @[User::FileName] ,"_", 1)+1, FINDSTRING( @[User::FileName] ,"_", 2)-FINDSTRING( @[User::FileName] ,"_", 1)-1))
This statement is failing the package when i am entering a character instead of digit.. But i don't want the package to fail rather i just want to log the exception in this case.
Is there any other way to validate the numeric Value?
Many Thanks in Advance!Thanks a ton Martin for your advice.
I can do that but Actually the conversion is failing.. its giving error that cannot convert to (DT_I8). M looking for any other way to validate the numeric value. -
Display comma for numeric values
Hi,
I want to display comma for numeric values.I know we can use strlen and concatenate, but any one can give me an example.
Ex: 1,234 and 12,234 , 1,22,500 ( iam expecting)
Thanks,
Veeruit depends on ur data...
if it is currency then u can use
WRITE.... CURRENCY...
if it is qty then u can use
WRITE....UNIT....
or u simply pass it to a packed field and it will take the default decimal settings of the user profile...
Reward points if helpful -
Validation To check numeric value
BEGIN
IF :P3_TOTAL_AMOUNT >= :P3_NET_AMOUNT THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
END;
The function returning boolean should compare total amount and net amount and through error if it less than net amount.
It works fine when the value of TOTAL amoun =365 and value of net amount = 364*(if it is all numeric value and no zero behind it)*
But the problem is
when is use Total amount = 9 and net amount = 100 (It doesnt works becuse it just takes 1 from the net amount and eliminates the zeros behind the 1(100) and it doesnt comes up with a error after validation )
Is there any one who can help me with this
Thanks,
HaryLev,
I'm not sure I follow. If you use to_number with a format mask and the user doesn't follow your mask, you'll get an error:select to_number('1000','999G990') from dual;This throws an "ORA-01722: invalid number" exception. That's why I say to try calling to_number without a format mask first, to handle the trivial case of the user not putting in the grouping separators (or whatever else is involved in your format).
You could, of course, put in a validation to make sure that the number follows the format you're expecting before you convert it (either for further validation, as in the original post, or for processing), but then you have multiple places where the format mask is specified--not to mention the annoyance for users when they put in a number only to be told that they need to use the appropriate grouping separators as well. My solution uses the data dictionary to get the format mask assigned to the page item and feeds that to to_number; if I change the page item's format mask, all of my processes automatically handle the new format. Because of the extra lookup, it's slightly slower than hard-coding the format mask, but that should be minimal as long as you don't use it in a where clause.
-David
Maybe you are looking for
-
A battery error has occured, the battery cannot be charged, replace the battery
I have a T61, bought 10/07. I got this message out of the blue after i unplugged my laptop and it shut itself off. Only turns back on when plugged in. The orange battery light is flashing despite it saying the battery is fully charged, i called le
-
Bad scans on an HP Color LaserJet Pro MFP M476dn
we have been using this All-in-One with no issues for a few months and then this morning, we get these black scans that have colored lines. doesnt matter what we scan or what type of scan we perform. i have been in the IT field for nearly 20 years
-
I updated air sdk from 4.0 to 16.0 beta to fix apple app store submitting bug. I can build the project and run it on simulator without any problem. But when I tried to export the ios release build, I got this error message: complilation failed while
-
Is 4GB RAM enough to run Mavericks on a MacMini 2.5Ghz/i5?
Since purchasing this new Mac Mini at Best Buy two weeks ago and upgrading from Mountain Lion to Mavericks, I've experienced two unsettling events: first, an out-of-the-blue Bluetooth shutdown (which required swapping out my wireless mouse and keybo
-
Do not use the Restore from Backup when upgrading
For those having issues...... Try to restore your phone as "New" and not from a backup. After you have a clean version iOS 4.0 on your phone customize your phone manually, do not use a backup. i know this can be a pain in the *** but it should fix mo