Code Finder

Regular expression search, and a result's code on hover

The Code Finder view lets you scan every script in your database. You can combine these options:

ButtonOptionEffect
.*Regular expressionInterprets your query as a RegExp, giving you the full power of patterns (quantifiers, classes, anchors…). The Case sensitive and Whole word options can still be combined.
AaCase sensitiveWhen checked, the search becomes case‑sensitive—“A” and “a” are treated as different characters.
\bWhole wordLimits results to occurrences not attached to other letters or digits. Words separated by spaces, punctuation, etc. are matched.

The three buttons are inside the input field, on the right, in this order; when the field is not empty, a cross follows them, which clears it.

The search starts when you leave the input field — with a click elsewhere, with the Tab key or, from version 3.2.0 onwards, with the Enter key — or when you pick a search from the history. From the same version, Esc leaves the field and discards what you typed in it: the current search stays displayed. The searched text and the three options are remembered by the browser, for all databases.

Search history

A click in the input field drops down your last 20 searches, the most recent first; the list is filtered as you type. A cross removes a search from the history.

Results

The counter gives the number of results displayed and the total number found. Results are displayed in batches of 100: at the bottom of the list, +100 shows the next 100 (+N when fewer than 100 remain), and All (N) the remaining N.

Reading a result

Each result is a line presented as in Fields & Formulas: type icon, dependency badge, “Fx”, then the item’s breadcrumb, whose bold part designates the code where the text was found.

  • When you hover over the bold part, the code appears in a tooltip, with the found text highlighted.
  • A click on the bold part opens Ninox’s editor on this code, with the found text highlighted.
  • The red button that appears on hover, on the right of the line, in “Edit mode”, selects the field on its form for a line that concerns a field, and opens the code editor for the other lines.
  • A click on a field’s dependency badge opens that field in the Fields & Formulas tab.

Where the search looks

The search covers all the code of the database:

  • the global code and the “After Open” trigger;
  • table triggers;
  • field formulas and triggers: buttons, after create or after update triggers, “Display only if”, read and write permissions, display formats, dynamic choices, constraints;
  • view columns: their formula and their conditional formatting;
  • print reports: texts containing formulas in braces, HTML blocks, revision columns, image fields with a formula, and the data source of Carbone reports (only the source formula is read, not the Word file).

Regular expression example

Need a refresher on RegExp syntax? A concise tutorial is available at https://regexone.com.

The following RegExp finds every select whose where clause filters on ID:

\bselect\b[^;]*(?<!\.)\bid\b

This helps you quickly spot places where you can replace first(select myTable where ID = searchId) with the faster alternative: record(myTable, searchId).

How it works step by step :

RegExp PatternExplanation
\bselect\bMatches the whole word select (prevents matching words like “selected”).
[^;]*Matches zero or more characters except ;, ensuring no semicolon appears between select and id.
(?<!\.)A negative lookbehind that asserts there is no . immediately before id.
\bid\bMatches the whole word id (prevents matching substrings like “userid” or “ident”).