Thanks Brendan
That video was very helpful in getting me this far. I’ve been using about a dozen Siri-driven shortcuts that Form Scripts which add new records to self-monitoring TF database – with values that are specific to the Script I evoke (through Siri). All good.
Hoping to turn each of them into IOS Shortcut buttons at some later time – Siri doesn’t work well in all scenarios, per background noise and social setting :)
thanks as always
Brex
Hi Brex,
Did you watch the video in the link I posted above? That basically shows how the Siri intents works. It works only with Form Scripts and not Field scripts.
I’m not sure about that error. This is the only thing I’ve found referencing that error:
https://talk.automators.fm/t/problem-running-from-shortcuts/2154/5
I’m not sure what I need to do yet to allow Tap Forms scripts to run from within the Shortcuts app. I’m sure there’s a bunch of work I have to do.
I’ll have to work on that.
Hi Brendan
I’ve made some handy voice-activated Siri Shortcuts that allow me to log things/create new records in TF. My use case doesn’t require input or a selection, I have several different scripts that add specific things, without interaction being necessary.
Not sure how to wrap each of these as a new IOS Shortcut button (which is even more convenient and accurate than Siri). IOS even “suggests” my Tapforms scripts, when I go to try to write a Shortcut, but it fails and can’t find explanation for error message on the web. “IntentsErrorDomain error 1307”
More work on your side required to enable TF scripts to work with the new Shortcuts (just as Siri-enabling was required)? Or am I doing something wrong?
thanks
Brex
Does anyone know how Tapforms (Ipad) can be loaded into Tapforms please. I’ve managed to get it as far as showing in Imports.
It’s an old format that was used (typically) for Windows Cardfile software. Or even a utility to convert my AZZ file into a CSV file?
Failing that – I’m currently designing a Tapforms database that holds the modules and descriptions of an online EE course I’m doing. I would like to have a link from the Tapforms record to open up this AZZ files as it’s a database of Electronic Symbols used in EE along with descriptions.
Don’t suppose anyone already has a template to save me reinventing the wheel?
Thanks
Dennis
Leave the Planet (tlalticpac) in a better shape than when you first found it
I’m Undead, I’m not Unreasonable (Dracula)
Thank you for that.
I’ve done some more investigation and the problem is when I change the field value using a pick list.
When I pick an item the script does not run, but if I type the value in it does run (this is an iOS issue only).
Shall I email you my form so you can see the issue? (It isn’t a parent firm, it is just a single form with an embedded table field)
Thanks for your help,
Martin
Hi Martin,
It’s possible I’m not calling the code to run calculations and scripts when you save a value on a Table field.
If you’d like to email me your parent form template I could do some experiments on your form to make sure I get it right for your situation.
Thanks,
Brendan
Hi,
I have a field script dependent on a table field’s field.
On the Mac the field script runs when a new row is added or the field is modified.
However on iOS the field script only runs when a new Table field row is added.
Is this the expected behavior?
Thanks
Martin
Hi Andy,
From your line var rating_id = 'fld-0f294ce98c3043e0a9873bfe1933276e;; I see that you had 2 semi-colons but no closing single-quote. That would not work.
It would have to be like var rating_id = 'fld-0f294ce98c3043e0a9873bfe1933276e';
No, a * wouldn’t work. But you could write a script to count the asterisk characters and convert that into an integer. But it would get more difficult with your “1/2” values, etc. You’d have to do some string parsing in that case.
There’s no undo. So make a backup first.
Hi again
When using the format from the web site it worked perfectly so thanks.
One other query, in one of my databases, to get round Bento’s 5 star rating issue, I used a simple text field for rating and input what I needed as stars and 1/2 if I wanted. So if something was 3.5 stars I would enter ***1/2. Would the script work on that and if it did, could I then change it to a proper ratings field? I’m guessing it won’t because a * is not an integer in this context.
Also, is there an undo for this script or would I need to recover from backup if it went wrong. I have about 420 records in this database so could enter them in a new field manually if necessary but if the script would work, that would be great.
Many thanks
In the script editor I selected the rating field and copied the ID into your script like this:
var rating_id = 'fld-0f294ce98c3043e0a9873bfe1933276e;;
var records = form.getRecords();
for (var index = 0, count = records.length; index < count; index++){
var aRecord = records[index];
var rating = aRecord.getFieldValue(rating_id);
aRecord.setFieldValue(rating_id, rating * 2);
}
form.saveAllChanges();
I didn’t see anything happen at all. Looking at it now, I left off the single quotes, have some extra characters at the beginning and an extra semicolon at the end. All these things appear in the email version of the script but not here on the website. I guess Mail has garbled it a bit. I have some other databases to do so will try it on them :)
Many thanks
Andy
Did you use your own ID value for the rating_id field? Or did you just copy and paste and try to run the script?
Did you get any error messages in the console log?
I’m glad the other way worked for you at least.
Thanks,
Brendan
Great, thanks Brendan. I couldn’t get the script to work – it didn’t seem to do anything but I was probably doing it wrong. However, the find and replace worked a treat so thanks for that :)
By the way, to write the above script I only had to mostly just double-click on the various snippets in the Snippets list. The only thing I had to do was change the default variable name in the snippets. And this line of code I typed in: var aRecord = records[index];
Hi Andy,
You could definitely write a Form Script to do this. Or you could also use the Advanced Find & Replace function to do this. I’d make a backup of your document first whatever you do though.
With the Find & Replace method you could start with searching the Rating field for 5, then set the value to 10. Then search for 4 and set the value to 8, then search for 3 and set it to 6, then 2 setting it to 4, then 1 setting it to 2.
You have to do it in reverse as described above because if you go the other way, you’ll end up changing values you already changed.
Or here’s a Form Script you can use for it:
var rating_id = 'fld-3baff54c8e164de9b9ad3f0fbb040bc6';
var records = form.getRecords();
for (var index = 0, count = records.length; index < count; index++){
var aRecord = records[index];
var rating = aRecord.getFieldValue(rating_id);
aRecord.setFieldValue(rating_id, rating * 2);
}
form.saveAllChanges();
You need to use your own rating field ID though (e.g. ‘fld-…..’). The above is specifically for my test form.
But make sure you run it only 1 time otherwise you’ll double the rating values again.
Hello
My databases were imported from Bento. I have a rating field in most of my forms which are all 0-5 stars, because that is what Bento provided. I would like to make them 0-10 stars which I can do in Tap Forms but this means changing all the existing values: I have thousands of records.
Is there a way to automatically double the ratings value in all records please? I have looked at scripts and at this forum but can’t find anything obvious that would do it. The closest I could manage was to make a new calculation field that takes the existing rating and doubles it. However, this does not allow me to enter data directly so it would not enable me to have a rating of say 7 because I can’t enter 3.5 in the original.
Many thanks
Andy