-
-
-
-
-
-
-
-
-
-
-
abs
-
acos
-
age
-
alert
-
appendTempFile
-
appointment
-
Array
-
array
-
asin
-
atan
-
atan2
-
avg
-
barcodeScan
-
cached
-
capitalize
-
ceil
-
chosen
-
clientLang
-
closeAllRecords
-
closeFullscreen
-
closeRecord
-
color
-
concat
-
contains
-
cos
-
count (aka cnt)
-
createCalendarEvent
-
createCalendarReminder
-
createTempFile
-
createTextFile
-
createXLSX
-
createZipFile
-
databaseId
-
date
-
datetime
-
day
-
days
-
degrees
-
dialog
-
duplicate
-
duration
-
email
-
endof
-
even
-
exp
-
extractx
-
fieldId
-
file
-
fileMetadata
-
files
-
fileUrl
-
first
-
floor
-
format
-
formatJSON
-
formatXML
-
get
-
html
-
http
-
icon
-
importFile
-
index
-
invalidate
-
isAdminMode
-
isDatabaseLocked
-
isDatabaseProtected
-
item
-
join
-
last
-
latitude
-
length
-
ln
-
loadFileAsBase64
-
loadFileAsBase64URL
-
location
-
log
-
longitude
-
lower
-
lpad
-
max
-
min
-
month
-
monthIndex
-
monthName
-
ninoxApp
-
now
-
number
-
numbers
-
odd
-
openFullscreen
-
openPage
-
openPrintLayout
-
openRecord
-
openTable
-
openURL
-
parseCSV
-
parseJSON
-
parseXML
-
phone
-
popupRecord
-
pow
-
printAndSaveRecord
-
printRecord
-
printTable
-
quarter
-
queryConnection
-
radians
-
random
-
range
-
raw
-
record
-
removeFile
-
removeItem
-
renameFile
-
replace
-
replacex
-
round
-
rpad
-
rsort
-
sendCommand
-
sendEmail
-
set
-
setItem
-
shareFile
-
shareView
-
sign
-
sin
-
sleep
-
slice
-
sort
-
split
-
splitx
-
sqr
-
sqrt
-
start
-
string
-
styled
-
substr
-
substring
-
sum
-
tableId
-
tan
-
teamId
-
testx
-
text
-
Text
-
time
-
timeinterval
-
timestamp
-
today
-
trim
-
unique
-
unshareAllViews
-
unshareFile
-
unshareView
-
upper
-
url
-
urlDecode
-
urlEncode
-
urlOf
-
user
-
userEmail
-
userFirstName
-
userFullName
-
userHasRole
-
userId
-
userIsAdmin
-
userLastName
-
userName
-
userRole
-
userRoles
-
users
-
validateXML
-
waitForSync
-
week
-
weekday
-
weekdayIndex
-
weekdayName
-
workdays
-
year
-
yearmonth
-
yearquarter
-
yearweek
-
abs
-
-
-
-
-
-
printRecord
- updated 11 mths ago
To print to a PDF from a given record in a given layout and open the file with a program set as default
This function prints a record in a PDF and automatically downloads the PDF to your computer on which you execute the function.
The PDF name refers to the table and the record ID.
❗ The function can be executed only on the client. Learn more about execution context.
Carbone templates
This function also works for Carbone templates and allows you to add optionally a JSON to overwrite the record data for the template.
Syntax
printRecord(nid, string)
printRecord(nid, string, JSON)
Return
void
Examples
printRecord(record, myLayout) To print to a PDF from a given record in a given layout or Carbone template and open the file with a program set as default.
printRecord(this, "Invoices")
Result: The current record will be printed as a PDF in the Invoices layout. You'll find the PDF in your downloads.
printRecord(record, myLayout, data) To print to a PDF from a given record in a given Carbone template and open the file with a program set as default. Record data can be overwritten with a JSON object.
printRecord(this, "Invoices", {
Date: format(if Date = null then Date else today(), "MM/DD/YYYY")
})
Result: The current record will be printed as a PDF in the Invoices layout. You'll find the PDF in your downloads. If there is no entry in the Date field, Today's date, for example, 08/28/2022 on August 28, 2022.
See also
printAndSaveRecord which saves a given record in a given layout as a PDF in the internal file system and returns a link to the file.
