# Scan Barcode action: dynamic data in Context

**URL:** <https://forum.inductiveautomation.com/t/scan-barcode-action-dynamic-data-in-context/64902>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [October 6, 2022, 3:44pm UTC](https://forum.inductiveautomation.com/t/scan-barcode-action-dynamic-data-in-context/64902 "2022-10-06T15:44:30Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [October 9, 2022, 2:50am UTC](https://forum.inductiveautomation.com/t/scan-barcode-action-dynamic-data-in-context/64902/2 "2022-10-09T02:50:01Z")

</div>

Here is an example where a user is dynamically controlling the context value by firing a separate event to pass a unique identifier into the onBarcodeDataReceived session event. I haven't worked with this at all, so I vouch for the efficacy of this solution, but at looks like it accomplishes what you are asking:

> [@Perspective Barcode Scan context](https://forum.inductiveautomation.com/t/perspective-barcode-scan-context/51596/5):
>
> Here’s my button for a barcode scan: First script: Scan barcode: [image] Session Handler: “Barcode1” can be replaced with any unique identifier to handle multiple scan events and fields. From there the text field showing the scan value can just be bound to session.custom.Barcode.Scanned[\<identifier\>] Hope this helps!

---

_[View the full topic](https://forum.inductiveautomation.com/t/scan-barcode-action-dynamic-data-in-context/64902)._
