need to count +1 (add a new document and set the new number)
Posted on 2005-04-21
i have a view where all documents are sorted descending.
the filed "number" is a text filed.
in the view it's displayed as "text to number".
i need a script that if a button is pressed
- the view "list" is found
- the 1st number (in the 1st column) is the highest available number is
- a new document is created and the value of the field number is the actual highest number +1
(if needed i can change the view but not the filed properties.)
it'd be very good if pressing this button the new documents is presented in edit mode to the user that he can enter the equivalent name for this number in the field name.