-
-
-
-
-
-
-
-
-
-
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
-
Database operations
-
databaseId
-
date
-
Date and time
-
datetime
-
day
-
days
-
degrees
-
dialog
-
duplicate
-
duration
-
email
-
endof
-
even
-
exp
-
extractx
-
fieldId
-
file
-
fileMetadata
-
files
-
Files and printing
-
fileUrl
-
first
-
floor
-
format
-
Format and convert data
-
formatJSON
-
formatXML
-
Functions overview
-
Functions—alphabetically
-
Functions—by category
-
get
-
html
-
http
-
icon
-
importFile
-
index
-
invalidate
-
isAdminMode
-
isDatabaseLocked
-
isDatabaseProtected
-
item
-
join
-
last
-
latitude
-
length
-
ln
-
loadFileAsBase64
-
loadFileAsBase64URL
-
location
-
log
-
longitude
-
lower
-
lpad
-
Mathematical
-
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
-
User interface
-
User management
-
userEmail
-
userFirstName
-
userFullName
-
userHasRole
-
userId
-
userIsAdmin
-
userLastName
-
userName
-
userRole
-
userRoles
-
users
-
validateXML
-
waitForSync
-
Web integration and API
-
week
-
weekday
-
weekdayIndex
-
weekdayName
-
workdays
-
year
-
yearmonth
-
yearquarter
-
yearweek
-
abs
-
-
-
-
-
-
shareFile
- updated 2 mths ago
To return a URL of a specific file
Use this function to create a link to share an image or an attachment per script.
The
shareFile
function generates a share link that is only valid within the database in which it was created. If a backup of that database is restored and the original database is deleted, the share link will no longer display the file. The link becomes invalid as it references the original database that no longer exists.
This function doesn't work in a formula field because it's modifying data.
This function will return a link, which can be saved in a URL or text field.
Syntax
shareFile(file)
shareFile(nid, string)
Return
link
Examples
shareFile(myFile)
To return a URL of a specific file.
shareFile(Logo)
Result: https://share.ninox.com/o7usi36shzk8hietrxcoje4n0g6sa6nf0335
shareFile(record, filename)
To return a URL of a specific file, i.e. image, document, or a signature field.
shareFile(this, "NinoxLogo.jpg")
Result: https://share.ninox.com/o7usi36shzk8hietrxcoje4n0g6sa6nf0335
See also
unshareFile
which unshared a given file.