Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Add separators; repetitive functions

Featured Replies

Our company makes vitamins. We have lots of powders and keep track of the batches used in production.

The idea is that the mixing in charge scans the barcodes of the batches into a field.

Each barcode is always a length of 8 characters.

If he scans 3 barcodes, the field will be 24 characters long. I am trying to create a function that will reformat the text like so from:

xxxxxxxxxxxxxxxxxxxxxxxx

to

xxxxxxxx, xxxxxxxx, xxxxxxxx

I cannot get the function to work. it would be a text field with a calculation to reformat the text.

Any help is appreciated.

Try:

Replace ( Replace ( text ; 9 ; 0 ; ", " ) ; 19 ; 0 ; ", " )

How come the scanner doesn't tab into next field at the end of a scan?

EDIT:

Wait, you mean the field can contain ANY number of scans? If so, you will need a custom function for this. Once again, it's weird that the scanner cannot at least insert a separator.

Edited by Guest

  • Author

yes, it can contain any number of characters, always in groups of 8.

a custom function is exactly what i need.

I made one that works for 2 barcodes or less but after 2, it goes wild.

this is the calculation:

function CommaEight(text)

--------------------------

Let(

length = length(text);

If(

Length(text) > 8;

CommaEight(text) & ", " & Right(text;Length(text) - 8);

text

)

Try it this way:

Let ( [

this = Left ( text ; 8 ) ;

len = Length ( text ) ;

rest = Middle ( text ; 9 ; len - 8 )

] ;

this &

Case ( len > 8 ; ", " & CommaEight ( rest ) )

)

  • Author

you are the bomb.

i bow down to thee.

_|-0

it's a man bowing down. get it?

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.