NocoDB provides an intuitive spreadsheet interface for creating online databases like Airtable and Baserow, either from scratch or by connecting to any Postgres/MySQL.
GetAllRows
Function to get all rows of the database. Keep the filterList empty if you don’t want to filter the data based on certain conditions.
Parameter | Type |
---|---|
filters | list |
GetRowById
Function to get a row by id. Keep the column list empty if you don’t want row of any specific column.
Parameter | Type |
---|---|
rowId | number |
columnList | list |
GetColumn
Function to get a column using column name. Keep the filters list empty if you want to get the column without applying any filter.
Parameter | Type |
---|---|
columnName | text |
filters | list |
FilterSortBy
Function to apply SortBy filter that can sort the result based on the ascending or descending order of column names.
Parameter | Type |
---|---|
columnNames | list |
Return Type: text
Ascending
Function to retrieve ascending order of a column name.
Parameter | Type |
---|---|
columnName | text |
Return Type: text
Descending
Function to retrieve descending order of a column name
Parameter | Type |
---|---|
columnName | text |
Return Type: text
FilterSkipRows
Function to apply SkipRows filter that can skip first n number of rows in the data.
Parameter | Type |
---|---|
number | number |
Return Type: text
FilterLimitLength
Function to apply LimitLength filter that can limit the number of rows to be retrieved in the data.
Parameter | Type |
---|---|
number | number |
Return Type: text
FilterWhere
Function to apply conditional filters. Don’t include space anywhere in the condition string.
Parameter | Type |
---|---|
conditions | text |
Return Type: text
GetCell
Function to get a cell.
Parameter | Type |
---|---|
rowId | number |
columnName | text |
GetRowCount
Function to get row count. Keep the conditions string empty if you don’t want to retrieve count based on certain conditions. If you are adding any condition don’t include space anywhere in the string.
Parameter | Type |
---|---|
conditions | text |
CreateRow
Function to create row.
Parameter | Type |
---|---|
columnList | list |
valueList | list |
UpdateRow
Function to update a row.
Parameter | Type |
---|---|
rowId | number |
columnList | list |
valueList | list |
DeleteRow
Function to delete a row.
Parameter | Type |
---|---|
rowId | number |
Events:
GotAllRows
Triggered when successfully retrieved all rows.
Parameter | Type |
---|---|
values | text |
rowIds | list |
totalRows | number |
response | text |
GotRowById
Triggered when successfully retrieved row by id.
Parameter | Type |
---|---|
response | text |
GotColumn
Triggered when successfully retrieved column.
Parameter | Type |
---|---|
values | text |
totalRows | number |
response | text |
GotCell
Triggered when successfully retrieved cell.
Parameter | Type |
---|---|
response | text |
value | any |
GotRowCount
Triggered when successfully retrieved rows count.
Parameter | Type |
---|---|
count | number |
RowCreated
Triggered when successfully create a row.
Parameter | Type |
---|---|
rowId | number |
RowUpdated
Triggered when successfully updated row.
Parameter | Type |
---|---|
response | text |
RowDeleted
Triggered when successfully deleted a row.
Parameter | Type |
---|---|
response | text |
OnError
Triggered on error.
Parameter | Type |
---|---|
errorMessage | text |
errorFrom | text |
Properties:
Url
Host url of NocoDB server. Change it only if you are using self hosted server.
TableId
Table id of your NocoDB database.
Token
API Token of your NocoDB database.
Conditional Operators
Do not include any space while using this inside the string.
It can be used in these two blocks:
Operation | Meaning | Example |
---|---|---|
eq | equal | (colName,eq,colValue) |
neq | not equal | (colName,neq,colValue) |
not | not equal (alias of neq) | (colName,not,colValue) |
gt | greater than | (colName,gt,colValue) |
ge | greater or equal | (colName,ge,colValue) |
lt | less than | (colName,lt,colValue) |
le | less or equal | (colName,le,colValue) |
is | is | (colName,is,true/false/null) |
isnot | is not | (colName,isnot,true/false/null) |
in | in | (colName,in,val1,val2,val3,val4) |
btw | between | (colName,btw,val1,val2) |
nbtw | not between | (colName,nbtw,val1,val2) |
like | like | (colName,like,%name) |
isWithin | is Within (Available in Date and DateTime only) | (colName,isWithin,sub_op) |
allof | includes all of | (colName,allof,val1,val2,…) |
anyof | includes any of | (colName,anyof,val1,val2,…) |
nallof | does not include all of (includes none or some, but not all of) | (colName,nallof,val1,val2,…) |
nanyof | does not include any of (includes none of) | (colName,nanyof,val1,val2,…) |
Comparison Sub-Operators
The following sub-operators are available in Date
and DateTime
columns.
Operation | Meaning | Example |
---|---|---|
today | today | (colName,eq,today) |
tomorrow | tomorrow | (colName,eq,tomorrow) |
yesterday | yesterday | (colName,eq,yesterday) |
oneWeekAgo | one week ago | (colName,eq,oneWeekAgo) |
oneWeekFromNow | one week from now | (colName,eq,oneWeekFromNow) |
oneMonthAgo | one month ago | (colName,eq,oneMonthAgo) |
oneMonthFromNow | one month from now | (colName,eq,oneMonthFromNow) |
daysAgo | number of days ago | (colName,eq,daysAgo,10) |
daysFromNow | number of days from now | (colName,eq,daysFromNow,10) |
exactDate | exact date | (colName,eq,exactDate,2022-02-02) |
For isWithin
in Date
and DateTime
columns, the different set of sub-operators are used.
Operation | Meaning | Example |
---|---|---|
pastWeek | the past week | (colName,isWithin,pastWeek) |
pastMonth | the past month | (colName,isWithin,pastMonth) |
pastYear | the past year | (colName,isWithin,pastYear) |
nextWeek | the next week | (colName,isWithin,nextWeek) |
nextMonth | the next month | (colName,isWithin,nextMonth) |
nextYear | the next year | (colName,isWithin,nextYear) |
nextNumberOfDays | the next number of days | (colName,isWithin,nextNumberOfDays,10) |
pastNumberOfDays | the past number of days | (colName,isWithin,pastNumberOfDays,10) |
Logical Operators
It can be used if more than one condition is to be used.
Operation | Example |
---|---|
~or | (checkNumber,eq,JM555205)~or((amount, gt, 200)~and(amount, lt, 2000)) |
~and | (checkNumber,eq,JM555205)~and((amount, gt, 200)~and(amount, lt, 2000)) |
~not | ~not(checkNumber,eq,JM555205) |
Extension Setup
Our data structure is like this:
Getting Table ID
FAQs
Q. How to use conditional filters?
Output:
[
{
"Id": 35,
"Name": "Anshuman",
"Marks": 100,
"CreatedAt": "2024-10-05 09:29:28+00:00",
"UpdatedAt": "2024-10-06 06:29:47+00:00"
},
{
"Id": 79,
"Name": "Nobita",
"Marks": 0,
"CreatedAt": "2024-10-06 06:30:25+00:00",
"UpdatedAt": "2024-10-06 06:30:33+00:00"
}
]
Q. How to use sort filters?
Output:
[
{
"Id": 35,
"Name": "Anshuman",
"Marks": 100,
"CreatedAt": "2024-10-05 09:29:28+00:00",
"UpdatedAt": "2024-10-06 06:29:47+00:00"
},
{
"Id": 70,
"Name": "Akshat",
"Marks": 69,
"CreatedAt": "2024-10-06 04:27:42+00:00",
"UpdatedAt": "2024-10-06 06:29:53+00:00"
},
{
"Id": 72,
"Name": "Chutki",
"Marks": 50,
"CreatedAt": "2024-10-06 04:32:31+00:00",
"UpdatedAt": "2024-10-06 06:30:23+00:00"
},
{
"Id": 79,
"Name": "Nobita",
"Marks": 0,
"CreatedAt": "2024-10-06 06:30:25+00:00",
"UpdatedAt": "2024-10-06 06:30:33+00:00"
}
]
Hello. I can’t get it to work, it doesn’t return anything when I try to get it. I use self hosted Nocodb.
Can you help me?
Add your query here:-
https://community.appinventor.mit.edu/t/nocodb-no-code-database-airtable-baserow-alternative/