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 - 46 through 60 (of 3,102 total)
  • Author
    Search Results
  • #54071
    Brendan
    Keymaster

    Hi ADDdb,

    1. A Form is equivalent to a Table in common database language. Within each Form there are Fields that comprise the types of data you want to capture (think of different columns in a spreadsheet). And each Form can have as many Records as you like to store the information in the fields.

    2. Your screenshot doesn’t show the parent form, so I don’t know how you have it setup. But you can’t really display a single field or value from a Many to Many relationship. That’s because with a Many to Many relationship, there can be many fields and many rows in that relationship. Tap Forms does allow you to generate aggregate calculations for Number fields from a formula though.

    If you need more advanced access to the rows and fields in a Link to Form field setup as a Many to Many relationship, then you’ll need to use JavaScript with a Script Field or Form Script that lets you loop over the records of the relationship and pick out the data that you want to display on the parent form.

    Thanks,

    Brendan

    #54037
    Gary Treible
    Participant

    I created a “parts” database in TFP on Mac. Nominally it contains a part number, description, and an image of the part. Most of the images have been sourced by screen shoting something on the web and pasting it into the picture field. This works fine, and although I’ve made zero effort to worry about size or dimensions of these images, they seen to scale perfectly to the image area in my layout, either by matching the width or the height. Unfortunately, when I”ve created layouts in the iOS app, these images are way too large to be viewed. I can touch them, and see the whole image in the viewer, but not in the layout image box by itself. Is there a way I can get TFP for iOS to automatically scale these images like it (apparently) does on Mac? I would like to simply select a record and see the part, no matter how small it might appear, without having to touch the image to bring up the viewer.

    Thanks,

    Gary (new user)

    Steve-Kai Vyska
    Participant

    I solved a Tap Forms limitation by using a generated technical code to separate linked records by status, even though I could not apply an extra filter directly inside the relationship.

    Example:
    A Unit / Apartment should show

    active Lease Agreements
    archived Lease Agreements
    separately.

    Idea
    Each Lease Agreement gets a calculated field called something like Display Code.

    That code consists of:

    a status prefix
    plus the RecID of the linked unit
    For example:

    A.rec-123… = active agreement
    N.rec-123… = inactive / ended agreement
    Step 1: Expose the unit’s own RecID
    In the Unit form, create a script field that returns the record’s own ID:

    function UnitRecID() {
    return record.getId();
    }
    UnitRecID();
    Step 2: Read the linked unit RecID inside the lease agreement
    In the Lease Agreement form, create a script field that reads the RecID from the directly linked unit:

    function LinkedUnitRecID() {
    var unit;

    unit = record.getFieldValue(‘UNIT_FIELD_ID’);
    if (!unit || !unit.length) {
    return ”;
    }

    return unit[0].getId();
    }
    LinkedUnitRecID();
    Step 3: Build a calculated display code
    In the Lease Agreement form, create a calculated field such as:

    IFEMPTY( Lease End Date ; “A.” ; IF( Lease End Date < TODAY() ; “N.” ; “A.” ) ) + Linked Unit RecID
    Result:

    A.rec-123…
    N.rec-123…
    Step 4: Use separate linked views in the unit
    Now the Unit form can have separate linked fields / subform views for:

    active lease agreements
    archived lease agreements
    Important note
    Do not create new lease agreements through the filtered view.

    Instead, create them through a normal unfiltered subform like:

    All Lease Agreements
    That way the direct relationship to the unit is set first, and the technical fields can calculate correctly afterward.

    This approach worked well for me when I needed different “views” of the same linked records, but Tap Forms could not apply the additional filtering logic directly inside the relationship.

    Perhaps someone need this too.

    C ya

    Steve

    #54029
    Antonino Crea
    Participant

    Great software, but I’m disappointed by the forced move to a subscription model and the lack of a native version for TF5 users. We need a perpetual license option for Apple Silicon.

    #54023

    In reply to: Syncronisation issue

    Brendan
    Keymaster

    Hi Brian,

    No, Cloud+ Sync is not the same as Apple’s iCloud+ subscription service. Sorry for the naming confusion. Cloud+ Sync is just a new algorithm for syncing with iCloud. I wasn’t sure exactly what to call it as an optional, yet separate iCloud sync service.

    So it just uses your own iCloud account the same as the regular iCloud sync service. It’s just more efficient and uses less storage space than the previous version. I didn’t want to just replace the iCloud Sync service with Cloud+ in case people were happy and successfully using the existing one, so I just made it another sync service to choose from.

    Hope that clears it up.

    Thanks,

    Brendan

    #54022

    In reply to: Syncronisation issue

    Brian Quinn
    Participant

    I have just upgraded from Tap Forms 5 to Pro and am synching across 4 devices.
    I am experiencing the same problem as Tom with apparently random non-synching of bits of data.
    Before trying your advice, Brendan, can you just clarify:
    You mention deleting from iCloud and then selecting iCloud+. As I understand it, iCloud+ is a subscription version. Are you really saying we need to take out an iCloud+ subscription to try to solve the synching problem?

    #54019
    Daniel Leu
    Participant

    The field to change the script name is called Title and is underneath the different buttons. Are you referring to that?

    Or did you enable access controls?

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

    Cheers, Daniel

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

    #54017
    Steve-Kai Vyska
    Participant

    Hi everyone,

    i do not Know what I have done, but I can not change the script names anymore in one of my databases.

    I can create new Scripts, delete them and even edit it, but the field, to change the Name is not aktive anymore and so I can not change the Names (New script i.E.)

    Anyone any Idea why I have done?

    Steve

    Brendan
    Keymaster

    Hi Yutaka,

    You can control whether or not forms each have a separate split width or not on the Settings screen.

    I’ll look into the Script menu issue.

    Thanks,

    Brendan

    Yutaka Kitamura
    Participant

    When I click a link field to jump to the parent record, the split position between the record list and the record detail view, or between the form list, does not change to the position set in the destination form.

    Also, the script menu does not change to that of the target form.
    (the Form Inspector does change to the destination form)

    #53916
    Brendan
    Keymaster

    It works for me.

    Are you using curly quotes there or straight quotes in your JavaScript? They need to be straight quotes.

    #53911
    Phil Norton
    Participant

    I have a complete script to look up a reference form and return a result but if I input a value that I know is there – Brat. it gives me the error
    Intergeneric Reference: SyntaxError: Unexpected identifier ‘found’. Expected ‘)’ to end an argument list., line:1

    If If just input Brat without the “.” It gives me this:
    Intergeneric Reference: ReferenceError: Can’t find variable: Brat, line:(null)

    This is a test script that gives the same result:

    function lookupIntergeneric() {
    var refForm = document.getFormNamed(‘Intergeneric Reference’);
    return refForm ? ‘Form found’ : ‘Form not found’;
    }
    lookupIntergeneric();

    #53905

    In reply to: Global function

    Daniel Leu
    Participant

    Yes, there’s the runScriptNamed('common functions') command. This will execute the named script. If such a script only contains functions and definitions, then they will be directly accessible from you script. But if the script contains a function call, it would be executed too.

    To prevent that, I use following structure at the end of the file:

    if (!scriptName == "common functions"){
       // function call to entry point of script
       main();
    } else {
       console.log("Script " + scriptName + " loaded");
    }
    

    For a document script use document.runScriptNamed('common functions') and for a form script use document.getFormNames('script form').runScriptNamed('common functions').

    As you see, you can put scripts in a common form where you can pull them from. I do this with my scriptHandler helpers.

    Cheers, Daniel

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

    #53898

    Topic: Global function

    in forum Script Talk
    Steve-Kai Vyska
    Participant

    Hi, everyone and happy easter,

    Using piclists, you can set them to to Document, so that you can access them from every form. is there somehow a possibility to make the same with functions?

    i have several function, which I need to use in several forms. actually I copy them to each script I need it in. Is there some way to declare it onetime and use from every script?

    Greetings 🐣

    Steve

    Daniel Leu
    Participant

    I’ve moved things around. Here’s the updated link: https://lab.danielleu.com/tapformspro/tips-tricks/calling-tap-forms-pro-scripts-from-python-and-getting-results-back.html

    • This reply was modified 2 months, 3 weeks ago by Daniel Leu.

    Cheers, Daniel

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

Viewing 15 results - 46 through 60 (of 3,102 total)