Since PDf lib uses < and > characters for start and end tags, if your text contain these characters it will throw the error like below: End character U+003E for inline option list not found in 'PDFlib_com.PDF'. So for fixing these issues, we can give the option begoptlistchar to "none". So the code can be like : oPDF.create_textflow("test < 10","begoptlistchar=none")>
Confirmation messages are displayed after submitting the form / questions by the receiver. To add new line in the confirmation message, run the below script in the script editor. function addLineBreaks () { var form = FormApp . getActiveForm (); var title = "Thanks for your submission. We will get back to you sooon" ; form . setConfirmationMessage ( title . split ( ". " ). join ( "\n" )); } For reference :
Adding new line in the section 'add title and description' in google forms can be done by running below code in the script editor : code to copy: function addLineBreaks() { var form = FormApp.getActiveForm(); // find form items you need var questions = form.getItems(FormApp.ItemType.SECTION_HEADER); for(i = 0; i < questions.length; i++) { var title = questions[i].getTitle(); questions[i].setTitle(title.split(". ").join("\n")); var desc= questions[i].getHelpText(); questions[i].setHelpText(desc.split(". ").join("\n")); } } Below video will give complete steps to do this :
We can use the following code to get the file extension of a filename provided. First get the file name to a variable, then using listlast () we can get the fille extension. <cfset file = "test.png"> <cfset FileExt=ListLast(file,".")> <cfoutput>#FileExt#</cfoutput>
There are some cases where we need coldfusion variable inside javascript. We may need to assign the javascript variable with coldfusion variable value. For this, we can use the script tag, as we use in HTML and can assign like given below: Please note that the entire JS code have to be inside <cfoutput> block. <cfset a="10"> <cfoutput> <script type="text/javascript"> var test = '#a#'; alert(test); </script> </cfoutput>
While writing SQL queries, we may get Errors while doing cast(value as data_type) like below: "converting data type varchar to numeric." Sometimes the value will be valid and still you see the error while casting. To fix this error, we can use TRY_CAST instead of CAST function. Since when the cast fails, the TRY_CAST() function returns NULL while the cast() function gives an error. Syntax : TRY_CAST(value AS data_type)