Automatically Create Item Code if Slider is Engaged?

Here is my app.

https://lrgvy.glideapp.io

Here is my sheet as well:

Basically I am just trying to make an easy to access database for all the items that we either sell or use in our shop.

For the items we sell, the Item Code, or I-Code, is created in another system and we have to reference it here. For items we use in the shop, we wanted to create our own Shop I-Code for reference.

I have figured out how to display either the shop I-code or the regular I-code depending on whether or not it is a sales item.

The issue I’m running into though is how can we easily know what to enter for the Shop I-Code, since that has to be generated by us, I would love for them to just be sequential order…Does anyone have any ideas on how to achieve this?

There’s a bunch of scripts out there that should do what you want. Here’s something to get you started.