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.

Linking to a long list..

Featured Replies

Hello everyone,

I've got a problem here that I just can't seem to solve. I have a database of things "A" that I'd like to choose something out of database "B" to link to it. Or, if thing "B" doesn't exist, create one and link the new one.

An example would be to link a Drawing number from a database of drawings to a part in a database of parts. There's something like 10,000 drawings so that would be too many for a popup.

I'd like the user to be able to just type in the drawing number he wants linked (looking at his part screen) and click a button to link the two.

At the time of the cilick I can see if the drawing exists or not. If it does, I just grab its ID, stuff it into the part record and I'm on my merry way. But if it does NOT exist I need to create one, stuff the user's typed in drawing number onto it, grab the new record's ID and add it to my part record.

But that can't seem to be done. How can I create a new record then grab something from it or edit it?

This was a problem for me with FM6 and now I just tried it on FM7 and still I can't figure out how to make it work.

Does any of this make any sense to anyone?

Help? Please?

Many thanks in advance!!

-jim lee

You could build a script that went to a search layout (say with your drawingID and the partnumber), did the search, and if there were no records found, create a new record. Then select the contents of the drawingID field and bring it back to the first window.

I just would point out that you might want to put some sort of secondary user check into the routine; user-input is notoriously unreliable. Maybe a search by part name or something...

  • Author

>You could build a script that went to a search layout (say with your drawingID and the partnumber),

>did the search, and if there were no records found, create a new record. Then select the contents of

>the drawingID field and bring it back to the first window.

This is what I'm trying. Its just the passing back of the ID from a newly created record that I can't seem to get. I know if I need to create-and-link or just link. Its getting the ID of the new one to pass back that has me stumped.

I played around with the attached file. Thanks millions for making that up for me. I'm -really- new to FM7 so I think I'm running into unknown territory that's throwing me for a loop. What is "accessible power"? Why do your new fields call themselves "Graphic" when they are added? How come your drawing layout looks like a standard layout in "Layout" and a table in "Browse"? I've never seen anything like this in my designs.. I must be missing out on a lot being self taught.

But.. This "commit changes", yet another script step I've never ran across before. This -may- be just the ticket. -IF- commit changes allows my script to survive after the new record is created, then the new record initialization routine can stuff the ID somewhere (like a global), I can grab it, and everything will be fine!

(Fingers crossed!)

Thanks again everyone!!

-jim lee

  • Author

That was just the ticket!

The "commit changes" forced the update of the values and Vola! Everything was fine.

Thank you all very much!!!

-jim lee

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.