# Open popup when barcode is scanned

**URL:** <https://forum.inductiveautomation.com/t/open-popup-when-barcode-is-scanned/113493>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [January 22, 2026, 7:13pm UTC](https://forum.inductiveautomation.com/t/open-popup-when-barcode-is-scanned/113493 "2026-01-22T19:13:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gfeiten](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@gfeiten](https://forum.inductiveautomation.com/u/gfeiten)\
**Post date:** [January 22, 2026, 7:13pm UTC](https://forum.inductiveautomation.com/t/open-popup-when-barcode-is-scanned/113493/1 "2026-01-22T19:13:52Z")

</div>

I have a perspective app using a zebra android scanner that uses a BarcodeScannerInput component to process input. The component has an onActionPerformed event script that opens one of several possible popups based on the value. This works fine.

I want to create a similar view that uses a phones camera to scan the barcode using the barcode session event. The problem I am running into is that system.perspective.openPopup() doesn’t seem to work from a session barcode event because “there is perspective page attached to this thread”.

Does anyone know a workaround for this?

---

<div class="post-metadata">

**Author:** ![mcgheeiv](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@mcgheeiv](https://forum.inductiveautomation.com/u/mcgheeiv)\
**Post date:** [January 22, 2026, 7:46pm UTC](https://forum.inductiveautomation.com/t/open-popup-when-barcode-is-scanned/113493/2 "2026-01-22T19:46:41Z")

</div>

You need to have a page open to open a popup. A view on the open page could have a custom property bound to a session property that gets filled in by the session barcode event. A change script on the view custom property could open up the popup.

The session barcode event might be able to send a perspective message to a message handler on the open view with the message handler opening the popup.

---

<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:** [January 22, 2026, 7:54pm UTC](https://forum.inductiveautomation.com/t/open-popup-when-barcode-is-scanned/113493/3 "2026-01-22T19:54:51Z")

</div>

Try using `system.perspective.getSessionInfo()`, filtered to your project, then pick your session by ID out of the list. That object will have a pageids attribute that you can explicitly target with the optional arguments to `system.perspective.openPopup()`.

---

<div class="post-metadata">

**Author:** ![gfeiten](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@gfeiten](https://forum.inductiveautomation.com/u/gfeiten)\
**Post date:** [January 23, 2026, 6:38pm UTC](https://forum.inductiveautomation.com/t/open-popup-when-barcode-is-scanned/113493/4 "2026-01-23T18:38:13Z")

</div>

This is how I solved it.

1. Put all the logic to determine which popup to open in the session barcode event based on the barcode data.

2. passed that to the view with system.perspective.message(payload).  
3. Opened the appropriate popup in the view with a root script message handler.

Thanks for all the replys!

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 23, 2026, 6:39pm UTC](https://forum.inductiveautomation.com/t/open-popup-when-barcode-is-scanned/113493/5 "2026-01-23T18:39:54Z")

</div>

> [quote="gfeiten, post:4, topic:113493"]  
> system.perspective.message(payload).  
> [/quote]

That should be `system.perspective.sendMessage()` - but I assume that's what you meant.
