Search Results for 'script'
-
Search Results
-
One form in the Script editor is now indicating that when I click on the ‘Run Script’ button that
it cannot find the variable ‘result’ = “ReferenceError: Can’t find variable: result, column:7, line:17”For a new field which contains the script no value is shown in the field (ie it is blank)
With the same script in another field which was entered previously entered, that field still shows the data (although in Script editor, when clicking on the ‘Run Script’ button, I also get the same error).
This error is affecting all of the fields containing a script, but not other forms.
One of the scripts is:
var directors_id = 'fld-b97b1fadf82f42e08b2f8be84b5a0bb9'; director_name_record = record.getFieldValue(directors_id) if (director_name_record.length >0) { var first_director_name_record = director_name_record[0] var client_name_individual_upper_case_id = 'fld-7601d096dbd445aaa498645e199ecd29'; var UpperCaseName = first_director_name_record.getFieldValue(client_name_individual_upper_case_id) result = UpperCaseName } result;
Why might this be the case?
Brendan,
I would be grateful for some help in adding the right JavaScript to existing code you provided.
I have a several Forms in the same database. The two which are relevant:
A. a Form to record details of documents (Document Form)
B. a Form which lists the names of persons who will sign an individual document (Director Form)In the Document Form I have created a Link to Form from Document Form to Director Form (One to Many.)
Some documents in the Document Form will be signed and some will not. If the document is signed then I will use Linked to Form field to choose a director from the Director Form.
In the Document Form I have then created:
(a). a further field which with a script (which you provided and I adapted) to extract certain detail from the Director Form (Script Field). See below for the code.
(b). a further field (text) which states the number of directors signing (and is populated by a pick list (eg 1, 2, 3 etc)) (Directors Signing Field)
For example:
1. for one record in Document Form I may have a power of attorney which needs signing and I will add in the Linked to Form field a director (using the tick option, Select existing linked records)
2. for another record in Dcoument Form I may have an official document which does not need signing, and I will not add a director.The issue is that in the Script Field is as follows:
i. that if the document needs signing, and I will select the director and the Script Field will be populated as expected.
but
ii. that if I create a record in the Document Form where a document does not need signing, I will not add a director in the Linked to Form field, but the Script Field is still filled in (with details not necessarily related).
Is there a way (or what is the code to add to the script) which tests that if the Directors Signing Field is not populated with anything then the Script Field is blank but otherwise the result variable from the script is used?
I know how to create if fields just not with Javascript (despite the sample code you provide).
I guess what I wish to achieve:
If Directors Signing Field is empty then result
otherwise make Script Field blankExisting code in Script Field
// Get the ID of the Form - click on the Form heading to the left // Then click on "ID" button on left // And assign to variable "directors_id" var directors_id = 'fld-b97b1fadf82f42e08b2f8be84b5a0bb9'; // set list of records to variable "directors_record var new_identified_work_record = record.getFieldValue(directors_id); // var directors_record = record.getFieldValue(directors_id); // Test if there is a record if (new_identified_work_record.length >0) { //Select the first reocrd var first_new_identified_work_record = new_identified_work_record[0]; // Assign record to variable var identification_details_newly_identified_work_address_id = 'fld-cf17026d0c4a46c492195b21ad872a7e'; // var full_address_id = 'fld-9b8f0ecdd8b3422bb1bcbd4b4a9a2077'; // Assign value of reocords to a variable var address = first_new_identified_work_record.getFieldValue(identification_details_newly_identified_work_address_id); // Put value of record into a result result = address } // print out value of result into field result;
I am finding that if I type a space after a quote (double or single) causes Tap Forms to hang.
For example
var result = ‘ ‘;
after I type the first quote ‘ and then press the space bar, Tap Form hangs (spinning beachball). This happens every time.
This happens on both Macs I use.
macOS 10.14.4 – Tap Forms 5.3.5
I created a Time field (not datetime) and I want to set its value with a script.
I have tried the following:
inRecord.setFieldValue(broadcast_jst_id, "01:05");
inRecord.setFieldValue(broadcast_jst_id, new Date("01:05"));
Unfortunately after the script runs the field is blank.
The script I’m writing to populate my anime database automatically pulls the genres and sets them in a text field separated by tags (Fantasy,Magic,Drama,Comedy). I’d like to add those four tags to a Genres Pick List. I created the pick list already, but I can’t seem to find a way to add anything to them with a script.
I checked the documentation and couldn’t find any reference to interacting with picklists from the JavaScript API.
I’m aware I can open my pick list and click the “+” button to add all the contents to the pick list and it will automatically split the string based on a comma and add them in, but my database is gonna have 700 records and I don’t wanna go through each of them manually. There is also the possibility that new genres will be added over time.
Heya. Sorry for the unclear title, I will explain below.
I’ve been using TapForms for years but I just realized how powerful it is with Calculations and Scripts. So I’m working on migrating an anime database to a new format.
Here’s my situation.
– I want to keep a numerical field called “MAL ID” that stores the ID of a series in myanimelist.net.
– I want to generate a URL called “MAL URL” whose format would be “CONCAT(“https://myanimelist.net/anime/”, [MAL ID]”, where “MAL ID” is the value of the MAL ID field. This would for example create this URL: “https://myanimelist.net/anime/31240”
– I’d like to store the value of the “MAL URL” field in a field of type “Web Site” called “Web Site” so I can click on it when I’m on my phone to visit it easier.I can generate the URL based on the MAL ID field, but I cannot figure out a way to bring the value of the “MAL URL” website to make it clickable in the “Web Site” field.
To simplify my explanation, have a look at this screenshot:
The MAL ID field is the only field that the user edits manually. Tapforms then generates the link to MyAnimeList using a Calculation field in “MAL URL”. Now I want to bring the value of MAL URL into “Web Site” keeping the “Web Site” field type.
Is there any way to do this?