# AppStudio - Expression Patterns

**URL:** <https://www.epiusers.help/t/appstudio-expression-patterns/126826>\
**Category:** Kinetic ERP\
**Created:** [June 20, 2025, 1:29pm UTC](https://www.epiusers.help/t/appstudio-expression-patterns/126826 "2025-06-20T13:29:10Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbooker](https://www.epiusers.help/user_avatar/www.epiusers.help/jbooker/32/83580_2.png) [@jbooker](https://www.epiusers.help/u/jbooker)\
**Post date:** [June 20, 2025, 1:29pm UTC](https://www.epiusers.help/t/appstudio-expression-patterns/126826/1 "2025-06-20T13:29:10Z")

</div>

Haven’t seen this documented anywhere. feel free to markup and add examples, commentary, etc.

# Expression Patterns

| Pattern in String | Example | Parser | Description |
| --- | --- | --- | --- |
| `~_..._~` | `~_MyComponent.Property_~` | `parseControlExpression` | Identifies control expressions wrapped with `~_` and `_~` |
| `{...}` | `{OrderHed.OrderNum}` | `parseEpBinding` | Detects Epicor binding expressions enclosed in curly braces |
| `%` | `%session.UserName%` | `parseToken` | Flags tokenized strings, possibly for templating or substitution |
| `#_..._#`,  
 `.row%`,  
 `.count%`,  
 `.hasRow%`,  
`.hasChanges%` | `#_new Date().getDate()_#`  
`#_trans.dataView('OrderHed').row_#`   
 `%OrderHed.row%`, `%Customer.count%` | `parseJSExpression` | Identifies dynamic JavaScript expressions embedded in strings |

# Special Arguments

| Placeholder | Source Object | Description |
| --- | --- | --- |
| `%value%` | `dataColumnChangeEventArgs.value` | The new value in a data change event |
| `%row%` | `dataColumnChangeEventArgs.row` | The full row of data associated with the change |
| `%oldValue%` | `dataColumnChangeEventArgs.oldValue` | The previous value before the change |
| `%current%` | `dataColumnChangeEventArgs.current` | The current item or context |
| `%previous%` | `dataColumnChangeEventArgs.previous` | The previous item or context |
| `%column%` | `dataColumnChangeEventArgs.column` | The name of the column affected |
| `%readOnly%` | `dataColumnChangeEventArgs.readOnly` | Boolean indicating if the column is read-only |
| `%currentDataView%` | `transactionService.currentDataView()` | The current state of the data view |
| `%previousDataView%` | `transactionService.previousDataView()` | The prior state of the data view |
| `%coreCurrentDataView%` | `transactionService.coreCurrentDataView()` | The core (non-enhanced) current data view |
| `%corePreviousDataView%` | `transactionService.corePreviousDataView()` | The core prior data view |
| `%nodeEntityType%` | `p.node.entityType` | Entity type of the selected tree node (if event is tree-based) |
| `%nodeSysRowID%` | `p.node.sysRowID` | Unique row ID of the selected node |
| `%nodeIsFolder%` | `p.node.isFolder` | Indicates if the node is a folder (true/false) |
| `%nodePath%` | `p.node.nodePath` | Path of the selected node in the hierarchy |
| `%dragEntityType%` | `e.entityType` | Entity type being dragged (if drag-drop event) |
| `%startDateTime%` | `b.start` | Start time of the scheduler event |
| `%endDateTime%` | `b.end` | End time of the scheduler event |
| `%isAllDayEvent%` | `b.isAllDay` | Boolean flag for all-day scheduler events |

This is AI-gen so mileage may vary.

---

<div class="post-metadata">

**Author:** ![jbooker](https://www.epiusers.help/user_avatar/www.epiusers.help/jbooker/32/83580_2.png) [@jbooker](https://www.epiusers.help/u/jbooker)\
**Post date:** [October 1, 2025, 7:53pm UTC](https://www.epiusers.help/t/appstudio-expression-patterns/126826/2 "2025-10-01T19:53:30Z")

</div>

Not sure why I can’t edit this topic. To clarify for my reference.

this token expression

```auto
%OrderHed.count%

```

evals to this js expression

```auto
#_trans.dataView('OrderHed').count_#

```

which evals to the count of rows in OrderHed dataview.

---

<div class="post-metadata">

**Author:** ![utaylor](https://www.epiusers.help/user_avatar/www.epiusers.help/utaylor/32/64664_2.png) [@utaylor](https://www.epiusers.help/u/utaylor)\
**Post date:** [October 1, 2025, 8:24pm UTC](https://www.epiusers.help/t/appstudio-expression-patterns/126826/3 "2025-10-01T20:24:52Z")

</div>

I wish this stuff was documented for us so that we didn’t have to do what you’re doing, but I appreciate it greatly.

---

<div class="post-metadata">

**Author:** ![Randy](https://www.epiusers.help/user_avatar/www.epiusers.help/randy/32/51539_2.png) [@Randy](https://www.epiusers.help/u/Randy)\
**Post date:** [October 1, 2025, 8:39pm UTC](https://www.epiusers.help/t/appstudio-expression-patterns/126826/4 "2025-10-01T20:39:58Z")

</div>

> [@jbooker](#):
>
> Not sure why I can’t edit this topic.

There is a timer on how long you can edit your posts. 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![klincecum](https://www.epiusers.help/user_avatar/www.epiusers.help/klincecum/32/100137_2.png) [@klincecum](https://www.epiusers.help/u/klincecum)\
**Post date:** [October 1, 2025, 8:41pm UTC](https://www.epiusers.help/t/appstudio-expression-patterns/126826/5 "2025-10-01T20:41:47Z")

</div>

> [@Randy](#):
>
> There is a timer on how long you can edit your posts

> [@jbooker](#):
>
> feel free to markup and add examples

Sounds like a wiki…

Now he can edit it..

---

<div class="post-metadata">

**Author:** ![Randy](https://www.epiusers.help/user_avatar/www.epiusers.help/randy/32/51539_2.png) [@Randy](https://www.epiusers.help/u/Randy)\
**Post date:** [October 1, 2025, 8:52pm UTC](https://www.epiusers.help/t/appstudio-expression-patterns/126826/6 "2025-10-01T20:52:25Z")

</div>

![Working From Home Moderator GIF by autentity](https://media3.giphy.com/media/v1.Y2lkPWU5MGVkYmEzNzNlYjFoanNuYmI3ZjdyamRxMG91cGdsNW5xbW41dzBnZnR4eXNnMiZlcD12MV9naWZzX3NlYXJjaCZjdD1n/M3kDd0n3LUzENfMlQr/giphy.webp)

---

<div class="post-metadata">

**Author:** ![jbooker](https://www.epiusers.help/user_avatar/www.epiusers.help/jbooker/32/83580_2.png) [@jbooker](https://www.epiusers.help/u/jbooker)\
**Post date:** [October 1, 2025, 9:55pm UTC](https://www.epiusers.help/t/appstudio-expression-patterns/126826/7 "2025-10-01T21:55:46Z")

</div>

> [@utaylor](#):
>
> I wish this stuff was documented for us so that we didn’t have to do what you’re doing

Yes. And if the js app services weren’t so black-box there’d be no WHY we have to do what we’re doing.

I mean the transactionService is a treasure trove available only via one-liner js expressions. I’m thankful it’s there but why not the componentService, sharedService, etc, etc

The thing is a monster client-side but we got nadda power.

I mean why is my browser doing some plastic-tax logic (whatever that means) and processing file-picker content but I can’t call txtPicker.model.files[0].getBase64() or grab the processed content from cacheService?

Someday, fingers crossed. We’ll see.

Ps thanks all.

---

<div class="post-metadata">

**Author:** ![jbooker](https://www.epiusers.help/user_avatar/www.epiusers.help/jbooker/32/83580_2.png) [@jbooker](https://www.epiusers.help/u/jbooker)\
**Post date:** [October 3, 2025, 5:06pm UTC](https://www.epiusers.help/t/appstudio-expression-patterns/126826/8 "2025-10-03T17:06:19Z")

</div>

note to self: why does this work?

> [@App Studio - Text Area w/ Line Breaks](https://www.epiusers.help/t/app-studio-text-area-w-line-breaks/124946/25):
>
> woah. wait, who knew it evals js without the js tags

```auto
'{TransView.TextArea}'.replace(/\\n/g, "\r\n")

```

---

<div class="post-metadata">

**Author:** ![Stanislav](https://www.epiusers.help/letter_avatar_proxy/v4/letter/s/e5b9ba/32.png) [@Stanislav](https://www.epiusers.help/u/Stanislav)\
**Post date:** [November 4, 2025, 12:11pm UTC](https://www.epiusers.help/t/appstudio-expression-patterns/126826/10 "2025-11-04T12:11:02Z")

</div>

I wonder if it is possible to combine expressions such as:

`#_trans.dataView('{sysVariable.dataviewName}').hasChanges_#` or `%sysVariable.dataview.hasChanges%` as one liner.

I have tried both, first one works but the second one does not.

---

<div class="post-metadata">

**Author:** ![jbooker](https://www.epiusers.help/user_avatar/www.epiusers.help/jbooker/32/83580_2.png) [@jbooker](https://www.epiusers.help/u/jbooker)\
**Post date:** [November 4, 2025, 1:14pm UTC](https://www.epiusers.help/t/appstudio-expression-patterns/126826/11 "2025-11-04T13:14:05Z")

</div>

Yes the expression evaluator will try to handle combinations of but .row, .count, .hasChanges are a little odd in the eval and parsing. These should work:

```auto
trans.hasChanges('{TransView.dataViewName}')

```

```auto
#_trans.dataView('{TransView.dataViewName}').hasChanges_#

```

Where **TransView.dataViewName** field value is the name of a dataview like ‘Parts’.

Each of these pass through the evaluator twice. First to resolve the field value in the {epBinding} syntax. Second to execute the entire expression with those values in place.

So your first example should work if **sysVariable** is a dataview having a field **dataviewName** containing the name of a dataView in your App.
