Getting the current value of a sequence.

Hello All, I'm trying to do something very simple, but can't figure it out. I'm comfortable in I have not done anything in Aras yet, so I'd imagine the problem is more down to syntax and lack of understanding. All I want is to be able to obtain the current value of a specific sequence that I have created. This what I have done so far: Dim inv as Innovator = Me.getInnovator Dim SeqNo as item = inv.getItemByKeyedName("sequence","Z_Seq_PartNumber") '--Gets the my user defined sequence Dim currentValue as Integer = SeqNo.getproperty("current_Value") '--Obtains the current value of the user defined sequence Me.setproperty("item_number",currentValue) '--returns the value The returned value I get is 0 when it should be 11, which suggest that I have the wrong Item. But I do not understand why it should be so! Any help and advice greatly appreciated. Thanks
Parents Reply Children
No Data