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,011 through 2,025 (of 2,989 total)
  • Author
    Search Results
  • #40046
    Brendan
    Keymaster

    Calling var field_1 = record.getFieldValue(field_1); will get you the value for field_1. That’s how you watch for the value of a field. You would have to list every field in your form like that in the script to watch them all.

    I understand what you’re wanting to do. But Tap Forms wouldn’t tell you which field was just edited. For every field you watch, Tap Forms would just give you its current value. Then you’d have to log that to your Table field or Link to Form field.

    #40045
    Chris Ju
    Participant

    Thanks, Brendan.

    Add a Field Script to your form that watches for the value of another field that you’re wanting to change.

    Can i watch all fields and if one was changed get the field name to pass on to the new entry in the child form?

    (I hope it’s understandable ;-)

    Thanks,
    Chris

    #40044
    Brendan
    Keymaster

    Hi Chris,

    Sure, you can do this.

    Add a Field Script to your form that watches for the value of another field that you’re wanting to change. Then call the record.addRecordToField(someRecord, field_id); function to add a record to your Table or Link to Form field.

    You’ll have to create the someRecord record first, then populate it with your values, then call the above function.

    Then call form.saveAllChanges();

    Thanks!

    Brendan

    #40041
    Chris Ju
    Participant

    Hello everybody,

    is it possible to trigger a new entry in a child form (or table) by changing any field in the parent form?

    Then it would be ideal if the old value of the changed field could be transferred to the newly created entry in the child form (or table).

    The aim is to track changes and preserve historical values.

    Thanks in advance
    Chris

    #40024
    Hans
    Participant

    Thanks for your solutions. I’m not (yet) familiar with the scripting function so I tried the tip from Wolfgang first. Made a calculationfield and that gives the right time bij subtracting the 6 hours from the original timefield. Unfortunately the calculation fieldtype only has text, numeric and date layout, so there my plan gets stuck already.
    I think I’m going to put my question in the Script-forum.

    #40013
    Brendan
    Keymaster

    Hi Wolfgang,

    There’s no function to change the label colour from a Calculation field formula.

    However you could do it from a Script field. And however again, changing the lableColour property on the field will change it for all records though.

    If you enable the Required Field option on your field, then if a value is not provided, the field label will show in red automatically.

    #39999
    Brendan
    Keymaster

    Yes, this is one way to do it.

    Another would be to write a Form Script that loops through all of the records, reading the value from the field, subtracting the 6 hours and setting the value back again on the field and then calling form.saveAllChanges();

    #39933
    Sam Moffatt
    Participant

    Apple have a long history of making platform shifts relatively effortlessly. When Apple moved from PPC to Intel, they introduced Rosetta that ran PPC apps seamlessly on the Intel hardware. It was an amazing transition for me when I migrated my PPC Mac over to a new Intel MBP. Everything just worked, it was an amazing experience. So amazing that for years I used a bunch of command line tooling that were PPC compiled and didn’t notice until I upgraded to Lion. Now not everything shifted 100% but a good chunk of what I needed worked without me even noticing. Apple implemented a similar emulation system for going from the 68k to PPC as well.

    What I see in Project Catalyst is the start of Apple’s ARM unification strategy, catalysed from the ARM side of the fence. Microsoft’s approach of throwing out a version of Windows that works on ARM without the apps that make it a compelling experience fell flat. Project Catalyst allows Apple to work through the compatibility layer of running iOS/iPadOS apps on the Mac to give themselves a head start. I suspect once they’re happy with it is when we might see ARM powered MacOS laptop devices. The WWDC reveal from there is simple:

    Here at Apple we believe in pushing the limits. That’s why in 2007 we introduced the iPhone which revolutionised the phone market by providing a touch native device that worked with your fingers and redefined what it meant for mobile web browsing. In 2010 we brought to the world the iPad, our take on human first tablet computing. We leveraged the power of the existing iOS ecosystem to kickstart the iPad and it’s only grown from there. In 2019, we released iPadOS to leverage the powerful computers that exist in our iPad line. We also released Project Catalyst to give our iOS and iPadOS developers the ability to bring their applications back to the Mac. Now in 2021, we’re proud to introduce our first MacBook Air laptop powered by an ARM chip with all of your favourite iOS apps accessible on the Mac directly via Project Catalyst. If you’re a developer in the room here today who hasn’t looked into leveraging Project Catalyst then I’d encourage you to get started today and we’ve got a wide range of sessions here at WWDC to get you up to speed on the latest features and capabilities of Project Catalyst.

    An alternative world is they ship both one of their ARM chips and an Intel chip together with the lower powered ARM chips running on the ARM side and the Intel native running on their side but with the “this app is consuming more power” notification. They’ve got enough space to put in one of their

    For an application like Tap Forms I could see leveraging Project Catalyst to bring it back to the Mac, I could almost see a Tap Forms via Project Catalyst and a Tap Forms Pro on the desktop. As someone today using an iPad Pro with a Logitech keyboard, I’d love more keyboard shortcut support in Tap Forms on iPadOS (ability to run scripts with the same keyboard shortcut as on the desktop would be great!).

    Of course all of this doesn’t solve having to rewrite a lot of code and implement form layouts on iOS/iPadOS. That’s still a mountain to climb.

    #39916
    captain
    Participant

    Thanks a lot for your quick reply and explanation! That’s what gives this software a big plus for me: the fact that there’s someone explaining the reasons behind decisions about feature implementation, way better than having some big company not seem to care at all..!

    If you’re actually going to offer subscriptions, count me in as a first customer. I’d be more than willing to pay for it, especially since I’ve been using your software for years and only paid $50+- !

    You can count on me promoting this stuff in the large computer repair communities if you ever decide to take the jump (or rather, climb Mt. Everest:-) )

    #39908
    Brendan
    Keymaster

    Hi Captain,

    Thanks for the detailed explanation of your use case for custom layouts on iOS.

    It’s a big daunting task to start working on and I guess that’s why I’ve been reluctant to start on it. It’s like being at the bottom of Mount Everest and thinking that I should climb that thing, but not knowing how it’ll be once I get to the top. With so many things about it that have to jive with the Mac version, it’s quite the herculean feat. I guess it’s a bit like jumping out of a plane (which I’ve done a bunch of times). You just have to decide to do it. But also adding a big feature like that to the iOS version also makes me think that maybe it’s time to do a subscription for that feature. That way the customers who want that would help to pay for the development of it and I could earn a bit of a recurring revenue, rather than earning revenue only from new sales as I do now.

    Just thinking out loud about that. Not making any decisions yet.

    Thanks,

    Brendan

    #39899
    captain
    Participant

    I keep checking back here every couple of months or so to see if there is any hint of some progress of adding customlayouts to the iOS version..

    Maybe a little background might help understand the need for this feature (and my begging here) :
    I run a repairshop, and have customers sign a form upon handing in their device.
    i input all their data in tapforms, and then want to hand them out the Terms&conditions for the repair, which they have to agree and sign for.

    My tapforms database is tailormade and perfect for all the day-to-day stuff such as keeping track of open-repairs, alerting me of long-lasting open quotes, parts-orders, open invoices, etcetera.
    The reason i still haven’t switched to an online-cloud based database (such as Repairshopr.com or Repairdesk.co) is that firstly, i don’t pay a subscription (even though tapforms is worth that, don’t get me wrong), and secondly, i can customize my database much more to my liking and whenever i want.

    One reason i am now strongly debating moving to repairshopr.com is their functionality that allows me to run an iOS app on iPad, that displays a neat looking second-screen with my company logo, a greeting, a scrollable display of the Terms&Conditions and an open Signature field. After signing, the customer gets a complete intake-form in their email.
    That way, i can move away from the bloody paperwork i am now forced to use.

    I imagine there are way more uses for a custom layout than just this scenario, but how cool would it be if i could display a nice clean custom-layout on the tapforms app on iPad, with all of the above, have everything sync perfectly and run a paper-less shop?

    I have tried using the iPad app to have customers sign, but it’s too much of a hassle.
    I have to have a paper-version of the Terms&Conditions next to the iPad, then wait for the iPad app to update/sync, navigate to the new record and find the signature field, wait for it to sync back over to my desktop, and then print it out, all in all; too much room for error that makes the device-handin too much of a hassle.

    A custom-layout on iOS would really help in decluttering this workflow, and i can imagine so many more uses for businesses like me. (for example, i could do a take-out-form, that customers sign when they’re picking up their device, or build a separate form that displays a price-list type of form that they can use to inform themselves, lots of other ideas).
    I don’t want to be whining, but this really is a very very very valuable feature, that i imagine would bring a lot more businessto tapforms.
    Hopefully, this post will help stress the importance of the feature, and possibly give other users an incentive to post their specific possible use-case and need for the feature as well..

    Brendan, thanks a lot so far, your work is highly appreciated here and don’t know what i’d do without you!

    #39843
    Wonnie Bad
    Participant

    Hi!

    I created a script (actually copied, pasted and adjusted one of Sam’s wonderworks) to copy records from one form to another.
    In the copied record a photo sometimes shows, other times it won’t show.
    It will show the size, and the name, just not the image itself.

    Is this a known bug, is there a workaround? I ask because I’m not entirely sure I understand all that’s being said (being Dutch, and all) also the answer to some of the search result for this topic are hidden behind the ‘become a beta member’ wall. Which I wouldn’t mind :)

    Best regards,
    Wonnie

    Attachments:
    You must be logged in to view attached files.
    #39832
    Richard Bullen
    Participant

    The “Saved Search” I created is not returning the expected results and so I’m hoping someone can point out the fault in my logic.

    Saved Search Description

    I have two fields for rating that allow values of 1 to 5

    The goal is to select records where the value of both fields is either 2 or 3.

    First Line: All Are True
    Second Line All Are True
    Third Line Value one is greater than 1
    Fourth Line Value One is less than 4
    Fifth Line All Are True
    Sixth Line Value 2 is greater than 1
    Seventh Line Value 2 is less than 4
    —————
    This returns some records with Value 2 at 4 or 5

    I’d appreciate any points as to what I’m missing.

    Thanks.

    #39825

    In reply to: Manually sync mac?

    Sam Moffatt
    Participant

    @anotheralex are you modifying records and their changes aren’t showing up or are you modifying form scripts and those changes aren’t showing up in Tap Forms? It might help to document in detail all of the steps you’re taking and where you think it’s not working.

    I create and modify records via CouchDB directly and generally haven’t had any issues with those changes not making it back to my Tap Forms instance (auto sync is on for me). I do have the annoyance that Tap Forms will often reset it’s state when those changes come in though.

    Something that occurs to me as possible is that there might be some sort of weird conflict being introduced that is being resolved by the Tap Forms app in it’s favour rather than yours.


    @laird4444
    Auto-sync is only an option for CouchDB and Cloudant sync. My understanding is that iCloud and Nearby always replicate changes as they are made. To disable for CouchDB/Cloudant, go to Tap Forms > Preferences > Sync and select either “Apache CouchDB” or “IBM Cloudant”. You should see ‘Auto-sync’ as an option just above the ‘Sign In’/’Sign Out’ button.

    #39822
    Sam Moffatt
    Participant

    If you’re doing an import flow you might want to add a field with a flag on it to control if you already did the search/replace on the record already. Depending on what your search/replace looks for, running it more than once might be problematic for you.

    Another trick you might be interested in is creating a saved search using “date created” to specify when you import the records to ensure that you only select and modify the records that were recently created. A slight change to Brendan’s script is to change:

    var records = form.getRecords();
    

    To something like:

    var records = search.getRecords();
    

    You’ll need to be in the search for the search object to exist but then it’ll only apply the script to the currently searched records.

Viewing 15 results - 2,011 through 2,025 (of 2,989 total)