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.

Underscore same as space in relationship. Mismatched keys

Featured Replies

Hi all,

I have encountered a strange problem in my process of migrating existing FM6 files over to FM8.

The previous developer, in FM6, had created a relationship from one file to another keying from FileA global text field to fileB indexed calculation field with text results. Everything works in FM6 but in FM7 and 8 it does not.

So I did a lot of tracing and I have isolated the problem to very poor design (the whole thing is a mess to be accurate and they wont let me redesign it). Anyway, the previous guy made it so that in File A the data in the global key field would have something like:

03-001 Strange Occurance Project

And on the child side File B, there are three fields:

Project number

Project Name

and a calc field that concats the two other fields with an underscore. Basically resulting, 03-001_Strange Occurance Project

Now I would never have something like this act as keys; with the parent having spaces and the child having underscores. So I understand why it doesnt work in 7 and 8 because of the key mismatch.

My QUESTION is why does FM6 allow this???

This is stupid. Now I have to figure out how I am going to have to examine all these relationships (and there are hundreds of them) to see if these kind of mismatched keys are used just because of poor design.

I have attached a sample copy of the FM6 files to demonstrate what I am talking about. It is baffling to me.

underscore.zip

  • Author

bump.

anybody have any ideas?

I don't remember this specific change, but there were several changes to the way FM7/8 indexes words vs. prior versions. I think this was covered in the Migration Foundations & Methodologies brief. It may have been a discussion about value lists or the leftwords(), rightwords() functions, but your case seems to indicate it applies to matching in relationships as well.

Apparently, FM5/6 does not treat the underscore as a character in the index.

  • Author

Thanks Ender.

I knew that indexing had changed in FM7. I guess I didnt realize until now that the underscore had previously not been an indexed character in prior versions.

This is really interesting. I could have sworn I'd seen a list of (new) word separators but can't find it anywhere. 'Converting from Previous Versions' makes a very brief reference to Left/MiddleWords etc. and mentions that hyphen is now (V7-8) a word break. I checked earlier documentation and it appears that this is one of those vague FMP areas where the full specs were never spelled out.

The new Help simply says that & and - denote the beginning of a new word. Interestingly, my old V5 manual specifically says to use underscore (_) in place of spaces in field names to "avoid restrictions in ODBC ...".

You have my sympathy. :therethere:

Comment posted about it here which is probably the one you're thinking of.

But since the parent is a global it would be easy to change, I would think; although it sounds like you have more than one possible mismatch here. Why in the world include the name in the key - that's what IDs are for. I also sympathize ...

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.