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 - 31 through 45 (of 2,864 total)
  • Author
    Search Results
  • #52190
    Simon Spiers
    Participant

    Another question. In TF5 the ‘Session surgeon’ and ‘Session hospital’ weren’t text fields but links from separate forms. The script was able to extract the values and populate fields in the present form. In TFP the ‘linked to’ fields don’t appear in the scripting window and it doesn’t appear on the face of it to be possible to get the values. Or is it?

    Attachments:
    You must be logged in to view attached files.
    #52186
    Helmut Janetzko
    Participant

    Hi,

    I have now tested TFP extensively, and I’m wondering: what has actually changed?

    First, I migrated my 4 GB TF5 database to TFP on my Mac. Everything worked perfectly.
    Then I synchronized using iCloud with my iPad and iPhone … that also worked flawlessly.

    So now I have my database in TFP, and everything looks exactly the same as before.
    What has actually changed? Forms, fields, layouts, scripts – editing – everything is just like it was before.

    The layout is a bit nicer, but the handling of the whole program and the programming itself … nothing has changed at all.
    And the new templates for forms? Nobody needs them. You can create much better ones yourself.
    Even script editing is exactly like it was in TF5. No modernization visible.
    Old wine in new bottles. I’m honestly a bit disappointed!

    So, where is the added value of the Pro version?

    So far, I don’t see any … I’m still in the two-week trial phase, and as it stands, I’ll probably stick with TP5.

    #52182
    John Martin
    Participant

    To close off this topic, I emailed Brendan and he sent me the link to purchase the MacOS + iOS discounted annual subscription directly from iOS. The link worked smoothly and I’m now running Tap Forms Pro on my Mac and iPhone. I’ve migrated my databases from Tap Forms 5 without problem and am exploring the new features of Tap Forms Pro.

    Thanks to Brendan for the great customer support!

    Harry
    Participant

    I believe there is a bug in Tap Forms Pro on iPad (Mac is fine) when you run a script from the script editing screen that returns a date. This causes Tap Form Pro to crash hard back to the Home Screen. It does, however, return the correct date to the form itself. But you can’t see the Results or Console Log so you can’t debug a script on iPad. Here’s how I came to this conclusion:

    On my Mac, I am working on a script field in an existing form to consolidate a bunch of calculation fields with complex date calculations. The script returns a date, so the Result Type is set to Date. The script runs fine on my Mac. After syncing, when I opened the script on my iPad and ran it from the script editing screen, Tap Forms Pro crashed hard back to the Home Screen. It did return the correct date to the form itself.

    To see if it was a problem with my script or a problem on my iPad, on Tap Forms Pro on my Mac, I created a new form in an existing document. The form has two fields: a date field called Date and a script field called Script. The script returns a date, so I set the Result Type to Date. Here’s the script:

    function Script() {
    
        var date = record.getFieldValue('fld-30474b3e3b4740109e54e1912e6e59f2');
        return date;
    
    }
    
    Script();

    It runs fine on my Mac. On my iPad, the new form synced from my Mac. When I opened the script on my iPad and ran it from the script editing screen, it crashed hard, just like the script I’m working on.

    To see if the sync from my Mac to iPad was the problem, I created a new form on my iPad with the same two fields and script as above. It also crashed hard when ran from the script editing screen.

    To see if it was a problem with using a date, in the same form I created a text field called Text and a new script field called Textscript. Here’s the script:

    function Textscript() {
    
    	var text = record.getFieldValue('fld-51dd29f120b44101b99cf90f6ab01860');
        return text;
    
    }
    
    Textscript();

    This script runs fine on my iPad from the script editing screen. So my conclusion is that there is a bug in Tap Forms Pro on the iPad with script fields that return a date when run from the script editing screen. However, the correct value is returned to the form.

    • This topic was modified 1 month, 2 weeks ago by Harry.
    #52172
    Shane
    Participant

    Sorry, I figured it out (brain not working first thing in the morning before coffee). For anyone else reading you can use the javascript setFieldValue() method to insert markdown formatted text into a markdown field:

    function Script1() {
    
    // 1. get markdown field id and store it in a variable
    var markdown_id = 'fld-386387870d374f9dbbd550b3393c2692';
    
    // 2. create the output text with some markdown formatting and store it in a var
    var theMessage = "lalalal **this is bold**";
    
    // 3. output to markdown field
    record.setFieldValue(markdown_id,theMessage);
    
    }
    
    Script1();
    • This reply was modified 1 month, 2 weeks ago by Shane.
    • This reply was modified 1 month, 2 weeks ago by Shane.
    • This reply was modified 1 month, 2 weeks ago by Shane.
    • This reply was modified 1 month, 2 weeks ago by Shane.
    Attachments:
    You must be logged in to view attached files.
    #52171
    Shane
    Participant

    Thanks for the info Daniel. How do you combine javascript with markdown? As far as I know they’re two separate fields.

    Thanks again.

    #52168
    Simon Spiers
    Participant

    Hi Brendan,

    I really like the new Tap Forms Pro — Thank You!

    I migrated from Tap Forms 5 and one of the scripts no longer works. It gets the values from a linked form and populates fields in the current form.

    How can I make it work again?

    Thanks in advance

    Attachments:
    You must be logged in to view attached files.
    #52161
    Shane
    Participant

    I guess worst case scenario is I can just pull the records and filter them via javascript.

    #52160
    John Martin
    Participant

    The error message continues after the update to Tap Forms Pro, so I will email you for the link to purchase a subscription from iOS.

    In addition to the things I mentioned previously, I’ve tried logging out and back in to the Mac App Store as well as trying the purchase while booted in Safe Mode, with neither having any impact. I note that my iCloud account and my media purchases (iTunes) account are different; perhaps that is causing the problem.

    Thanks for your initial response.

    #52155
    Daniel Leu
    Participant

    I have one DB/Form as well where I keep track on different cars. I use one field to identify the car and use separate saved searches to filter for each car. This makes it easy to update since there’s only one form.

    I’d recommend to combine your car forms. There was a thread about this recently, just ignore photos, unless you have some in your form as well: https://www.tapforms.com/forums/topic/combining-forms-with-photos/

    If you’re combining the forms, I would first create a column _Car_ in each form and fill it for all records. You can do this with a script or just as easy in multi-column list view. Enter the value for the first row and the drag the yellow dot down to the end. For the _Car_ field, I defined a Picklist. Now it’s very easy to select for which car I’d like to enter a value.

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

    #52152
    PierreBn
    Participant

    Hi, me again,
    I think this might be a bug?

    I’ve got 2 fields visible in “Single Column List View fields”: description & address (it’s a model train collection 😇)
    In the single column view , the image is always first, but description and address inconsistently appear first (in bold) or second. Screenshot showing the 2 cases + field order on the right).
    What’s weird, if I change Single Column List View fields from 2 to 1, and then back to 2: all is fixed…but situation returns if I change view or form.

    Thanks,
    Pierre

    Attachments:
    You must be logged in to view attached files.
    Kurtois
    Participant

    Minimizing Tapforms Client Data Storage Requirements/

    Above, I include a link to my discussion on this topic for Tap Forms v5. I am still troubled on how best to minimize the storage requirements for a Tap Forms Document, sadly.

    Note, I did opt for iCloud Sync with the Document I am working on for my project. I plan to utilize a variety of PDF, JPG, and PNG file types for a given field of type ‘Photos’.

    1.
    In order to get up and running quickly, I am likely going to use a ‘Photos’ field type in my Document. It sounds like I can relocate the Tap Forms Document file to an external drive saving space on my local system drive, however, will that not break the iCloud Sync?

    2.
    There was discussion in the post I link to above about placing “photo” files on a host like Amazon’s S3. Quite honestly, I have only dealt with linking to hosted files on FTP servers. I have no idea how to work with Amazon’s S3. (Could we get a tutorial on that or a link to a good one, please?)

    Anyway, I would prefer to move a solution where “photo” files are hosted on a low-cost file host. However, my concern is viewing the photos. If a URL is provided for a field in Tap Forms, I understand a globe is displayed where a user can click to display the image in a pop-up window. I noted a script referenced in another post/
    by @pasamiogmail-com that maybe provides a solution like I am after. However, I am not sure I grasp what this looks like when implemented.

    Harry
    Participant

    Thanks so much. Exactly what I was looking for. Now to translate all my algorithms using JavaScript functions.

    Daniel Leu
    Participant

    You have to use the Javascript equivalent. There’s a bunch of functions available: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date.

    dateadd() is not a Javascript function and can’t be used. If you continue to go through the thread you found, you’ll see how to add an hour to your current date/time. Here’s the link to the thread for everyone else following: https://www.tapforms.com/forums/topic/how-to-use-dateadd-in-a-script/#post-40449

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

    Harry
    Participant

    I have a form in Tap Forms Pro that calculates subscription renewal dates to keep track of all my subscriptions. It uses several calculation fields that use Date and Time functions to determine the renewal date. I would like to create a script to consolidate all the calculations into one script field.

    Using a post here from May 2, 2020, “how to use dateadd in a script”, I tried this as a test, but got an error that said Test: ReferenceError: Can’t find variable: dateadd, line:(null).

    function Test() {
    
        var start_date = record.getFieldValue('fld-037157d2f1fa4a75959f3a6c0128a8c1');
        var renew_date = dateadd(start_date,1,0,0,0,0,0,0);
        return renew_date;
    
    }
    
    Test();

    Is it possible to use the these functions from calculation fields such as TODAY, NOW, DATEADD, YEARS, MONTHS, and DAYS in a script?

    Thanks,
    Harry

Viewing 15 results - 31 through 45 (of 2,864 total)