Search Results for 'script'
-
Search Results
-
Hi all!!
I’m trying to figure out how to use the Markdown as a template for contracts.
Is there anyway to search and substitute special “texts” in the markdown document via the script.
For example, using %customer_name% and stuff like that?
Thanks!
Apologies if this is basic, but I seem to keep getting tripped up with some of these “minor” UI details!
I would like to specify the field displayed on the parent form of a one-to-many relationship. Here’s my (hopefully) simple example:
Form 1 contains a list of “computers”
Form 2 contains a list of “users”
Form 3 contains a list of “networks”I need to associate a “user” with a “computer”. To do this, I’ve added a “Link to Form” field in the “computers” form, set it as one-to-many, selected the “users” form, and checked “Show inverse relationship”. After doing this, I am able to select a user record and modify its displayed fields from within an individual computer record.
Now that the records are linked, I can see a “Link from form” field in the “users” form, and the relationship I just created is present. The problem is that the field displayed on the users form is just a numeric ID (leftover from SQL dump). I have not found any way to specify which field(s) from the “computers” form (which I presume to be the parent in this example) is shown.
Ideally, I’d like it to display something more identifiable, like a “name” or “description”, however I’d really like the ability to choose dynamically. For example, I would also like to create a second relationship in which a computer is linked to a network… for that link, I may want to display different data in the “link from form” field, such as an IP address, MAC address, etc.
I hope this is making sense. Thanks in advance for any guidance!
Topic: Just a little help.
A few weeks ago you all helped me come up with this great little script that lets me send an email through TextMagic and my customer receive it as a text message. It has been working FANTASTCLY… However, If I just add to it a little bit… I will know who I have texted when they reply.
I need to edit the code so that rather than just an email address as
“phone_number@textmagic.com”
we go one step further and have
“full_name field <phone_number@textmagic.com>”
Existing code.
function SMS() { var mobilephone = record.getFieldValue('fld-314b7a6810eb44828ab4cd717f987b7e').replace(/[^0-9]/g, ''); var SMS = mobilephone + "@textmagic.com"; //console.log(SMS); const email_id = 'fld-d52d76de4eed468f9119a49b50a47f0d'; record.setFieldValue(email_id, SMS); document.saveAllChanges(); return SMS; } SMS();Many thanks
I would like to add more than 1 record to a Form at a time.
For one record I have the following form script:
var date_id = 'fld-55a1678dc7b847f6be303140ad4779a3'; var type_of_disbursement_id = 'fld-1214396547f84c9b8fcccac7917e0147'; var unit_price_id = 'fld-8af21853bb8949bbbac92a1919fb5597'; var number_id = 'fld-0616ad94503b4bd1b87bd4a1b0ce9d44'; var date = new Date(); var typedoc = "apostille"; var unitprice = "30"; var number = "1"; let newRecord = form.addNewRecord(); newRecord.setFieldValue(date_id,date); newRecord.setFieldValue(type_of_disbursement_id,typedoc); newRecord.setFieldValue(unit_price_id,unitprice); newRecord.setFieldValue(number_id,number); document.saveAllChanges();But then if I also then wished another record using the same Form script to add:
var date = new Date(); var typedoc = "legalisation service"; var unitprice = "24"; var number = "1"; newRecord.setFieldValue(date_id,date); newRecord.setFieldValue(type_of_disbursement_id,typedoc); newRecord.setFieldValue(unit_price_id,unitprice); newRecord.setFieldValue(number_id,number); document.saveAllChanges();What command do I need to use to create another record (as using
let newRecord = form.addNewRecord();
again results in an error)?
I am trying to learn how to the use Prompter command/function. I have created a simple form script using the Prompter class, and added what I believe are the correct commands to save the output. But on running the script it is not saving the output to the fields of a blank record.
The form script:
var date_id = 'fld-55a1678dc7b847f6be303140ad4779a3'; var type_of_disbursement_id = 'fld-1214396547f84c9b8fcccac7917e0147'; var unit_price_id = 'fld-8af21853bb8949bbbac92a1919fb5597'; var number_id = 'fld-0616ad94503b4bd1b87bd4a1b0ce9d44'; var output = function printOut(continued) { if (continued == true) { console.log(date_requested + ", " + type_of_disbursement + ", " + unit_price + ", " + number); } else { console.log("Cancel button pressed."); } } var date_requested; var type_of_disbursement; var unit_price; // var number; // var other_field; var number; var numbers = ['1', '2', '3', '4', '5']; let prompter = Prompter.new(); prompter.cancelButtonTitle = 'Cancel'; prompter.continueButtonTitle = 'OK'; prompter.addParameter('Date: ','date_requested') .addParameter('Type of Disbursement: ', 'type_of_disbursement') .addParameter('Unit Price: ', 'unit_price') .addParameter('Number: ', 'number', 'popup', numbers) .show('Enter the type of disbursement, unit price and number wanted', output); record.setFieldValue(type_of_disbursement_id,type_of_disbursement); record.setFieldValue(unit_price_id,unit_price); record.setFieldValue(number_id,number); document.saveAllChanges();The Form is attached, with the form script (‘Prompt’)
Also what commands would I need to add to create a new record before populating the fields with the output of the running the prompter?
Any help would be gratefully received.