Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6015 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

: I'm trying to extract certain bits of information stored on a membership card (control number) using a card reader so I can then do a lookup of name, address, etc. Currently, the info I see when I swipe the card is:

%cardholder's name ? ;0416463 ?

What I need is to be able to extract only the -046463 - and put it in a field. Does anyone know how to write the calculation ?

Posted

In FM9 the Filter function would make it easier. In FM6 you'd use other text functions:

Middle(text, start, numberOfCharacters)

Position(text, searchString, start, occurrence)

Is the portion to extract always the same number of characters? I used 7 below, but you gave one example with 7 and one with 6.

Middle( swipe; Position(swipe;";";1)+1; 7 )

Posted

in my opinion, this would be the least chancy calculation:

Left (Right (swipe ; Length (swipe) - (Position (swipe; " ? ;" ; 1 ; 1) +3)) ; Position ( Right (swipe ; Length (swipe) - (Position (swipe; " ? ;" ; 1 ; 1) +3)) ; " ?" ; 1 ; 1) - 1)

  • Newbies
Posted

I appreciate the help. The only problem is that I'm too new to FM and don't really understand the reply.

I tried to input the information you provided by received various errors like" field not defined", etc. So I would really need to know what fields need to be defined (and what type), and then what the calculation field to that reads the Card info.

I guess what I'm trying to say is: I need a lot of help on this.

Thanks for the reply - will continue to work until I can be it to read the data. Thanks again.

Posted

Well you need at least two fields - one would be a text field with the raw scanned input, and one a calculation field with the extracted portion. If the first field is named Input, then the formula for the second field can be =

MiddleWords ( Input ; 3 ; 1 )

The result type needs to be set to Text.

The other suggestions in the thread used the name "swipe" for the input.

This topic is 6015 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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