Search Results for 'script'
-
Search Results
-
I would like to create a CSV file through a form script, as it will be much quicker/more automated than going through the File/Export/Export option.
I have been able to create a script which uses Utils.copyTextToClipboard() to get the data out (and then using the clipboard to insert it into an AppleScript). It appears to work, but was wondering whether it is also possible to write the data to a file rather than the clipboard?
The script as far as I have got with it:
var client_name = record.getFieldValue('fld-ffa7651ff5bd48a9aa8184a69be8550e'); var email = record.getFieldValue('fld-152d99920304499f8f89c3868eb144d1'); var details = record.getFieldValue('fld-23c8168c1deb45bfbcabc862ad6e5199'); var date_prescribed_information_provided = record.getFieldValue('fld-0bf58a5d40b3430f8745b86b2a49775a'); var document_details = record.getFieldValue('fld-b8a4b0731dc94f46abf28eab828abc4e'); var number_of_documents = record.getFieldValue('fld-7ba7df82977945988aac2598dc528a75'); var amount_of_notary_charge = record.getFieldValue('fld-648fee2d0eaa4e7d973fe86bde1d504f'); var what_will_third_parties_be_providing = record.getFieldValue('fld-abfb6ffd2c7c4695972ed54ec463fc08'); var third_party_charge_plus_charge_to_arrange = record.getFieldValue('fld-8cc4031614d7402aa5e131d33ae1c039'); var final_charge = record.getFieldValue('fld-6b86691517dc4b8b8efa63b7da98185d'); var second_individual_client_name = record.getFieldValue('fld-772ee93b5eb747d294e5a9a7b548ebda'); var second_individual_email = record.getFieldValue('fld-d09998df75864a0e8f82b6f61188b537'); // set email for prescribed information document if (second_individual_client_name){ var email_for_prescribed_information = email + " and " + second_individual_email; } else { var email_for_prescribed_information = email; } var date_formatted = date_prescribed_information_provided.toLocaleDateString("en-GB", { year: 'numeric', month: 'long', day: 'numeric' }); var lines = client_name + ";" + email_for_prescribed_information + ";" + details + ";" + date_formatted + ";" + document_details + ";" + number_of_documents + ";" + amount_of_notary_charge + ";" + what_will_third_parties_be_providing + ";" + third_party_charge_plus_charge_to_arrange + ";" + final_charge + ";" + second_individual_client_name + ";" + second_individual_email; // Utils.copyTextToClipboard(JSON.stringify(record.first_name_id)); Utils.copyTextToClipboard(lines);Topic: Help with if statement
I wish to create a script to deal with the following where the document contains two email fields:
1. if only one email field (“email”) has an email address the script assigns to a variable just that email fields contact; but
2. 2. if both email fields (“email” and “econd_individual_email”) have email addresses then the script assigns to a variable the following: “email_field_1 = ” and ” + email_field_2″
using an if statement testing whether another field (second_individual_client_name) contains anything.It works fine when the other field (“second_individual_client_name”) contains data but generates an error when it does not.
The script is as follows:
var client_name = record.getFieldValue('fld-ffa7651ff5bd48a9aa8184a69be8550e'); var email = record.getFieldValue('fld-152d99920304499f8f89c3868eb144d1'); var second_individual_client_name = record.getFieldValue('fld-772ee93b5eb747d294e5a9a7b548ebda'); var second_individual_email = record.getFieldValue('fld-d09998df75864a0e8f82b6f61188b537'); // set email for prescribed information document if (second_individual_client_name.length===0){ var email_for_prescribed_information = email; } else { var email_for_prescribed_information = email + " and " + second_individual_email; } console.log(client_name + "\n" + email_for_prescribed_information);The error message generated is:
New Script: TypeError: undefined is not an object (evaluating 'second_individual_client_name.length'), line:(null)Any help would be gratefully received.
Hi,
to avoid possible data loss I imported all my data as text (unfortunately there is doesn’t seem to be an import log).
Now I converted everything successfully by some scripts.I am just not able to update the creation date using the internal corresponding field type.
Is there a way to keep my original dates ?best
AndreasHello, I’m a newbie evaluating Tap Forms, and so far, it looks like it will almost perfectly meet my needs. However, I’m having trouble doing something that’s simple in pretty much any other spreadsheet or database I’ve used…
I have a form that tracks subscription costs, which can be per month, quarter, semi-annual, or annual. I want to show the annual cost, so I tried this calculation field:
[PER_TERM_COST]*IF([TERM]=”Annual”;12;IF([TERM]=”Semi-Annual”;2;IF([TERM]=”Quarter”;4;12)))
It failed miserably. After some testing, it looks like Tap Forms doesn’t support using string tests in if-then statements at all—is that correct? The only workaround I found, which is ugly but does work, was to do it on string length:
[PER_TERM_COST]*IF(LENGTH[TERM]=5;12;IF[LENGTH(TERM)=6;1;IFLENGTH(TERM)=7;4;2)))
This means I can’t ever have two terms with the same length :). Am I missing something, or is there really no string comparison support in Tap Forms?
Obviously, I can change my term field to be a numeric value, but I like the appearance of text instead. And I realize I could have a calculation to display the text-based term, but I’d still need the numeric field visible for input. String-based comparisons would add a lot of power to Tap Forms, assuming it’s not there and I’m just missing something.
thanks;
-rob.