NocoDb

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

image

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.

ParameterType
filterslist
GetRowById

image

Function to get a row by id. Keep the column list empty if you don’t want row of any specific column.

ParameterType
rowIdnumber
columnListlist
GetColumn

image

Function to get a column using column name. Keep the filters list empty if you want to get the column without applying any filter.

ParameterType
columnNametext
filterslist

FilterSortBy

image

Function to apply SortBy filter that can sort the result based on the ascending or descending order of column names.

ParameterType
columnNameslist

Return Type: text


Ascending

image

Function to retrieve ascending order of a column name.

ParameterType
columnNametext

Return Type: text


Descending

image

Function to retrieve descending order of a column name

ParameterType
columnNametext

Return Type: text


FilterSkipRows

image

Function to apply SkipRows filter that can skip first n number of rows in the data.

ParameterType
numbernumber

Return Type: text


FilterLimitLength

image

Function to apply LimitLength filter that can limit the number of rows to be retrieved in the data.

ParameterType
numbernumber

Return Type: text


FilterWhere

image

Function to apply conditional filters. Don’t include space anywhere in the condition string.

ParameterType
conditionstext

Return Type: text


GetCell

image

Function to get a cell.

ParameterType
rowIdnumber
columnNametext

GetRowCount

image

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.

ParameterType
conditionstext

CreateRow

image

Function to create row.

ParameterType
columnListlist
valueListlist

UpdateRow

image

Function to update a row.

ParameterType
rowIdnumber
columnListlist
valueListlist

DeleteRow

image

Function to delete a row.

ParameterType
rowIdnumber

Events:

GotAllRows

image

Triggered when successfully retrieved all rows.

ParameterType
valuestext
rowIdslist
totalRowsnumber
responsetext

GotRowById

image

Triggered when successfully retrieved row by id.

ParameterType
responsetext

GotColumn

image

Triggered when successfully retrieved column.

ParameterType
valuestext
totalRowsnumber
responsetext

GotCell

image

Triggered when successfully retrieved cell.

ParameterType
responsetext
valueany

GotRowCount

image

Triggered when successfully retrieved rows count.

ParameterType
countnumber

RowCreated

image

Triggered when successfully create a row.

ParameterType
rowIdnumber

RowUpdated

image

Triggered when successfully updated row.

ParameterType
responsetext

RowDeleted

image

Triggered when successfully deleted a row.

ParameterType
responsetext

OnError

image

Triggered on error.

ParameterType
errorMessagetext
errorFromtext

Properties:

Url

image

Host url of NocoDB server. Change it only if you are using self hosted server.


TableId

image

Table id of your NocoDB database.


Token

image

API Token of your NocoDB database.

Conditional Operators

It can be used in these two blocks:

image image


OperationMeaningExample
eqequal(colName,eq,colValue)
neqnot equal(colName,neq,colValue)
notnot equal (alias of neq)(colName,not,colValue)
gtgreater than(colName,gt,colValue)
gegreater or equal(colName,ge,colValue)
ltless than(colName,lt,colValue)
leless or equal(colName,le,colValue)
isis(colName,is,true/false/null)
isnotis not(colName,isnot,true/false/null)
inin(colName,in,val1,val2,val3,val4)
btwbetween(colName,btw,val1,val2)
nbtwnot between(colName,nbtw,val1,val2)
likelike(colName,like,%name)
isWithinis Within (Available in Date and DateTime only)(colName,isWithin,sub_op)
allofincludes all of(colName,allof,val1,val2,…)
anyofincludes any of(colName,anyof,val1,val2,…)
nallofdoes not include all of (includes none or some, but not all of)(colName,nallof,val1,val2,…)
nanyofdoes 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.

OperationMeaningExample
todaytoday(colName,eq,today)
tomorrowtomorrow(colName,eq,tomorrow)
yesterdayyesterday(colName,eq,yesterday)
oneWeekAgoone week ago(colName,eq,oneWeekAgo)
oneWeekFromNowone week from now(colName,eq,oneWeekFromNow)
oneMonthAgoone month ago(colName,eq,oneMonthAgo)
oneMonthFromNowone month from now(colName,eq,oneMonthFromNow)
daysAgonumber of days ago(colName,eq,daysAgo,10)
daysFromNownumber of days from now(colName,eq,daysFromNow,10)
exactDateexact date(colName,eq,exactDate,2022-02-02)

For isWithin in Date and DateTime columns, the different set of sub-operators are used.

OperationMeaningExample
pastWeekthe past week(colName,isWithin,pastWeek)
pastMonththe past month(colName,isWithin,pastMonth)
pastYearthe past year(colName,isWithin,pastYear)
nextWeekthe next week(colName,isWithin,nextWeek)
nextMonththe next month(colName,isWithin,nextMonth)
nextYearthe next year(colName,isWithin,nextYear)
nextNumberOfDaysthe next number of days(colName,isWithin,nextNumberOfDays,10)
pastNumberOfDaysthe past number of days(colName,isWithin,pastNumberOfDays,10)

Logical Operators

It can be used if more than one condition is to be used.

OperationExample
~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:
image

How to get API Token?

Getting Table ID :point_down:

image

FAQs

Q. How to use conditional filters?

image

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?

image

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"
  }
]

2 thoughts on “NocoDb”

  1. 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?

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top