# Speed problem in the execution of an action in perspective

**URL:** <https://forum.inductiveautomation.com/t/speed-problem-in-the-execution-of-an-action-in-perspective/75369>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [June 21, 2023, 11:11pm UTC](https://forum.inductiveautomation.com/t/speed-problem-in-the-execution-of-an-action-in-perspective/75369 "2023-06-21T23:11:59Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 22, 2023, 2:45pm UTC](https://forum.inductiveautomation.com/t/speed-problem-in-the-execution-of-an-action-in-perspective/75369/6 "2023-06-22T14:45:22Z")

</div>

You might find my new `where()` expression function helpful:

> [@Automation Professionals' Integration Toolkit Module](https://forum.inductiveautomation.com/t/automation-professionals-simulation-aids-v2/74934/5):
>
> I have spent my holiday poking at this. Wanted to provide an efficient replacement for a common use of python transforms: Make a (Perspective) table that dynamically populates both .data and .columns from source dataset that isn't constrained to any particular structure or data types. In Vision, one can achieve this (mostly) by pre-populating the column attributes dataset with all of the possible column names your application might deliver. No such thing in Perspective. But a transform can …

In this case, your transform would look something like this:

```auto
where({value},
    ({path.to.District.Dropdown.custom.SelectedValue} != '<All District>' && {path.to.District.Dropdown.custom.SelectedValue} != it()['District']) ||
    ({path.to.Foreman.Dropdown.custom.SelectedValue} != '<All Foremen>' && {path.to.Foreman.Dropdown.custom.SelectedValue} != it()['Foreman']) ||
    ({path.to.Pumper.Dropdown.custom.SelectedValue} != '<All Pumpers>' && {path.to.Pumper.Dropdown.custom.SelectedValue} != it()['Pumper'])
)

```

I suspect this will run much faster than any script transform.

---

_[View the full topic](https://forum.inductiveautomation.com/t/speed-problem-in-the-execution-of-an-action-in-perspective/75369)._
