Search…
Welcome 🎉
Tutorial
Introduction
Basics tutorial
Intermediate tutorial
Independent tutorial
Build databases
Enable timezone-independent date
Manage databases
Import and export
Duplicate database
Scripting
Introduction to Ninox script
Script editor features
Functions overview
Functions—by category
Functions—alphabetically
abs
acos
age
alert
appointment
array
asin
atan
atan2
avg
barcodeScan
capitalize
ceil
chosen
clientLang
closeAllRecords
closeFullscreen
closeRecord
color
concat
contains
cos
count (aka cnt)
createCalendarEvent
createCalendarReminder
createTextFile
databaseId
date
datetime
day
days
degrees
dialog
duration
email
endof
even
exp
extractx
file
files
first
floor
format
formatJSON
formatXML
html
http
icon
index
isAdminMode
isDatabaseLocked
isDatabaseProtected
item
join
last
length
latitude
ln
location
log
longitude
lower
lpad
max
min
month
monthIndex
monthName
ninoxApp
now
number
numbers
odd
openFullscreen
openPrintLayout
openRecord
openTable
openURL
parseJSON
parseXML
phone
popupRecord
pow
printAndSaveRecord
printRecord
quarter
queryConnection
radians
random
range
raw
replace
replacex
round
rpad
rsort
sendCommand
sendEmail
sign
sin
slice
sort
split
splitx
sqr
sqrt
start
string
styled
substr
substring
sum
tan
testx
text
time
timeinterval
timestamp
today
trim
unique
upper
url
user
userEmail
userFirstName
userFullName
userHasRole
userId
userIsAdmin
userLastName
userName
userRole
userRoles
users
week
weekday
weekdayIndex
weekdayName
workdays
year
yearmonth
yearquarter
yearweek
Appendix
API
Introduction
HTTP function
Private Cloud APIs
Public Cloud APIs
Private Cloud / On-Premises
Single sign-on (SSO)
Windows Server installation
Docker installation
Sample configuration file
🆕
Create print layouts with Carbone
🆕
SQL Server connector configuration
Manage account
Create account
Book subscription
Calculate required licenses
Add licenses
Manage licenses
Invite collaborators
Understand usage overview and capacity restrictions
Ninox, Mac app and iCloud
Resources
Release notes
Glossary
🇩🇪
Ninox Docs (German)
👵
Legacy documentation
âť“
Why did we move the old documentation from ninox.com?
Introduction
User interface
Tables
Calculations
Print
Import and export
System requirements
User management, identities and rights
Data synchronization
Data backup
FAQ
Related Links
Ninox website
Community
Webinars
Pricing
Contact us
Imprint
Privacy policy
Powered By
GitBook
userRole
To return the role of the current or a given user
This function finds out for you, which role a user has been assigned. By default Ninox has 2 roles in stock:
admin
editor
But you can create new roles on your own and assign them to the collaborators in your workspace.
If you want to check
all roles
, which are assigned to a user, use
userRoles().
Syntax
userRole()
userRole(user)
Return
string
Examples
userRole()
To return the role of the current user.
userRole()
Result:
admin (if the current user has admin rights) or editor (if the current user has editor rights.
​
userRole(myUser)
To return the role of a given user.
Choose the field "User" and select "Angela Merkel".
userRole(User)
Result:
chancellor (if Angela Merkel definitely has the extra created role "chancellor")
See also
​
user
, which returns the current or a specific user.
​
userHasRole
, which returns "true" if a user has a given role.
​
userRoles
, which returns all roles of a user.
Previous
userName
Next
userRoles
Last modified
2mo ago
Export as PDF
Copy link
Outline
Syntax
Return
Examples
See also