Skip to main content

Custom Queries

The Custom Queries screen holds an application's own query for a security collection: Users, Roles, Assignments, Menus or Rights. When an application has a query for a collection, the collection runs it instead of the built-in one, on the pool the row names — or on the application's pool when it names none. One line per (application, collection) pair. Open it from Settings → Global → Custom Queries.

It is also what lets an application that is not JD Edwards be collected: the built-in queries read the JD Edwards EnterpriseOne security tables; any other connected application — a database, a custom application — gives its users, roles and rights through its own queries. An application that is not JD Edwards and has no query of its own for a collection is refused by that collection, which names it in the run's log.


At a glance​

Settings - Custom queriesSELECTnomasx1.settings_customsql_get+ Add rowBulk editSearch…▶ RunExport ▾ColumnsAPPLICATION ID (ID)APPLICATION IDCOLLECTIONPOOL (BLANK = THE APPLICATION'S)USER (AUDIT)DATE (AUDIT)2PAYROLLUserspayrolladmin2026-10-142PAYROLLRolespayrolladmin2026-10-142PAYROLLAssignments—admin2026-10-143CRMRightscrm_dwhadmin2026-10-15Add rowone query per collectionApplicationits ID, then its nameCollectionUsers, Roles, Assignments…Columnscodes, queryPoolblank: the application'sAuditwho changed it, when

What a query replaces​

CollectionWhat the query fillsHow
Users, Roles, AssignmentsThe users, the roles and the user–role assignments of the application.The query takes the place of the built-in one in the same collection: the rows it returns are loaded as a new snapshot, the previous one kept in the history.
Menus, RightsThe menus and the effective rights of the application — the final tables the Applications screens read.The built-in collection builds them in several steps from JD Edwards staging tables. A query fills the final table directly: the application's rows are replaced by what it returns, and the built-in steps add nothing for that application.

What follows from these tables runs on the application whoever filled them: segregation of duties reads its rights and its users, so the conflicts, the Segregation of duties dashboard and the security report cover it as well.

JDE-specific

The licence collections — employees, transactions, Object Usage Tracking — read JD Edwards EnterpriseOne only; a custom query does not replace them.


Writing the query​

The query must return the columns of the target table, aliased with their names (USR_ID, USR_NAME… for Users) — the easiest way to get them right is to start from what the built-in collection loads. Before it runs, Nomasx-1 fills in:

In the textReplaced by
{apps_id}The application ID.
{jde_sy}, {jde_dta}, {jde_ctl}… and their {jde_sy_dblink}…For a JD Edwards application: the schemas and database links of its JD Edwards tab.
:ukidBound to the snapshot number of the collection — write it where the target table expects its …_UKID column. Left out, nothing is bound.

Any other brace is left as written — a JSON literal or a regular expression in the query is not touched. A trailing ; is ignored.


Columns​

ColumnWhat it tells you
Application IDThe application the query is for. It shows twice: its ID (Application ID (ID)) and its name.
CollectionThe collection the query replaces: Users, Roles, Assignments, Menus or Rights. It shows twice: its code (Collection (ID): SECURITY_USERS…) and its label.
Pool (blank = the application's)The pool the query runs on. Blank: the application's pool, set on Applications.
User (Audit) / Date (Audit)Who saved the query last, and when.

Columns also shows the query and the pool's code.


Edit dialog​

Click Add row to declare a query, or click a row to open it. The dialog — New · Settings - Custom queries, or Edit · Settings - Custom queries on a saved row — has three tabs: Properties, Pool and Query. The footer carries Cancel and Save — plus Delete and Duplicate on a saved row.

New · Settings - Custom queriesPropertiesPoolQueryQUERYSELECT {apps_id} AS USR_APPS_ID,u.login AS USR_ID,u.full_name AS USR_NAME,u.status AS USR_STATUS,…:ukid AS USR_UKIDFROM app_users uSaveCancelPropertiesapplication + collection{apps_id}filled with the application ID:ukidsnapshot number, Users/Roles…Poolblank = the application'sTarget table's columnsaliased as the target expectsSaveread at the next collection

Tab 1 — Properties​

FieldWhat to enter
Application IDOne of the declared applications. The query applies to this one only.
CollectionThe collection replaced: Users, Roles, Assignments, Menus or Rights.
User (Audit) / Date (Audit)Filled in by Nomasx-1 on save; read-only.

Application ID and Collection name the line: they are entered when the line is created and read-only on a saved line — its pool and its query change, and the change is saved. To move a query to another application or collection, duplicate the line (Duplicate) and delete the old one.

Tab 2 — Pool​

FieldWhat to enter
Pool (blank = the application's)A dropdown of the installation's pools. Pick one when the query reads another database than the application's — a data warehouse, a copy of the security tables; leave blank otherwise. The pool holds the account the query runs with.

Tab 3 — Query​

FieldWhat to enter
QueryThe SELECT to run instead of the built-in query of the collection picked on Properties. A blank query is ignored: the built-in one runs.

Tips & best practices​

  • Run the query on its pool first with the application ID filled in — the columns, their names and their types must match the target table.
  • One collection at a time. Start with Users, check the Users screen after a collection, then add Roles and Assignments.
  • Mind Menus and Rights. Their query fills the final table: the rows it returns are what the rights, the conflicts and the reports see for that application.
  • Delete the row to go back to the built-in query — or empty the query.