PW01-L01 · Direct rewrite

Current user name

Replace the user system variable with a ProjectWise CEL context object.

ProjectWise-specific
Migration outcome

Distinguish legacy text substitution from typed access to the CEL context.

ProjectWise context

Document Attributes or WorkArea Properties

PW system variableLegacy ProjectWise configuration
$USER.NAME$
CELProjectWise CEL
thisUser.name

What is different

ProjectWise CEL does not use the legacy system variable. The host exposes thisUser and the expression reads its name property.

  1. The legacy configuration uses a replacement token; CEL uses an object and its property.
  2. The documentation guarantees thisUser in the supported contexts.
  3. The result remains the user name as a string.

Migration goal

Get the name of the user under whom ProjectWise evaluates the configuration.

What changes

The legacy ProjectWise configuration used a system variable. ProjectWise CEL receives a thisUser object from the host and reads its name property. This is not a database query.

Why the CEL solution is clearer

The expression identifies both the object and the required property. The same object can expose a description or email without introducing another legacy token.

Before deployment

Confirm whether the target field needs the login name or the user description. thisUser.name and thisUser.description are not interchangeable.

Sources

  • BENTLEY-PW-CEL-SYSVARS — official system-variable replacement table.
  • BENTLEY-PW-CEL-CONTEXTS — availability of thisUser.