-
-
-
-
-
-
-
-
-
-
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
-
-
-
-
-
-
fileUrl
- 3 mths ago
To return the URL of a specific file from a record
This function allows you to directly link to a specific file (e.g. an image or attachment) stored in a record—perfect for use in PDFs, emails, or external apps. Unlike shareFile()
, the fileUrl()
function is designed for use in formula fields and generates permanent links that work outside the database as well.
![]()
fileUrl()
can't be used in triggers or withindo as server
,do as transaction
, ordo as deferred
blocks.The generated URL includes information about the currently logged-in user, which is only available on the client side. Server-side code doesn't have access to this, which is why
fileUrl()
doesn't work there.
Syntax
file(nid, string)
Return
link
Examples
In the URL,
{API-KEY}
is a placeholder for the actual API key, which has been removed for security reasons.
To generate the URL of a file (for example, an uploaded image named "Cave Entrance Waterfall.jpg"), the file name must be extracted from the file path. This can be done using a regular expression.
Example 1: Directly in the function call
fileUrl(this, extractx(text(Image), ".+/(.+)", "$1"))
This expression extracts the file name from the full file path using a regular expression.
The pattern .+/(.+)
finds the last forward slash /
and returns everything after it—the actual file name.
Result: https://dbde0149.ninox.com/t3gDkNhdoqf2sTmAR/dd0usv6i6cet/files/get/O2/Cave%20Entrance%20Waterfall.jpg?T=1742980446305&XT=USER-{API-KEY}
Example 2: More readable with an intermediate step
let fileName := extractx(text(Image), "[^/]+$");
fileUrl(this, fileName)
This version is cleaner and easier to read.
First, the file name is extracted using extractx(text(Image), "[^/]+$")
, which captures everything after the last slash.
The pattern [^/]+$
means: "Find all characters that are not a slash, at the end of the string."
Result: https://dbde0149.ninox.com/t3gDkNhdoqf2sTmAR/dd0usv6i6cet/files/get/O2/Cave%20Entrance%20Waterfall.jpg?T=1742980446305&XT=USER-{API-KEY}
See also
extractx
extract a string from a given text using a regular expression.
shareFile
returns a URL of a specific file.