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 - 421 through 435 (of 2,950 total)
  • Author
    Search Results
  • #50130

    Topic: Attach PDF

    Glen Forister
    Participant

    I see how to attach a picture, but can I attach a PDF anywhere?  I don’t see any mention in the descriptions of the fields.

    Is the solution to convert PDFs to pictures?

    #50117

    In reply to: testing scripts

    Glen Forister
    Participant

    I finally had the time to do the

    Copy Form to a new Form in the same document.
    I then made my changes in the copied Form and added 2 fields to hold the Java Scripts.

    I then Exported my revised data in the original Form into a CSV file.
    I also had to rename a couple fields when I imported into a spreadsheet.
    I also had to the data in one field.

    I then imported the altered CSV file into the new copied Form with the desired changes.
    Unfortunately, the changes didn’t happen and the added records didn’t get imported.

    Basically nothing happened and the new Form didn’t get updated.

    What is the correct process if it isn’t the one detailed above in the previous posting.

    #50116
    Glen Forister
    Participant

    You define “Note” field = large amounts of text. .

    You define “Text” field = movie title or short description.

    I imported from another DB as CSV file and notice that some records in the “Text” field contain a fair amount of text, much more than “movie title or short description”.

    I wonder how many characters a Text field can contain before it doesn’t work anymore.   So, should I convert many of my Text fields to Note fields because they have much more than “short description”?

    The downside of using the Note field a lot where a Text field would suffice would increase the size of the database considerably I would assume.  So, the question about how many characters is a valid question and an important one.  Other databases do define this information in character numbers allowed before it is chopped off.

    #50104

    In reply to: Javascript Help

    Daniel Leu
    Participant

    In my case, the checkbox field is called ‘selected’. You just need to assign the field id of field Added_to_VR-Mailing on line 3 of the code below.

    // This script selects all records
    
    function selectAll(){
    const selected_id = 'fld-xxxx';
    var records = form.getRecords();
    
    for (var index = 0, count = records.length; index < count; index++){
    var myRec = records[index];
    myRec.setFieldValue(selected_id, true);
    }
    
    document.saveAllChanges();
    }
    
    selectAll();

    The code loops over all records and sets the checkbox value to true.

    • This reply was modified 2 years ago by Daniel Leu.
    • This reply was modified 2 years ago by Daniel Leu.
    • This reply was modified 2 years ago by Daniel Leu.

    Cheers, Daniel

    ---
    See https://lab.danielleu.com/tapformspro/ for scripts and tips&tricks

    #50103

    Topic: Javascript Help

    in forum Script Talk
    Peter Chamalian
    Participant

    I have a form with a simple checkbox.  I want to start by checking that box for all my records.  Not being a Javascript coder, I need some help.

    The field name to check is Added_to_VR-Mailing.

     

    Thanks!!

    #50088
    Brendan
    Keymaster

    Hi David,

    I was just playing around with writing a script for you, but then realized that it wouldn’t work. When you add a photo to a record in Tap Forms, the data is stored in two places for the photo. The record holds a dictionary with the photo field’s metadata, including the filename. But also, the record’s internal representation in the CouchbaseLite database holds a reference to that photo too. It uses the filename to hold that reference. So if you rename the value in the photo field’s metadata for the specified photo, it will no longer match the photo referenced in the record’s internal representation of attachment data in the CouchbaseLite database.

    In my testing when I renamed the photo from JavaScript, it was not able to also rename the record’s attachments data, so it effectively removed the photo from display.

    So at the moment, there’s no function to rename a photo from JavaScript.

    Thanks,

    Brendan

    #50086
    David Schwane
    Participant

    Photos are uploaded with various file names.

    Later, photos are downloaded using the built-in “Save Photo to Drive”

    Request is when photos are saved to drive, that they have the filename as one of the fields

    so instead of R-3220837-1321636325.jpg, it would be Fieldcatalogno.jpg

     

    would prefer to run script as a batch since I’m using built-in upload download functions, and once corrected, some sort of script that corrects future uploads.

    #50085

    In reply to: Open record as result

    Brendan
    Keymaster

    Hi Glen,

    Which part of the above maze do you mean when you say this? Searching records? You don’t need scripting to search records.

    #50082

    In reply to: New Tap Forms?

    andy bush
    Participant
    1. Oh nothing specific. JavaScript seems to allow for some neat data manipulation and I was wondering if there were plans to implement those abilities using menu systems instead of code. Really though I’m just excited to see what the new iteration of Tap Forms has to offer. It’s been so useful with my day to day goals and tasks. I haven’t found a program at this price point that comes close to what Tap Forms can do.
    #50080

    In reply to: Open record as result

    Glen Forister
    Participant

    I’ve always wanted this in a database, and I did have it in HanDBase in it’s early years, but it got lost for some reason in its later years and I severely miss it and asked about it soon after I joined.

    Is this a function that can be attempted without Script knowledge to make all the connections.  I can do that for simple scripts, but I wonder about the maze above.

    Hopefully.

    #50071

    In reply to: New Tap Forms?

    Brendan
    Keymaster

    Hi Andy,

    I am working on a new version of Tap Forms, but what is it you’re having troubles with in the current JavaScript editor? I’m not sure what you mean by “integrates a lot of the functionality that comes from knowing JavaScript”. That’s the loaded part of your question.

    Thanks,

    Brendan

    #50069
    andy bush
    Participant

    I love Tap Forms. It’s even inspired me to attempt Javascript but…uh… it’s not going well. Will there be a Tap Forms 6 that integrates a lot of the functionality that comes from knowing Javascript? I’ll keep plucking away at this language but hoo boy am I bad at programming. Watching the tutorials gives me a new empathy for my parents when I’m trying to show them how to open an email attachment.

    #50065
    Victor Warner
    Participant

    Thank you, Brendan,

    I did not realise the complexity involved.

    Why use a script rather than the Import Records function? I am transferring a series of records from FileMaker to TapForms (each with 4 to 7 forms). But I have to transfer them one record at a time.  The Import Records function involves a series of key presses or uses of the mouse (x 4 to 7 forms). Although automating these with Keyboard Maestro is possible, it still takes some time (as KM just automates what is done manually).

    Using a script essentially automates the process – and is far quicker.

    The date issue is resolved by searching and replacing the date in the CSV file with a regular expression before running the script.

    #50057
    Seth Godin
    Participant

    It took me a lot of tries to figure out this easy hack, so I thought I’d save others the trouble.

    If you’re going to print out forms, it tempting to drag fields into place on a blank canvas and then format each field and hit print.

    The problems arise if you have content where the text is of unknown length. You don’t know how much space to leave, and it ends up being holey.

    The alternative is to simply type the name of each field in brackets, like this:

    [name]

    [description]

    [price]

    Which will cause the fields to stay stacked, regardless of how much data is in each one, flowing longer ones and filling space for the shorter ones.

    And you can format it, not just with fonts and sizes.

    Go to TextEdit, build into every Mac

    Make a new doc

    Don’t miss this step: under FORMAT, hit MAKE RICH TEXT

    (this cost me two hours of poking around)

    now, go ahead and put your bracketed fields in, and you can change the layout all you like.

    Then, copy what you’ve got, and paste it back into your form.

    Done.

    Hope this helps.

    • This topic was modified 2 years ago by Seth Godin.
    #50041
    Victor Warner
    Participant

    Some time ago, I got help with how to import the data from a CSV file with a script (see the post at https://www.tapforms.com/forums/topic/using-javascript-to-import-csv-files/#post-45422).

    One of the fields in the CSV contains a date in the form “01/01/1963”, and the aim is to import it into a date field in the form.

    Although the script runs fine and imports the data in the CSV, the date field is not imported.

    Because of the way the script was written, I do not know how to change the format of the date field so that the date field is correctly formatted for import.

    Help would be very gratefully received.

     

Viewing 15 results - 421 through 435 (of 2,950 total)