Skip to content
umangenius-logo
U Man Genius docs
  • Pages
    • Welcome
      • ninext-loupe
        Ninext documentation
        • ninox-logo
          Ninext APP
        • Plugin installation
        • Classic installation
          • Uninstall
        • Update history
        • Popup ninext
          • Fields and Functions
          • Debug tracer
          • 🚧 Errors
          • Finder
        • 🚧 Edit field
        • Copy, paste, duplicate & delete
        • HTML helping functions
        • Native JS
          • Clipboard sample
        • Badges
        • View field event
        • Button event
        • Schema overview
        • Make a donation to support Ninext
      • ninox-logo
        Scripting tips & tricks
        • General Information
        • Var and Let
        • Functions
        • If Then else
        • For and while loops
        • select, where, from, to
        • Order By (or Order)
        • icon picker
          create, delete, and duplicate
        • JSON in Ninox
        • Arrays in Ninox
        • Undocumented functions in Ninox
        • Manipulating Record IDs in Ninox
        • Dynamic Choice & MultiChoice

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.