Skip to content

create, delete, and duplicate

Jacques TUR
These instructions allow you to create, delete, and duplicate a record. Their usage is straightforward and well-documented in Ninox's official documentation:

Key details not covered in the Ninox documentation:

The create, delete, and duplicate instructions return a rid (Record ID), not a nid (Node ID). From a syntax perspective, both types (rid and nid) can be used similarly:

Example:

var myRid := duplicate(first(select Customer));
var 'first name' := myRid.'First Name';
var myNid := first(select Customer);
var lastName := myNid.'Last Name';

---{'first name'} {lastName}---

Compatibility between rid and nid

If you want to assign a rid to a variable of type nid, you can use the rid.id notation to make them compatible:

Example:

var myRecord := first(select Customer where 'First Name' like "z");
if not myRecord then
myRecord := create Customer.id;
myRecord.'First Name' := "Jacques";
end;
By using rid.id, you ensure compatibility between the two types when necessary.

Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.