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,148 total)
  • Author
    Search Results
  • #54739
    John Hamill
    Participant

    Hello,

    I am using JavaScript and I have a situation where I need to reset a particular field to null if another field in a record has “changed value” (been amended by the user).

    My understanding is that in a field level script, the script will only be executed if a getFieldValue command is included in the script – this is the trigger to execute the script. Once the script is executed, the script will then reference the *new* values that the user has entered.

    Considering this, how can I determine if a user has amended a particular field in a record. I have the information that the user has definitely changed some of the data in the record, but how can I determine if he has changed a value in a particular field?

    Thanks for any assistance.

    • This topic was modified 1 day, 4 hours ago by John Hamill.
    • This topic was modified 1 day, 4 hours ago by John Hamill.
    #54734

    In reply to: Any ideas?…..

    Brendan
    Keymaster

    Hi Michael,

    If you’re referencing a Link to Form or Table field in a Calculation, you will get COUNT() as the aggregate calculation for a non-numeric field. That’s because there could be multiple records in the Table or Link to Form field, so Tap Forms doesn’t know which record you want to get the value of. So it defaults to an aggregate function.

    If you want to get the value of a specific field and a specific record in a Table or Link to Form field then you have to use a Field Script for that. I’m not sure what you mean though that Scripts can’t seem to show a result of a cascading Pick-List. I don’t know what your script looks like, so I don’t know if what you’ve programmed is correct or not. And I’m also not sure why the Child record loop isn’t working. Did you select a field from your child form before you double-clicked on the Child record loop script?

    Thanks,

    Brendan

    #54733
    Michael Dandeo
    Participant

    I need to copy the result of a pick-list and display into a different text field.
    The pick-list is a Cascading Pick-List inside a table and I only need the primary category.
    Category 1
    Category 2
    Category 3

    Why am I trying to do this…..Having a pick-list inside a table means its not searchable and Tags doesn’t seem to work either. Also can’t display it in a column in records view.

    What doesn’t work….
    When I create a new separate calculation field to pull the column from the table it copies over as a COUNT(), which obviously doesn’t work even if its set to display as text.
    Scripts can’t seem to show a result of a cascading Pick-List but does show in Log with no errors, just blank. Child record loop doesn’t work either.

    I know what im doing can be fixed by having 3 separate text (Pick-List) fields. But since every record needs all 3 Categories, why not save space and make the form flow a little better.

    Any suggestions would be helpful. Hoped I described in a way that makes sense to someone else.

    #54715
    Brendan
    Keymaster

    Hi Pierre,

    Tap Forms Pro 1.5 will now have a built-in MCP Server. I apologize if I’ve stepped on your JavaScript implementations. I’ve had a few requests for it recently, so it seemed like a good time to work on it.

    It’s of course a work in progress and it will be great to have your feedback once it’s published.

    Thanks!

    Brendan

    #54712
    Daniel Leu
    Participant

    Yep, the API is very powerful and thankfully, Brendan has always an open ear to add some new features, as he did for my MCP implmentation!

    I didn’t look at your code, but based on your description, I did about the same thing. One thing I noted is having special prompts greatly improves results. Initially, I just had fetchRecords, but then Claude fetched all records to perform a search. So adding searchRecords with an additional field filter reduced the data Claude had to process. It’s a fun project!

    Cheers, Daniel

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

    #54706
    PierreBn
    Participant

    Hi Brendan, Daniel,

    Thank you to you both.
    I didn’t realise how rich the Tap Forms scripting API was. So I built my own MCP connector on top of it.

    It runs a local http server on the Mac, plus one form script (“MCP Bridge”) in the TapForms document. Claude and the ChatGPT Mac app (or any MCP compatible AI) can then search, read and edit records. The AI only fetches the records it needs. So no huge exports, Brendan, which was your main worry about tokens.

    It can read and write most field types, links, tables, photos and files. Every change needs my approval in the AI app. Deletes need a click in a Mac dialog, and a backup is made first.

    Daniel, your unofficial API reference was a huge help. Table columns and link types come from properties documented there. Thank you! I am sure your version is cleaner than mine

    Brendan, I also noted a few things I ran into in the API while testing. They might be overall API limitations (outside of the MCP use case). For example, clearing a date field from a script doesn’t seem to stick, and local files can’t seem to be attached with addFileFromUrlToField. The full list, with steps to reproduce, is in the docs folder (tapforms-issues.md).

    WARNING: I want to be very clear this was vibe coded (with Claude Opus 5.5) and only partially human reviewed by me (just a hobby-developper). It has been tested on a copy of my database, and I will keep testing it in daily use. But it is NOT production ready in any way. Only try it on a copy, with a backup.

    Download: file attached.
    Start with the README, then docs/setup.md.

    This works for me for now. But it would be great to have an MCP server built into Tap Forms one day (Joplin still a good example: the MCP server runs inside the app itself).
    It would make this user friendly and more accessible to (nothing extra to install or start, no need to paste the script into every document…).

    Pierre

    #54705
    Daniel Leu
    Participant

    Right now, I haven’t posted the MCP script yet. Busy with other work.

    Cheers, Daniel

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

    #54696
    PierreBn
    Participant

    Hi Brendan,

    Thanks for the detailed reply! I’m glad to hear about the additional flexibility coming in 1.5, and it’s interesting to hear what you’ve already tried with the chatbot.

    I can see the difficulty with sending thousands of records to a model. An MCP connection could let the AI retrieve only the records and fields it needs (through an MCP-driven search into tapforms), using an AI subscription many of us already have: with a compatible client, this could work within the AI subscription limits (ChatGPT Pro, Claude…), without buying separate API credits on top of ChatGPT Plus/Pro or a similar subscription. The connection between the AI desktop app and Tap Forms through an MCP would run locally on the Mac, between the desktop AI app and TapForms.

    To answer your question, I use Tap Forms for many things, including my model railway collection. I already use AI to research models from their manufacturer and catalogue number, gather their specifications, and format the results according to my database fields. Currently, I have it generate a CSV file which I then import into Tap Forms (an MCP would allow me to also upload or modify attachments directly).

    Some prompts I would find useful are for example:
    – “Research this model and prepare a new record using my existing fields and naming conventions. Check whether I already own it before adding it.”
    – “Find models with missing technical details, research those details, and show me the proposed updates with sources.”
    – “Find possible duplicate records, allowing for variations in catalogue-number formatting.”
    – “Check for inconsistent manufacturer names or railway-era notation, and propose corrections for me to review.”
    – “Summarise my collection by manufacturer and era, including purchase totals where available, omit models <100 euros.”
    – “Compare these newly announced models with my collection and tell me which ones I already have.”

    As I mentioned in my original post, the Joplin MCP integration has made this kind of interaction very useful for my notes. I’d love to have that same continuity with Tap Forms: research something in an AI conversation, consult my existing records, then save the results back after reviewing them.

    I know you’re developing Tap Forms on your own, and I appreciate the large work involved. Hopefully these examples give you a clearer picture of what I had in mind! Maybe other users have other use cases.
    In any case, I still love TapForms ;)

    Thanks again,
    Pierre

    • This reply was modified 1 week, 1 day ago by PierreBn.
    • This reply was modified 1 week, 1 day ago by PierreBn.
    #54692
    PierreBn
    Participant

    Hi,

    This was already asked in April ( https://www.tapforms.com/forums/topic/tap-forms-5-and-maybe-next-version-too-and-mcp/ ), and Brendan you didn’t have any plans for this.

    Just to check if this might have changed.
    I am in any case very interested! ;)

    My personal opinion on this:
    As AI becomes more widespread, there is a good overlap between technical users who may use a personal database software like tapforms and those that use AI more and more. It is now perfectly possible for someone to develop a simple, personal, custom database just with a few prompts (albeit of course not as good and rich in functions as tapforms – but maybe enough for some).
    Leveraging both AI and TapForms rich functions through an MCP connector would be the best of both worlds. An example of this: my note taking (with the open source Joplin) is now so much better thanks to their native MCP connector.
    It’s not about doing everything with AI, it’s about selectively using is. Being able to read, update, analyze or sort my tapforms records through an AI would be amazing with a native MCP (the script workaround isn’t really as safe and/or powerful IMHO). I respectfully think AI integration is going to be key to long term success of software suites (while also respecting those who want nothing to do with AI); particularly for data oriented software solutions like tapforms.

    Best,
    Pierre

    #54679

    In reply to: Upgrading TP5 to TPPro

    Trish Meyer
    Participant

    I tried that, but TapFormsPlus doesn’t show up as a Subscription (perhaps it’s because it’s a Lifetime purchase?)

    But I figured it out! I was Sharing Purchases with hubby, but he also had to Share his purchases too on his account. Once I did that, the “Subscribe” button went away, and the Settings have the Sync button and all is syncing!

    I found the answer on an Apple help page:

    “In order to share in-app purchases from participating apps, make sure that Share My Purchases is turned on for the account that made the purchase, as well as the account they want to share the purchase with. ”

    under Learn More at the end of this page.
    https://support.apple.com/en-us/111114

    Thanks for your patience, especially on a weekend.

    • This reply was modified 2 weeks, 1 day ago by Trish Meyer.
    #54678

    In reply to: Upgrading TP5 to TPPro

    Brendan
    Keymaster

    Yes. Go to the Manage Subscriptions screen on your Mac, then click on Tap Forms Pro on your list of subscriptions. You should see it say Family and there should be a switch that you can turn on or off to share the subscription.

    #54677

    In reply to: Upgrading TP5 to TPPro

    Trish Meyer
    Participant

    Yes, he clicked “restore purchase” a few times, but it just says that he has never purchased it before. Dialog pops up with message:
    “Your App Store account has no previous subscription to Tap Forms Pro. Ensure you are logged in with the correct App Store account or purchase a new subscription.”

    Anything else we could check?

    #54673

    In reply to: Upgrading TP5 to TPPro

    Trish Meyer
    Participant

    Thanks, that makes sense now. I’ve fixed my two Silicon Macs (I hope, using Local Documents folder as the default).

    I’ve installed Tap Forms Pro on my husbands laptop. He is on my Family Sharing (I am the “organizer”). He went to the popup that says “Purchased by Trish” and downloaded TapForms Pro from that page.

    But when he added the master database, it only shows 10 records and is asking him to pay for it.

    We’ve double checked everything on Apple App Store. TapForms Pro does not show up under his Subscriptions. I’ve waited a couple of hours to see if it was an Apple Store delay, but still on trial version.

    Is there something we’re missing? It said Lifetime included Family Sharing. Thanks.

    #54635

    In reply to: Conditional formatting

    Melanie Schaaf
    Participant

    Hey everyone,

    I also have a few questions about conditional formatting and observed some strange / annoying refreshing behaviors.

    Let’s talk about formatting rules first.

    I have tested this first with a condition based on a text field (with a pick list to be precise); Make text red if text field equals “Red”.
    This works perfectly in all three layout types (Default, Custom and Universal), the text color in the conditional field refreshes immediately when I change the value in the text field.

    When I make a condition based on a checkmark, however, (e. g. Make text red if checkmark is false), I noticed that while in Default and Universal layout, the text color refreshes immediately like with the other condition described above, when I turn the checkmark off and on, but in my *Custom* layout it doesn’t refresh. I have to either leave the record and go back to it, to see the switch in the checkmark affect the text color, or I have to press the “Recalculate formulas and scripts for all records”-button for it to change the color. Simply pressing “Recalculate formulas” will *not* trigger the format switch either, which I suppose it should, if recalculate all works, why shouldn’t recalculate this one record work?

    But apart from that I guess the formatting should update in my Custom layout right away, like it does in the other two layout types and with the other conditions… 




    Let’s move on to visibility rules.

    I have tried a condition that states: Show field when List field is equal to “Show”.
    The field will always show, no matter what the value in my List Field is, in every layout type, whether it is Default, Custom or Universal.
    I also tried a condition with a number field (Show when number field is greater than “5”), this also did not work. Neither did a checkmark with a similar condition with show.

    So I have been wondering what kind of conditions would work with the “Show” option? I have not been able to find any in any layout.
    I even tried the Hide Field in the field options (which by the way only hides the field in the Default Layout, it remains visible in Custom and Universal), thinking that maybe if the field was hidden by default, “Show” in Conditional Formatting might make it visible. This doesn’t work either.

    So next I tried the opposite: Hide field when List field is equal to “Hide”.
    This works in the Default layout, but only after I leave a record and re-enter it (both “Recalculate”-buttons won’t refresh it this time).
    It doesn’t work in the Custom layout at all, neither with “Recalculate” nor by leaving and re-entering the record.
    It works in the Universal layout immediately after I change the value.

    I tried this with a Checkbox field and the Hide action and the behavior is exactly the same.

    I also tried hiding an image field, which also showed the same results; worked immediately in the Universal Layout, kinda worked in the Default Layout, after leaving and re-entering record, recalculation does nothing, and it doesn’t work at all in Custom Layouts.

    Apart from the refresh and recalculate issues, this brings me to the question: Is the Visibility Conditional Formatting simply not available in Custom Layouts? Is it planned for future releases?

    And why is the refreshing behavior so inconsistent throughout different conditions and layouts?

    Brendan, when you are reading this, I’d be happy to send you my test database via email, though I am pretty sure the behaviors I described above are universal. At least I was able to reproduce them in my other databases…

    All this has been tested on MacOS.

    Looking forward to your feedback!

    Thanks!

    Melanie

    #54620

    In reply to: Scripting on iPad

    Brendan
    Keymaster

    Hi Karen,

    Thanks for re-subscribing to Tap Forms Pro!

    You can do all the same stuff (mostly) on the iPad scripting as you can on the Mac.

    The UI is slightly different on iOS though for writing the scripts. But the editor itself is the same.

    The API and examples are here:

    https://www.tapforms.com/help-mac/pro/en/topic/scripts

    The Mac manual’s scripting API is the same as for iOS.

    Thanks,

    Brendan

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