Skip 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.

Validate input and make an "action"

Featured Replies

Task:

  1. Recieve input from user (using keyboard or barcode scanner)
  2. Lookup in Table_1 to see if the value exsists in the field "EAN" in any record
  3. If NO: show my error message (Other than numeric characters found or too few/many digits). If YES change the value of the field "Status" in the found record from "Inactive" to "Active"

I need to validate the input to ensure that the format is excatly 13 digits (EAN-13 barcode). The barcodes in Table_1 is stored in text format.

P.S. It would be nice to ask the user if the scanner returns only 12 digits: "Error! 1. Edit by keyborrd? 2. Add leading zero automaticly? 3. Cancel?

P.P.S. Please excause my clumsy english; it's not my native language.

  • Author

45 views in a couple of days, but no replies? I'm new here. Please advice me: is it a stupid question, is my english too clumsy ...? I can't believe that my problem is too difficult for the experts here :laugh: :help:

IN your fields table make sure you select validate and use 13 characters

if { Length(GetAsNumber( YOURFIELD::Data)) ≠ 13 }

then

Show Custom DIalog ,etc

End if

you can also add leading zero by using the left & or Right built-in function

It is not clear what your question is. Though there may be a little problem with your English, you have described a process that is understandable and for all we know, something you may already doing. What exactly is your question?

  • Author

Thanks, Jurneyman, that will be useful to me.

About my question: Hmmm, let med simplify it and try again:

I'm not already doing anything. My problem is: How to get starteded with this?

I want to have an input field to recieve 13 digits (EAN-13 barcode) by barcode scanner (a simple "pistol" model) or by keyboard

A function/script or what ever (I'm newbie) reads the value, performs a search in a barcode field in another table

If the value is found I want the content of another field in the same record to change from "Inactive" to "Active".

See if this can serve as a starting point for you:

EAN.zip

  • Author

Wow, this is really amazing. Now I'm going to merge it with Journeyman's control function and implement it in a slightly different shape for my needs.

For a newbie like me it was a bit of a challenge to analyze how it was made. I built a copy from scratch and it worked just fine at first, but when I got to the point where I had to figure out how the action itself (writing of "Current Timestamp") was released, I got at least 100 new gray hairs on my head. I could well imagine that it was a script, but under "Manage Scripts" there was only "New Script" which I assumed was an empty template and therefore took no notice of. When I eventually was ready for hospital wearing a cap with long sleeves occurred to me to open this script anyway and ... Viola!!

Many thanks for help with the task, but also for new knowledge and inspiration for resolving future tasks.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.