# Simple Example of Async working in a Perspective View Object

**URL:** <https://forum.inductiveautomation.com/t/simple-example-of-async-working-in-a-perspective-view-object/112038>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 7, 2025, 2:19pm UTC](https://forum.inductiveautomation.com/t/simple-example-of-async-working-in-a-perspective-view-object/112038 "2025-11-07T14:19:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![francisco.salinas](https://avatars.discourse-cdn.com/v4/letter/f/ce73a5/32.png) [@francisco.salinas](https://forum.inductiveautomation.com/u/francisco.salinas)\
**Post date:** [November 7, 2025, 2:19pm UTC](https://forum.inductiveautomation.com/t/simple-example-of-async-working-in-a-perspective-view-object/112038/1 "2025-11-07T14:19:19Z")

</div>

Hello. I’ve looked through the forums and I was unable to find a simple example of async code that would work in a perspective view object.

I even went as far as copying and pasting code from the later.py file but that also did not work.

May someone direct me to a concise, working example for a perspective view object class or suggest an alternative approach?

For reference, I am on Ignition Platform 8.1.48

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [November 7, 2025, 2:28pm UTC](https://forum.inductiveautomation.com/t/simple-example-of-async-working-in-a-perspective-view-object/112038/2 "2025-11-07T14:28:54Z")

</div>

> [@francisco.salinas](#):
>
> async code that would work in a perspective view object

I'm not sure what you mean by this.

What are you trying to accomplish, and why do you believe it needs to be asyncrhrous?

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [November 7, 2025, 2:36pm UTC](https://forum.inductiveautomation.com/t/simple-example-of-async-working-in-a-perspective-view-object/112038/3 "2025-11-07T14:36:11Z")

</div>

Want to run a function async `system.util.runAsynchronous` is right there, but I agree with @lrose - I would not start making things async unless I had a reason too. IIRC too there is less reason to need async with perspective?

---

<div class="post-metadata">

**Author:** ![francisco.salinas](https://avatars.discourse-cdn.com/v4/letter/f/ce73a5/32.png) [@francisco.salinas](https://forum.inductiveautomation.com/u/francisco.salinas)\
**Post date:** [November 7, 2025, 2:57pm UTC](https://forum.inductiveautomation.com/t/simple-example-of-async-working-in-a-perspective-view-object/112038/4 "2025-11-07T14:57:47Z")

</div>

Currently the code is synchronously calling three api endpoints to then parse the large amount of data to then load it into a table. I would like to asynchronously call all three so processing time is reduced.

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [November 7, 2025, 3:00pm UTC](https://forum.inductiveautomation.com/t/simple-example-of-async-working-in-a-perspective-view-object/112038/5 "2025-11-07T15:00:10Z")

</div>

Do all your clients share this same data (or just filter it differently but otherwise rely on the same data)? If this is a case, have a gateway timer script (or a tag change script if there is an event style you know when you need to refresh from this API) do your call to the API’s, put it in a gateway tag. Then have your perspective table bind to this tag. You can filter between the gateway tag and table if needed with a transform or expressions if you use the Integration toolkit.

---

<div class="post-metadata">

**Author:** ![francisco.salinas](https://avatars.discourse-cdn.com/v4/letter/f/ce73a5/32.png) [@francisco.salinas](https://forum.inductiveautomation.com/u/francisco.salinas)\
**Post date:** [November 7, 2025, 3:14pm UTC](https://forum.inductiveautomation.com/t/simple-example-of-async-working-in-a-perspective-view-object/112038/7 "2025-11-07T15:14:40Z")

</div>

Would this approach work for large amounts of data? How would parsing from the tags afterwards work? I ask this because all the data, after being received, has to be joined together to make the final output for the table.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 7, 2025, 3:49pm UTC](https://forum.inductiveautomation.com/t/simple-example-of-async-working-in-a-perspective-view-object/112038/8 "2025-11-07T15:49:20Z")

</div>

This post might be useful - `CompletableFuture` is a layer above the raw threading you can do using `invokeAsynchronous`. I would endorse the advice to run this in a timer script or something similar.

> [@Issues when using system.util.invokeAsynchronous() I get a 'NoneType' object is not callable error](https://forum.inductiveautomation.com/t/issues-when-using-system-util-invokeasynchronous-i-get-a-nonetype-object-is-not-callable-error/97022/11):
>
> It's a bit awkward, but here's a proof-of-concept of using Java's CompletableFuture API to automatically run multiple operations on an async thread pool (managed by Java in this case), wait for all those operations to complete, and then do some work with all their results on another async thread: from java.util.concurrent import CompletableFuture from java.util.function import Consumer, Supplier from functools import partial from time import sleep # Adapts a Python function to act as a Java "C…

---

<div class="post-metadata">

**Author:** ![francisco.salinas](https://avatars.discourse-cdn.com/v4/letter/f/ce73a5/32.png) [@francisco.salinas](https://forum.inductiveautomation.com/u/francisco.salinas)\
**Post date:** [December 9, 2025, 4:41pm UTC](https://forum.inductiveautomation.com/t/simple-example-of-async-working-in-a-perspective-view-object/112038/9 "2025-12-09T16:41:06Z")

</div>

`CompletableFuture` was difficult at first to implement because I was losing page scope but it was eventually resolved through [the use of .get()](https://forum.inductiveautomation.com/t/issues-when-using-system-util-invokeasynchronous-i-get-a-nonetype-object-is-not-callable-error/97022/12)
