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 - 1 through 15 (of 3,078 total)
  • Author
    Search Results
  • #54175
    Paul Cotton
    Participant

    I’m a recent convert to Tap Forms Pro for macos. I originally used Bento, then moved to Filemaker when they shut that down, and have spent years setting up systems for various things in that. I’ve been unhappy with Claris as a company for years now, but felt locked in with no hope of finding a workable solution to break away. TFP has provided me with a way to do just that.

    I am extremely happy with TFP, but I encountered some issues in setting things up – some feel like bugs, some are no doubt just new user error/ignorance.

    1) In layout mode, line doesn’t layer on top of other shapes, text or images

    2) cmd c + cmd v page elements screws up editing, example:
    add a few fields to layout
    add rectangle to layout
    layer list: clicking in list selects the correct elements in layout
    cmd c + cmd v to duplicate rectangle
    note that it doesn’t create a new layer for the duplicate
    selecting in the layer list is now out of sync with the elements in the layout
    going to form view removes the duplicate rectangle
    back to layout view and delete the original rectangle – an entry in layers remains
    go to form view and the duplicate rectangle is visible again

    3) after making a backup of a password protected file via file>backup, on re-opening, the show/hide forms list, display form/layout inspectors, and advanced search buttons are all disabled (can still use drop down menu for these functions)

    4) File size seems massive relative to data size. Importing relatively modest csv’s has ballooned the TPF file-size, eg I have a csv with 17,191 records, 3.7MB total, and each record is ~200 characters long. Importing that increased TFP file size by 72.5MB, even after doing a “rebuild search index”. This is an example record:

    “max 5-letter word”,””,””,””,”4 characters”,””,””,”email address”,”email address”,”max 60 character term”,”max 60 character term”,”date”,”USD”,”number”,”date”

    A different 1MB excel file increased TFP by 10MB. The filemaker database I used was 65MB, including more data than I imported. The two equivalent TFP files total ~250MB.

    5) Notes fields do strange things with their margins. When I type to the very right-side edge of the notes field, all of the text jumps to hard-left, removing the lefthand margin. I have to move my cursor close to the left-side edge of the notes field and drag left to move the text back right. Dragging cursor right near right-side edge also moves the text left.

    6) A calculation field using + for multiple number fields sums fields until it hits an empty field, then treats that sum so far as text and concatenates the sum so far with the fields after as if text. Is there any way to either have empty number fields treated as 0, or to bulk change all empty fields to 0?

    7) Sorting text fields interprets the whole number portion at the beginning of a field rather as characters eg 1word,2word,10word, rather than 1word, 10word, 2word – is there any way to stop this?

    8) In note fields set to plain text and a specific font/size, new text defaults to font family=no value, typeface=””, and size=0, rather than the font set in layout view. Also, it does still recognise and store changes of font/style made in sections of the text.

    9) I have a form with a subform. The subform has records with dates, the main form has a calculation field that shows the latest date from the subform. This works fine in macos. I used TFP on an iPad, entering data into the subform direct. On reload to mac, it didn’t update the latest date fields when viewing those records.

    10) I have a text field that uses a pick list and a script field that listens for changes to that text field. When I change the value, the script isn’t executed – it only executes when I click on the bottom-left “recalculate formulas” button. I looked at the Books Library template and the Sortable Title script field in that behaves the same way for me.

    #54172
    Brendan
    Keymaster

    Hi Steve,

    If you double-click on the record number, then that record becomes the selected record and can be referenced by using record in your script. But there’s no tracking from JavaScript of what child record is merely selected from the spreadsheet view on a Table or Link to Form field.

    What are you trying to accomplish?

    Thanks,

    Brendan

    #54171
    Steve-Kai Vyska
    Participant

    Hello everyone,
    I have a form that contains a subform. In this subform, you can select a specific row by clicking the number at the front, for example to delete it.

    Is there any way to get the ID of the selected record from the main form? Using a script or a script field would both be fine.

    Best regards,
    Steve

    #54143
    Daniel Leu
    Participant

    My script works with Tap Forms Pro. Here’s an example using my script showing just the EXIF data of an iPhone image:

    5/19/26, 11:19:12 AM / new form / First photo date
    {
        "WhiteBalance": 0,
        "PixelYDimension": 640,
        "LensMake": "Apple",
        "OffsetTimeOriginal": "-07:00",
        "MeteringMode": 3,
        "ColorSpace": 1,
        "LensModel": "iPhone 13 Pro back triple camera 5.7mm f/1.5",
        "DateTimeDigitized": "2026:05:16 20:00:32",
        "ExposureProgram": 2,
        "OffsetTimeDigitized": "-07:00",
        "ExifVersion": [
            2,
            3,
            2
        ],
        "SubsecTimeDigitized": "392",
        "ExposureBiasValue": 0,
        "ISOSpeedRatings": [
            100
        ],
        "LensSpecification": [
            1.5700000524520874,
            9,
            1.5,
            2.799999952316284
        ],
        "Flash": 16,
        "SubsecTime": "392",
        "CompositeImage": 2,
        "DigitalZoomRatio": 3,
        "SceneType": 1,
        "ApertureValue": 1.1699250021066825,
        "BrightnessValue": 2.820906607251797,
        "DateTimeOriginal": "2026:05:16 20:00:32",
        "FocalLength": 5.7,
        "ExposureMode": 0,
        "SensingMethod": 2,
        "FNumber": 1.5,
        "OffsetTime": "-07:00",
        "PixelXDimension": 480,
        "ShutterSpeedValue": 5.906515543357788,
        "FocalLenIn35mmFilm": 77,
        "SubjectArea": [
            1685,
            1265,
            747,
            735
        ],
        "SubsecTimeOriginal": "392",
        "ExposureTime": 0.016666666666666666
    }
    

    Cheers, Daniel

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

    #54140
    Daniel Leu
    Participant

    Oh, my apologies. Tap Forms 5 doesn’t expose the photo metadata, so this script won’t be able to help you. Unfortunately, I don’t have a solution for you either.

    Cheers, Daniel

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

    #54138
    FrAnksch
    Participant

    Thank you so much for your help, Daniel!

    I copied your script into a script-field “EXIF-date” and used the fields “photo” as source and “date” as target.

    Unfortunately I get the following error:

    EXIFdate: TypeError: photos[0].getExifData is not a function. (In ‘photos[0].getExifData(photos[0])’, ‘photos[0].getExifData’ is undefined), line:(null)

    My photo has definitely EXIF data.

    Am I doing something wrong or is there anything with the code?

    btw: I´m on TF5 on iOS 26.5 and macOS Tahoe 26.2 (if this is relevant)

    Thank you!

    • This reply was modified 6 days, 5 hours ago by FrAnksch.
    #54134

    In reply to: Greetings from France,

    Luc VIENNE
    Participant

    Hello Bredan,

    No, I don’t want to stay on a particular version of macOS because of one piece of software. No, I don’t want to pay such an expensive subscription.

    yes, I understand that you spent a year developing the PRO version; no, I don’t understand why you can’t disable the PRO features to make a lighter version, or else there’s a catch (as we say in France) and the PRO version is just the original version rewritten, which certainly required a lot of work.

    So unfortunately, I see that you’re not open to other suggestions, so I’m going to leave you for other, less expensive applications.

    I hope you succeed, but I have my doubts… Thank you for replying and reading. Cheers. Luc

    #54132
    Steve-Kai Vyska
    Participant

    Thanks for the suggestion.

    I tested this with a script that writes values into the related subform records.

    The script fills/updates the subform records without calling refreshCalculations() on those child records. After calling saveAllChangesAndRefresh(), the new values are visible in the subform, and the calculation fields inside the subform records are updated correctly.

    So this part works as expected.

    The remaining issue is the parent record.

    The parent record has a calculation field that depends on the calculation results from the related subform records. These subform calculation values are already correct and visible, but the parent calculation field still does not update.

    I also tried the recommended call on the parent record:

    
    function Test() {
        record.refreshCalculations();
    }
    
    Test();

    Unfortunately, this does not change the parent calculation either.

    So the subform records and their own calculations are refreshed correctly. The problem is that the parent record does not seem to recalculate based on the updated subform calculation values, even after calling refreshCalculations() on the parent record.

    Have a nice Sunday

    Steve

    #54131
    Daniel Leu
    Participant

    Following field script should do the trick. It assumes that the field name is photo. Don’t forget to set the return type of the field script to date.

    
    function First_Photo_Date() {
        // set field name according to your form
        var photo_id = form.getFieldNamed('photo').getId();
    
        // get attached photos
        const photos = record.getFieldValue(photo_id);
    
        // get first photo's date
        const photoExif = photos[0].getExifData(photos[0]);
        const photoDate = photoExif['DateTimeOriginal'];
    
        // handle Exif date format
        const [datePart, timePart] = photoDate.split(" ");
        const [year, month, day] = datePart.split(":").map(Number);
        const [hour, minute, second] = timePart.split(":").map(Number);
    
        // create date object
        const date = new Date(year, month - 1, day, hour, minute, second);
        
        return date;
    }
    
    First_Photo_Date();
    

    Cheers, Daniel

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

    #54130
    Daniel Leu
    Participant

    Yeah, I got used to this behavior. If you create or update the child record from a script, run childRecord.refreshCalculations() once you have populated it with your values.

    Cheers, Daniel

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

    #54123
    Luc VIENNE
    Participant

    Dear Bredan,

    I know you’ve already answered this question, but I’d like to reiterate.

    I’ve been using your fantastic TapForms 5 for years to manage the software I use and those I’ve tried that didn’t suit me. I have about 300 records: not a huge number, but incredibly useful for me, as my memory is failing me a bit and I sometimes forget what a particular program does. I’m retired and don’t have a lot of money; so I don’t like subscriptions, but I’m willing to pay for an upgrade to an Apple Silicon version while keeping the same features.

    I haven’t seen what the PRO version would offer me, and I don’t want to (can’t) pay that much. Yes, it’s great for businesses, but for an individual, it’s a different story.

    I would like you to reconsider your position and offer us a “light” version of your PRO (with the current features) so we don’t have to completely rewrite the standard version.

    As you can see, I’m spending time writing to you and making suggestions; if I can help, I have some time, but not much money, and I think many of us are in the same boat. Perhaps you could conduct a survey, since you have all our email addresses.

    I’m sure you’ll appreciate this request;
    so, it would be fantastic if you could respond favorably.

    Thank you in advance. See you soon. Luc

    #54120
    FrAnksch
    Participant

    Can anybody give me a script that reads the EXIF date of a photo (used in field “photo”) and puts this date to an separate field “date”?

    I want the entries to be ordered by the date of the photos, that are used in the records.

    THABK YOU!

    #54108

    In reply to: User-Agent header

    David Schwane
    Participant

    Thank you so much. Fortunately I am using Pro. My dumb AI scripting buddy was using the 5.3 API reference. It is working now.

    #54103
    Daniel Leu
    Participant

    Hi Andrew,

    1) You really just need the ‘fld-xxxxx’ section from the code Tap Forms Pro inserted. You could rename the variables to make it more readable, but that’s not necessary.

    2) When you create a new field script, I would remove the default code. But javascript supports the structure you wrote (as far as I can tell).

    Here’s the code with your field ids:

    // From a linked form, fetches all values for a given field. 
    function getLinkedFieldValue(link_id, link_num, linked_field_id){
         const linkedRecs = record.getFieldValue(link_id)
    
         if (linkedRecs) {
            linkedValue = linkedRecs[link_num].getFieldValue(linked_field_id)
            if (linkedValue){
                return linkedValue;
            }
        }   
    }
    
    function main() {
        const childForm_id = 'fld-42f52b4ec1ca4514ac86af90d8d6e718';
    
        const child__name_id = 'fld-9d0490166c594a34bc8e8f9967510f4f';
        const childNum = 0; // first child selected
    
        const childName = getLinkedFieldValue(childForm_id, childNum, child__name_id);
        if (childName){
            return childName;
        }
    }
    
    main();
    

    Cheers, Daniel

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

    #54101

    Topic: User-Agent header

    in forum Script Talk
    David Schwane
    Participant

    Hi,

    I’m trying to connect to the Discogs API, and my AI scripting buddy tells me “The failure likely occurred because the Discogs API strictly requires a User-Agent header, which Tap Forms Pro cannot currently send through its built-in Utils methods”.

    Any suggestions to help on this?

    reference: https://www.discogs.com/developers
    Your application must provide a User-Agent string that identifies itself – preferably something that follows RFC 1945.

Viewing 15 results - 1 through 15 (of 3,078 total)