Cannot Convert Text to number

hi all Recently we have changed one field type from number to text.After that one user is getting error message"Cannot convert text to number" while saving a document created by him.It is saving without any error message for all others.

while debugging it is giving errror message on line

End Sub…

Can any one help me

cheers

Merrin

Subject: Cannot Convert Text to number

If the problem comes up only for one user, try:remove the db icon from the user’s workspace,

shutdown the notes client

kill the cache.ndk

try again

regards axel

Subject: RE: Cannot Convert Text to number

Debugging doesn’t help because it’s a formula error, not LotusScript. The message is “Cannot convert text to a number.” I would expect the error message to also mention which field’s formula it was executing. It could be any of your fields that refer to the field whose datatype you changed.

Attempting to convert a string to a number, might cause an error if the text is not a legal numeric value. Since you have apparently narrowed the problem down to a particular field, I would look at the value in that field. Is it a legal numeric value on that user’s workstation? The answer might depend on the user’s regional settings. For instance, the string “1,000,000” is a legal number for some users, but not others, since the thousands separator and decimal point character can be different on different systems.

This is why it’s a bad idea to store numeric values in text fields (the same applies to dates). Why did you do this? Are you aware that the properties dialog for number fields has a tab that lets you adjust the formatting of the number?

Subject: RE: Cannot Convert Text to number

I have changed the field type from number to text to avoid duplicate numbering issue.It should be a unique numberEarlier it was just incrementing the latest number with 1 to find new number for the document.No i had appeneded some information of username so that it remain unique.

For Eg earlier it was 200

Now it is 200-M500

Input Translation of that field is pasting below

a := @DbColumn(“Notes” : “NoCache”; “”; “Uudet\uusimmat”; 1);

temp:=@If(a!= “” & @IsNewDoc;@Subset(a; 1) + 1; Obs_nr1!=“”; Obs_nr; 1);

temp1:=@Soundex(@Name([CN];@Left(@Name([CN]; @UserName); 1)+@UpperCase(@Right(@ReplaceSubstring(@Name([CN]; @UserName);" “;”"); 5))));

value:=@If (a=“”;@Text(temp);@Text(temp)+“-”+ temp1);

@If(@IsNewDoc;value;docnumber)

But if it is an issue of input translation all users should get error message right?

Our Scenario is like User A created document saved it many times…Then User B changed some field values,B also saved it

Then error message is coming to user A when he tried to save same document.User A can create new document withput any issues

Issue is like only user A is getting Error message for that particular document

Two other persons tried to save it ,it is getting saved without any issues

Title of Error message is “Field Contains incorrect value”.It is not giving any field values

Subject: RE: Cannot Convert Text to number

I’d like you read about the C R I S P Y initiative, and especially read the articles about debugging that this page links to. You have to debug this formula. It might not even be this formula that is causing the problem. There might well be something else about the document and this is just a coincidence of timing.

I suggested it would make a difference in some cases whether the number formatting items were different. Well? Are the number formatting options different for the two users?

I don’t see a place in this formula where you are trying to convert text to a number. This is not the formula that’s causing the error. Possibly it’s the view column formula where the error is occurring.

There are several things wrong with what you’re doing:

If you don’t really need the value to be a number (and it’s not a number now), why not just use @Unique and be done with it?

Don’t do an @DbColumn on all your documents. As the number of documents grows, this will get slower, and slower, and slower. If you must read the last or first value from a column, use LotusScript to read just the last or first value. Fetching back 300,000 bytes of data so you can read the first 5 bytes, is silly.

Even worse, it does the @DbColumn every time the form is refreshed or saved, even though the lookup value is not used unless it’s a new document.

Don’t assign a unique identifier in an input translation formula. Do you really want the value to change every time a user edits the document and every time someone refreshes the form? Oh my god, it does an @DbColumn of every document in the database whenever someone refreshes the form, then doesn’t even use the value. Total waste of several seconds of the user’s time, over and over and over again.

What is the type of the data in the column you’re looking up, number or text? If it’s text, how do you expect @Subset(a; 1) + 1 to work? My suspicion is that the error is coming from some other formula. It might be the column formula.

Subject: RE: Cannot Convert Text to number

hi all,Issue is fixed.I haved missed to change type of that field to text in one subform…Thanks all for your help:-)

Subject: Cannot Convert Text to number

Look at your validation or translation formulas for that field.