Search Results for 'script'
-
Search Results
-
I want to populate a task list form (form A) from a reusable set of activities for things like preparing to travel and setting up camp with my travel trailer and tow vehicle. I created a form (form B) with task fields and created several records representing activities. I created the task list form with a date field and a table (columns names matching the field names in form B). I’ve successfully manually loaded the table in form A with the fields and filtered records from form B. I would like the table in form A to be automatically loaded with a filtered and sorted set of rows from form B when a new record is added to form A. Is this a job for a script? Is there a script example I can use to accomplish this?
Thanks in advance for any help!
I’m dealing with a rather sensitive API that times out very often for me. This API returns images and I want to add those images to my forms. To do this I’m iterating over all the records and adding them. But due to the timeouts, sometimes my images don’t get added.
To go around this issue i’d like to count the number of images in a Photo field and if it’s > 0, skip it.
So far I haven’t even been able to access the Photo field.
tt.getFieldValue(photo_id_charactersform);returns undefined.I have a workaround for this but i’d like to avoid it if possible, as it requires me to manually keep track of how many images a record field has.
Greetings,
this is an advanced question.
I have a complex database with events which I manually export in certain formats to publish them on three different websites.
As I know JavaScript, I would like to somehow retrieve my data as JSON, so I can build web views and display the data according to my needs.
My database is synced with IBM Cloudant.
I saw in the Tap Forms documentation that there is a util called postJsonToUrl but I haven’t found any further documentation.
Do I have to deal with the API of cloudant and complicated SQL requests to retrieve my data or can I use the TapForms API, create a JSON and access it from outside?
Thanks in advance,
Grischa
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;