# String manipulation for bins in app studio

**URL:** <https://www.epiusers.help/t/string-manipulation-for-bins-in-app-studio/135593>\
**Category:** Kinetic ERP\
**Tags:** scanner, barcode, bins, application-studio\
**Created:** [June 18, 2026, 2:33pm UTC](https://www.epiusers.help/t/string-manipulation-for-bins-in-app-studio/135593 "2026-06-18T14:33:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tcolbert](https://www.epiusers.help/letter_avatar_proxy/v4/letter/t/a5b964/32.png) [@tcolbert](https://www.epiusers.help/u/tcolbert)\
**Post date:** [June 18, 2026, 2:33pm UTC](https://www.epiusers.help/t/string-manipulation-for-bins-in-app-studio/135593/1 "2026-06-18T14:33:36Z")

</div>

Our facility uses barcode scanners to enter bins into the text boxes on screens like Job Receipt to Inventory. The barcodes produce a string that has two characters on the front of the bin, e.g. YZABC01AA001 where YZ is the warehouse that bin lives in. I need to strip the YZ from the front of this string for the bin to be valid. Ideally I just take the last 10 characters as there are other bins with 10 or less characters that begin with YZ that I do not want to modify.

I am attempting to use the on-blur hook so that moving cursor focus away from the text box performs the modification. According to [this post](https://www.epiusers.help/t/string-replace-or-other-string-functions-in-application-studio/118846) I should be able to use JavaScript methods in a row-update, but so far I have been unsuccessful.

 ![image](https://www.epiusers.help/uploads/default/original/3X/3/0/3025bc5d2a6cb7a55134b9d3636ab565a546fa05.png)

I have tried with and without the #\_ \_# according to [this post](https://www.epiusers.help/t/using-javascript-in-expressions-row-update/122064), and have tried using substring as well. Every time I click outside of the text box to move the focus, the box removes the string entered and is left blank.

Am I going about this the correct way? Does the on-blur hook perform the event before the bin validation check happens? I also attempted this on another text box tied to a field with no validation check but couldn’t get it working there either. Any help would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![hackaphreaka](https://www.epiusers.help/user_avatar/www.epiusers.help/hackaphreaka/32/56320_2.png) [@hackaphreaka](https://www.epiusers.help/u/hackaphreaka)\
**Post date:** [June 18, 2026, 2:47pm UTC](https://www.epiusers.help/t/string-manipulation-for-bins-in-app-studio/135593/2 "2026-06-18T14:47:14Z")

</div>

This is an interesting solution to this issue. I am not sure if it’s the ‘correct’ way but it certainly sounds like it _should_ work.

My first thought goes immediately to the scanner itself. Can I program the scanner to strip out the data I don’t want and only send the data I do want.

After that I think maybe BPMs on the appropriate business objects to analyze and modify the data being passed through.

Or just rip the ban-aid off and have them re-label everything to comply with your standards.

---

<div class="post-metadata">

**Author:** ![dcamlin](https://www.epiusers.help/user_avatar/www.epiusers.help/dcamlin/32/57759_2.png) [@dcamlin](https://www.epiusers.help/u/dcamlin)\
**Post date:** [June 18, 2026, 2:56pm UTC](https://www.epiusers.help/t/string-manipulation-for-bins-in-app-studio/135593/3 "2026-06-18T14:56:33Z")

</div>

I was able to get it to work with:

`"{TransView.BarCode}".slice(2)` (which is “remove first two characters”)

and `"{TransView.BarCode}".slice(-10)` (which is “keep last ten characters”)

Both worked for me via onBlur event.

Before:  
 ![image](https://www.epiusers.help/uploads/default/original/3X/e/8/e8b5aca19fad2ca78df125c62ca08a1065704e05.png)

After:  
 ![image](https://www.epiusers.help/uploads/default/original/3X/4/9/49e58437b6afa0be184ac1f9cb8fc72055ba0397.png)

This is the same approach you attempted. Perhaps a version issue?

---

<div class="post-metadata">

**Author:** ![dcamlin](https://www.epiusers.help/user_avatar/www.epiusers.help/dcamlin/32/57759_2.png) [@dcamlin](https://www.epiusers.help/u/dcamlin)\
**Post date:** [June 18, 2026, 3:00pm UTC](https://www.epiusers.help/t/string-manipulation-for-bins-in-app-studio/135593/4 "2026-06-18T15:00:30Z")

</div>

Can you see your event firing in debugger?

 ![image](https://www.epiusers.help/uploads/default/original/3X/2/d/2d50a860e78b15021bbe764c01044d9b5bf05450.png)

---

<div class="post-metadata">

**Author:** ![tcolbert](https://www.epiusers.help/letter_avatar_proxy/v4/letter/t/a5b964/32.png) [@tcolbert](https://www.epiusers.help/u/tcolbert)\
**Post date:** [June 18, 2026, 6:47pm UTC](https://www.epiusers.help/t/string-manipulation-for-bins-in-app-studio/135593/5 "2026-06-18T18:47:27Z")

</div>

I had the data type set to String which was invalid. Once removed this worked. Thanks for confirming!

 ![image](https://www.epiusers.help/uploads/default/original/3X/5/5/55d65cc01ef92bc6842fefa2edcc2223beeaa444.png)

---

<div class="post-metadata">

**Author:** ![tcolbert](https://www.epiusers.help/letter_avatar_proxy/v4/letter/t/a5b964/32.png) [@tcolbert](https://www.epiusers.help/u/tcolbert)\
**Post date:** [June 18, 2026, 6:50pm UTC](https://www.epiusers.help/t/string-manipulation-for-bins-in-app-studio/135593/6 "2026-06-18T18:50:40Z")

</div>

I can, however it evaluates to blank on the bin text box. I used the same string input here as I did in the test box that worked in my comment above.

 ![image](https://www.epiusers.help/uploads/default/original/3X/0/6/06daa0dec3bfe4688196d9435627c8899591e7b1.png)

---

<div class="post-metadata">

**Author:** ![dcamlin](https://www.epiusers.help/user_avatar/www.epiusers.help/dcamlin/32/57759_2.png) [@dcamlin](https://www.epiusers.help/u/dcamlin)\
**Post date:** [June 18, 2026, 6:56pm UTC](https://www.epiusers.help/t/string-manipulation-for-bins-in-app-studio/135593/7 "2026-06-18T18:56:21Z")

</div>

So, it worked with your test TransView, but not PartTran.BinNum?

If that’s the case… can I ask a stupid question?

Are you trying to paste into the “To” Bin?

 ![image](https://www.epiusers.help/uploads/default/original/3X/9/0/903593735e45ecc8062181be01a17562a5705e77.png)

… or the “From” Bin?

 ![image](https://www.epiusers.help/uploads/default/original/3X/0/5/052eadcf35f28a131bebf3de31a1053beda807e7.png)

… cause that one has an Binding of PartTran.BinNum2

Just curious if you’re trying to scan into the BinNum2 field and it is grabbing the BinNum value (which is empty).

---

<div class="post-metadata">

**Author:** ![tcolbert](https://www.epiusers.help/letter_avatar_proxy/v4/letter/t/a5b964/32.png) [@tcolbert](https://www.epiusers.help/u/tcolbert)\
**Post date:** [June 18, 2026, 7:04pm UTC](https://www.epiusers.help/t/string-manipulation-for-bins-in-app-studio/135593/8 "2026-06-18T19:04:59Z")

</div>

Not a stupid question, I actually was doing that at first but caught it early on.

I am indeed pasting into the To Warehouse bin.
