Search Results for 'script'
-
Search Results
-
Hello all,
I am trying to migrate an existing FM database to Tap Forms. Before I purchase I am trying to ensure I can make the basics of my existing db work.
Please forgive my naïveté as I am a beginning user of Tap Forms.
I have two tables: Patients and Procedures (surgical).
A patient can have one surgery; many people can have a given surgery. Therefore, on the Procedures table (screenshot 1) I have ‘Patients’ set up as a one:many field. I have the ‘link to form’ turned on so that, in my Patients table (screenshot 2) I can see the linked information correctly.
What I am attempting to do is to get the values of some of the related fields (from the Procedures table) into the Patients table. I am using a Script field for this. As per the attached screenshot, I am first trying to get the ‘OHIP code’ (‘C111A’ in the second screenshot) into its own field on the Patients table.
I have attached a screenshot of my script where I attempt to do so. It is not working and I know the fix is likely something quite simple.
In the Script window, the field ID was obtained by double-clicking on the “Code” field in the “Procedures” table on the left-hand side of the window.
Any help to get me on my way would be much appreciated.
Thank you.
Phil
Topic: Inventory number
First of all, I know about the auto-increment function of a number field. But it’s not what I am looking for. Why? Because the field continues to count from the last position even if old records are deleted.
This means:
I need a script to fill in the gaps (freed up inventory slots) in the database when records are deleted and after that, created.
I want to use the inventory number as just it, a fixed number for a record (readable) and I don’t want gaps.Can somebody help me with it? I think it’s understandable that you need something like this for managing collections of items (i am a collector).
Thanks!
Topic: rounding decimals
Am I right in finding that 0.5 is occasionally rounded down instead of up? Is it that rounding decimal places in Javascript can go “quirky”? And can it be solved in TF calculation fields?
What would be the best approach?
Thanks for any advise.Eric
Hi,
I just made a quick utility to simplify adding records to Tap Forms from other apps.
It actually allows adding of records from any app (e.g. Shortcuts, Drafts) that can call a URL.
To use:
1) Install: Add the attached script as a form script to the form you want to be able to add records to.
2) Run the script in Tap Forms and it will display the URL you need to use in Shortcuts to add a record
3) Create a Shortcut calling that URL with the parameters matching the field names in the form (for the fields you want to set)I’ve only added support for adding text values, URLs and photos, but there is nothing to stop other field types, such as rating, being added.
Hope someone finds this useful,
Martin