Q3: You can add a new field to land just the imported data and keep your existing date field. The new Date() accepts a year, monthIndex (0 to 11, hence the -1) and then day, so we just need to flip the order to match. Q2: Swap this line around: var parsedDate = new Date(pieces, pieces - 1, pieces) īecomes: var parsedDate = new Date(pieces, pieces - 1, pieces) One text field to import the date as is, a second “date” field to store the canonical representation and a third script field that watches the text field and mutates it to the date field. Using a script in importing will speed that part of the process – the way I have been doing this until know is to use the File / Import / Records in Tap Forms and automating the process through Keyboard Maestro – but for 6 or 7 forms for each record it take several minutes – and sometimes does not work (if the computer slows down the appearance of a window or keystrokes etc are delayed in appear, etc…). I have to do this record by record – as the forms need to be linked together in Tap Forms – and have to be incorporate some manual data which is still recorded on paper. The backstory is that I am exporting several hundred records from FileMaker, each record (in Tap Form forms speak) consisting of several forms. More fundamentally, the database I have in Tap Forms contras a lot more Forms – and has many layouts based on and use existing dates – so I am reluctant to engage in a lot of restructuring to add more fields.Įither to do some processing of the dates in the script you originally provided or outside of Tap Forms – e.g. How would the script you provided need to be adapted for a non-USA (UK) format? Var newRecord = document.getFormNamed("Passport").addNewRecord() ĭoes you code require the date data first to be imported as a text field, and then the script, in another field, with the script attached to the field to format the date? document.getFormNamed("Other Form").addNewRecord() var newRecord = document.getFormNamed("Passport").addNewRecord() abort if there are any errors and log to console. Let csvFile = Utils.getTextFromUrl(filename) Let filename = "file:///Users/victor/Desktop/Passport - test.csv" Apologies in advance, but given my basic (almost non-existent) understanding of JavaScript, how do I incorporate into the script? // this imports the Papa Parse script
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |