Tap Forms app icon half
Tap Forms Forum text image
Blue gradient background

Exchange tips and ideas with the Tap Forms community

Search Results for 'script'

Viewing 15 results - 2,641 through 2,655 (of 2,866 total)
  • Author
    Search Results
  • Brendan
    Keymaster

    Oh, also that console.log() statement isn’t needed. I was just printing out the end_mileage value to see what was in it.

    I’m glad you found it useful.

    I think Scripts will open Tap Forms up to a universe of possibilities.

    Brendan
    Keymaster

    Here’s what the script looks like:

    var vehicle_id = 'fld-64b0b17a635f49b8b40867e45f8d24db';
    var start_mileage_id = 'fld-9674e316bfed408ca6710ce81b72bf05';
    var end_mileage_id = 'fld-eed890f4533f4672817c5ae5d4dc8257';
    
    var vehicle = record.getFieldValue(vehicle_id);
    var end_mileage = record.getFieldValue(end_mileage_id);
    
    var newRecord = form.addNewRecord();
    newRecord.setFieldValue(vehicle_id, vehicle);
    newRecord.setFieldValue(start_mileage_id, end_mileage);
    
    console.log(end_mileage);
    
    form.saveAllChanges();

    So whatever record is currently selected at the time you run the script will be what record is. The code gets the values from that selected records, then tells the selected form to add a new record, then it copies the vehicle name to the same field in the new record and copies the end_mileage value to the new record’s start_mileage_id field.

    Easy peasy :)

    Ok, for someone who knows how it works. But it’s really not that complicated once you see it written out.

    Brendan
    Keymaster

    Ok, here’s a Mileage Tracker form with a Form script that will do what you asked for.

    Attachments:
    You must be logged in to view attached files.
    Brendan
    Keymaster

    Hi Daan,

    That’s a really good idea and certainly doable. You would probably want to use a Form script for that. The nice thing about form scripts is you can just reference whatever current record is selected, then tell the form to make a new record within the script, copy the values from the current record and stuff them into the new record.

    So what you would do is select the latest record, select the script (which you can also assign to a shortcut key) and run the script.

    I’ll make an example form and post it here.

    Daan
    Participant

    Hi Brendan, it would be great to get some working examples to quickly learn and understand how to use the new JavaScript feature. If you need an useful application for a script, I might have one… ?

    I use TapForms for a logbook documenting my boat trips. In this logbook, I keep the records sorted by ‘trip start date’ (one of the fields). When adding a new record, I would like to copy several fields from the previous (=most recent) record to the newly created record. This would allow me to automatically copy the ‘mileage upon arrival’ field from the most recent record to the ‘mileage on start’ field for the new record. The same applies for the ‘Arrived at’ field from the most recent record, I would like to copy (or pre-fill) the contents of that field to the ‘Start from’ field in the newly created record.

    I can imagine this might be useful for others as well. Would you be able to give an example implementation of a script doing something like that?

    Thanks in advance!

    Daan

    #30662

    In reply to: Character input

    Yoo Byeng Han
    Participant

    The phenomenon of the first character being released and the last character being deleted when entering Han-gul.
    https://www.dropbox.com/s/c3c2yokfg7ywc8p/Tap%20Forms_Hangul%28korea%29.mp4?dl=0

    #.First characterization issue: essentially update from Tap Fprms.
    UTF character transformation (unabsorbed, neutral, and longitudinal) is required, and then reassembled and applied as fields.

    #.Troubleshoot problems with deleting end characters in File Maker Pro
    1.Enter text in field
    2. Creating Scripts
    if [Code (Get key input trigger ) = 10 Code (Get (key input trigger ) = 13 ]
    Perform the script [ “A” ; ]
    OnTimer Script Installation [ ; ]
    script [text result: 0 ]
    End if

    3 “A” Script Creation
    OnTimer Script Installation []

    #30650
    Stan TAYLOR
    Participant

    A File Attachment Field is used to link the Subject of a Record to appropriate documentation.
    In the instance concerned the documentation is a PDF, the attached PNG shows how this is presented.

    From the early years of Adobe Acrobat I progressed to AA Pro until Adobe pulled the support for v XI. The cost of using the subscription alternative was not justifiable so diffferent software has been aquired.

    It seems that Tap Forms have ‘Preset Icons’ that are dependent on the File Type placed in the File Attachment Field?

    Is there any means to enable the ‘Preferred Icon’ to display as shown in the second attachment below?

    Thanks for your time, best wishes,

    Attachments:
    You must be logged in to view attached files.
    #30644

    In reply to: Character input

    Yoo Byeng Han
    Participant

    Last character disappear

    Please modify the Tap Forms program by referring to the link below
    https://github.com/bangjunyoung/KoreanTextMatcher
    If you search Google for a neutral Korean moon, you can see why this happens.
    As it stands, Tap Forms is very inconvenient to type in Korean, but no one will be using it.

    Ninox & File Maker does not experience this problem with default input systems.
    However, File Maker Pro says that if you need to write a Script and input in Korean, you can create and solve a user function.

    I hope you can enter Korean correctly.

    #30595
    Karen
    Participant

    You’re welcome Joel! Over the years I’ve used a few Db apps and in my humble opinion, have found this one to be the best one. Now, with that said … iCloud sync can be tricky and sometimes you have to go thru steps to fix sync issues. But, iCloud has also done some funky things on my Mac OS, e.g. removed Thumbnail images (of some image files), completely removed the folder ‘branding’ (of many of my graphics collections folders — which I am now putting them up into a TF Db that I just put together…), but true, iCloud is generally very reliable.

    I do understand where you’re coming from, especially when you’re trying to get something done when you don’t really have a lot of time to do it and it can be very frustrating.

    …. What I’ve found with Tap Forms is a very engaged developer (Brendan) who really takes great pride in his work, is very proactive, and has been extremely helpful whenever I’ve needed help, have questions, etc. Now, if only I could figure out scripting/JavaScript (but that’s on me :-)

    Good luck and I encourage you to try working with the app again in the future and remember to ask for help if you need it! Karen

    #30324
    Brendan
    Keymaster

    Hi Peter,

    This might be complicated with a Calculation field, but in Tap Forms 5.3 I’ve added a new Script field where you can write JavaScript functions to generate results. I would suggest it’s easier to do what you want if you know a bit of JavaScript to do your if/then logic to get the results that you want.

    Tap Forms 5.3 will be out next month when Mojave and iOS 12 are released.

    #30169
    Brendan
    Keymaster

    Hi Martin,

    There is an IFEQUAL(A; B; C; D) function which works like that and can be used for comparing text. It basically says “if A = B, then return C; else return D”.

    In Tap Forms 5.3 I’ve added a JavaScript engine and you can write real scripts that use proper if/then/else statements.

    #30161
    Brendan
    Keymaster

    Hi Dean,

    You would need to create a Link to Form field or a Table field that contains each track and their running times separately. Then you can have Tap Forms display the total at the bottom of the list of child records. You can also then use a Calculation field to get the total of the running times from the Running Time field in the Link to Form or Table field.

    But you can’t have Tap Forms total up values from within a Note field. Not unless you want to use the new Tap Forms 5.3 beta and write some JavaScript code to parse your Note field and extract out the data. But that seems like a lot of work.

    Thanks,

    Brendan

    #30123
    Joke W
    Participant

    Thank you for the response, looking for an alternative way to make my labels now then and would love to see a tutorial or reference file for dummies in the help section of the website on how to script such a thing.

    #30122
    Brendan
    Keymaster

    Hi Joke,

    Ya, this is a bit of an issue at the moment because the way the contacts get imported. The Table field prints just like a table with all records, even if you want just one.

    But in Tap Forms 5.3 with a little bit of scripting, you’ll be able to pull out the values from a specific entry in the Table field and format them like a label. Tap Forms 5.3 will be available when macOS Mojave and iOS 12 ship.

    Thanks,

    Brendan

    #30044
    Wynne Brown
    Participant

    Hi Brendan,
    I’m brand-new to Tap Forms, and so far, I’m very impressed — thank you for the thousands of hours you’ve put into it!

    I’m trying to create a catalog of paintings by an 1880s artist and will eventually have about 300 records. I’ve created a form using the default layout with 12 fields of various types, including Text, Date, Checkbox, Notes, and Photo.
    For the Text fields, I’m limiting the text to just a line or two.

    In some cases, I need to add a description of as many as 200 words, so I’ve chosen to use the Notes field for those. In the single-column list view, they look just fine. But if I try to print the form or save it as a PDF (I’m working a new-ish Mac laptop, running OS 10.13.5), only the first six lines show up.

    Am I doing something wrong? Should I be using a custom layout?

    My apologies if I haven’t explained this very clearly … and thank you again for creating a program that’s SO close to perfect for what I need!

    Cheers,
    Wynne

Viewing 15 results - 2,641 through 2,655 (of 2,866 total)