How can i replace an item no with an no

HI everybody,

I have to replace an item no instead of existed number which items has blocked.So i want to replace the no with what i have entered in item no.

i tried through process only reports

IF it.Blocked::“1” THEN

it.“No.”:=it.“Item No”;

it.MODIFY;

UNTIL it.NEXT=0

Can u please suggest me

Where is ‘REPEAT’’. ???

Hi Amol

Actually i put repeat in code here i forgot to write…

Is it working ???

Not working Amol

From your code it looks like you have two field in the item table

“No.” & “Item No.” and you want to replace the currect “No.” with the value in the “Item No.” field.

When changing a field that is the primary key you need to use RENAME

See here:
http://msdn.microsoft.com/en-us/library/dd355313.aspx

Plus your first post is unclear - are you wanting to change the “No.” field for blocked items only?

What do you want this and what are you ultimately trying to achieve?

And from your code it’s pretty clear you better be doing this in some test database, because you don’t know what you’re doing.

it.Blocked::“1”[:#]