# 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:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pgmo](https://avatars.discourse-cdn.com/v4/letter/p/d07c76/32.png) [@pgmo](https://forum.inductiveautomation.com/u/pgmo)\
**Post date:** [October 6, 2022, 3:44pm UTC](https://forum.inductiveautomation.com/t/scan-barcode-action-dynamic-data-in-context/64902/1 "2022-10-06T15:44:30Z")

</div>

Is it possible to supply variable arguments to the `Scan Barcode` action `Context`. As I can understand, I can only build a dictionary, where each field has a constant value. As an alternative, is there a `system.perspective......` call that performs the same action, but with dynamic arguments?

Thanks in advance, regards

I'm using Ignition 8.1.21

---

<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!
