Sequencer Creation

Sequencer Creation

Anonymous
Not applicable
721 Views
1 Reply
Message 1 of 2

Sequencer Creation

Anonymous
Not applicable

I want to implement a sequencer to change to it from the auto number for listing items in order. My script to run is; 

var seq = new Sequencer('Q',5000);
var value = seq.nextValue();
item.NUMBER = 'QUOTE' + value;

How do I make this appear in the workspace as a column to help label the order of my quotes?

0 Likes
Accepted solutions (1)
722 Views
1 Reply
Reply (1)
Message 2 of 2

gasevsm
Alumni
Alumni
Accepted solution
Greetings,
>From the script i see that you're are already storing the sequence value to a field named NUMBER. If number is numeric eg integer or float type, this code will be a problem since the value is alphanumeric as you have it coded eg. 'QUOTE5001'.
~ First you need to use a field type that supports alphanumeric values eg. SingleLineText.
~ Then ensure that you run this code logic as an oncreate script behavior so that the value is actually assigned to the NUMBER field when items get created.
~ Finally its a simple matter of editing an existing workspace view, find and add the NUMBER field to the view and save it. You will see the sequence in the left side item navigation list.
HTH,

Martin Gasevski | Fusion 360 Team Product Manager
0 Likes