# Using Session Property for Barcode scanner

**URL:** <https://forum.inductiveautomation.com/t/using-session-property-for-barcode-scanner/32302>\
**Category:** Ignition\
**Created:** [February 15, 2020, 11:23am UTC](https://forum.inductiveautomation.com/t/using-session-property-for-barcode-scanner/32302 "2020-02-15T11:23:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fisayoa](https://avatars.discourse-cdn.com/v4/letter/f/5f9b8f/32.png) [@fisayoa](https://forum.inductiveautomation.com/u/fisayoa)\
**Post date:** [February 15, 2020, 11:23am UTC](https://forum.inductiveautomation.com/t/using-session-property-for-barcode-scanner/32302/1 "2020-02-15T11:23:53Z")

</div>

Hi,  
Please, is it possible to temporarily store the scanned barcode to a session property for multiple users to scan using their mobile device and save to the the database simultaneously?  
I am currently saving the scanned barcode to the memory tag(which isn’t client based) at the moment as seen in the below screenshot.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/b/b8f52edfdd6e0b6823fea7c4a124a92b26ae25b9.png)

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [February 18, 2020, 4:18pm UTC](https://forum.inductiveautomation.com/t/using-session-property-for-barcode-scanner/32302/2 "2020-02-18T16:18:36Z")

</div>

Your question isn't very clear. Could you perhaps break it up into smaller required pieces or more clearly describe what it is you are trying to do?

> [@fisayoa](#):
>
> is it possible to temporarily store the scanned barcode to a session property for multiple users

You could use `system.util.sendMessage(project="<projectName>", messageHandler="BARCODESCANNED", payload={'text': data.text}, scope='S')` to "broadcast" to other sessions what data was scanned. You will then need to configure a Message Handler for the Session which uses "BARCODESCANNED" as the Handler name.

> [@fisayoa](#):
>
> for multiple users to scan using their mobile device

This is the part that is unclear. Once one user scans the barcode, there is no way for other users to "scan" the same barcode unless they physically scan the same barcode.

> [@fisayoa](#):
>
> save to the the database simultaneously?

This part is also unclear. There is no way to synchronize DB writes, because you shouldn't ever do that.

---

<div class="post-metadata">

**Author:** ![fisayoa](https://avatars.discourse-cdn.com/v4/letter/f/5f9b8f/32.png) [@fisayoa](https://forum.inductiveautomation.com/u/fisayoa)\
**Post date:** [February 18, 2020, 5:57pm UTC](https://forum.inductiveautomation.com/t/using-session-property-for-barcode-scanner/32302/3 "2020-02-18T17:57:06Z")

</div>

> [@cmallonee](#):
>
> here is no way to synchronize DB writes, because you shouldn’t ever do that.

Hi Cmallonee,

Thanks for your response and apologies ....  
I simply wanted to save the scanned barcode into a session property.  
This was resolved using the below script:  
session.custom.Scanned\_Barcode = data['text']
