Hello! Long time Seatable user.
Now implementing it in a company I started working in, for document list. Everything is going great but we have one step that we cannot get over, thus me coming here to ask for help.
Setup currently: Based on selections from multiple columns a name is generated(by using concatenate etc), and that works well, but we also need to have a unique number at the end of the document name, example name Test_doc_type001. The 001 is a sequence number based on how many counts of “Test_doc_type” documents we have, for example, if we have three documents named “Test_doc_type”, one will have 001, another 002, and last 003(which is asigned to which is not necessarily important).
In excel we did it manually - have a column that counts instances of the same document name and added the number manually. But we would like to generate it, so a new document can be added with forms and automatically generated the 001 or 002 or w/e.
What could be our options? Pyhton or json and run it often? How could that be done so that it automatically then gets generated when a new line is added?
Modify the concatenation formula in your formula column
Check if this works
Sure, there are also more complicated ways. You could add an automation with “new record” as the trigger event. The action could then be a script that generates a 7-character alphanumeric string which should – for all practical purposes – be unique.
Thanks! But the problem isnt unique number but the fact we need unique number for every file with same name not globally. Fx. Lets say the only document currently is called Test_document001. If you add a new document is Test_document as well it would be named “Test_document002”. After that if I have a different type of document, for example a picture, it would be called “Test_picture001”. Etc.
I am looking to identify and number each different combination of _ and add the number per specific instance.
In reality this is much more complicated, but rest of the stack I have working, only numbering is the issue.
I am not sure I understand. SeaTable does not name files and SeaTable does not support renaming files saved in a file column. (And how did you do this in Excel?) A more concrete description would be helpful.
For your serial question, this is how you could automate it:
Create a script which contains a counter for one document type (i.e., test_document) - every time the script is invoked, the current value of the counter is written into a cell of the triggering row and then the counter is incremented
Create an automation which executes the script as an action; the automation’s filter rule is that the a record is modified and the counter’s document type create in 1. is used
Once this works, you can replicate the scripts and automations for any number of document types you may have
Sure, you could also do this with one script. Depends on the number of document types you have. My approach has the advantage that you do not have to programmatically tell the different document types apart. The automation’s trigger rule does that for you.
By file/document I dont mean actual file, just a text value in a cell. That cell value is what we use to name a certain document(and that is done manually, which is fine), my bad explaining the situation.
A simpler example. would be a list of documents that would look like this:
The numbering is based on how many “A”, “B” and “C” exist. And I would like to generate automatically the values that follow the letter.