I then also have to manually rename the file to match the information that was already in Coda. My problem is that I have no way of getting the files out of Coda without manually downloading them and transferring them to a folder. So although I used Coda to process the expenses by leveraging the custom attributes and Coda form, the hope would be I could always access the processed files in Dropbox since it supports searching the actual text in the files and can easily be searched from my MacBook universal search bar. So ideally I could export those files to a Dropbox folder for archiving after they have been processed in Coda. I know these files will not be able to stay in Coda forever due to size limitations. And although I could use 3rd party forms, none of them had the advantage of using Lookups and Filters for searching and selecting an open purchase order, current Vendor, etc. Since Forms only support uploading to the attachment features, I started using that instead of Dropbox. With the form, I could have them fill some of the initial attributes and then our bookkeepers could complete the additional ones and process it through Zapier. This updated file name made it a lot easier to browse past or archived expenses in Dropbox and to quickly navigate to the original file when reviewing an expense in our accounting software.Īfter Coda forms were released, I created an expense form that our employees could add expenses to instead of adding them to a Dropbox folder. Processed files would go from looking something like… %2010.40.52.pdf…to something like… 2021_01_01_Walmart_67345_ID4354.pdf by using Coda’s concatenate and format formulas as well as Row ID. That way, any files that were in the synced Dropbox folder pack would still be pending processing. It would process by sending the information to Zapier and from there Zapier would upload all the necessary information to our accounting software and it would then rename the original Dropbox file with attributes from Coda and move the file to a different folder. After all the attributes had been added, a button would be enabled that allowed them to process. We then synced that Dropbox folder through a pack on Coda. To do that, people were adding files to a Dropbox folder. I also use it to keep them out of our primary accounting software. I have our bookkeepers process those expenses in Coda because I can use lookups and custom filters to ensure things properly get coded. As a company, we have several hundred expenses every month. The only reason I am wanting to use the Coda attachment feature is for the custom attributes, as well as making use of Coda forms.įor instance, one application is for our expenses. I think, in your case, your function will be a kind of hybrid between 'read file' and 'process csv'.Thanks for the reply This is actually my exact goal though. I never created a script for CSV, but had some experience with writing TXT files content to another table. To read and process file contents from Airtable,Īnd this example (I also recommend to see them all) But I think you will follow different stages and you can't jump on next without understanding previous. Of, course, it's all the matter of taste. in rare cases - let, when I sure I need it. Next(current): always using const, for variables and functions. using mostly let, sometimes const, in very rare cases - var. Next level: understanding of arrow-functions. (Personally I named constants in all CAPITAL letters to make them more visible in code, but soon after stopped doing so) Next level: using const for variables designed to be constant - like table(s) and field names. Next level is to use let in functions and separate blocks of code using var everywhere is a typical behavior of JS beginners with a background of other languages (I started the same way 2 years ago) It's my personal opinion and I might be wrong, but sometimes you should avoid long variable names for fields, because you can use a lot of 'record.getCellValue(SomeVariableWithaLongName) in function expressions, and such code might be harder to read. Var targetTable = base.getTable('Claim Assignments') Var targetTable = base.getTable(targetTableName) Var sourceTable = base.getTable(sourceTableName) Var csvAttachmentFieldName = 'attachments' //name of attachment field containing CSV file Var targetTableName = 'Claim Assignments' //name of table to upload data to Var sourceTableName = 'Form' //name of table to extract data from it's also good to put names at the beginning, so the code can be changed for other tables. like many things in life, excessive amount of a cure might become a poison commenting code is good, but not so much. Unformatted code is hard to read, so any reader who doubt 'read or skip' will skip your post
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |