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.

Featured Replies

Is it possible to make a new record in a second file and at the same time insert data from the first file?

I expect to get into trouble 'cause there's no ID-number for the first file to relate to.

Then the logical thing to do is to use the Set Field command to cover this.

Can anyone tell me whether this is possible?

------------------

Yeti

Just script the operation. Create a new record in the second file and use globals, a constant relationship, and set field functions to fill out the data. For that matter, you an set the key field and drive lookups for the rest. -bd

[This message has been edited by LiveOak (edited February 07, 2001).]

  • Author

Hey, that's weird. I thought I replied to myself telling that I solved the problem. With the Set Field Command:

Set Field ["projects::companyname";"companyname"]

Now I found out that a new record will only be made when there isn't another with the same related data (ID-number).

Let me explain: we want to be able to search for a record in the Adressfile and transport certain data to the Projectsfile. This works fine for the first time, but what if a new order is granted to us by the same person and I wanted to make a new Projectsrecord?

FM will see that there's allready a record there containing the same ID-number so I won't be able to make a new record in the related file for the second time.

Or is there a way to work around this? Can anyone tell me how to establish this?

TIA

------------------

Yeti

  • Author

Live Oak, thanks for your reply.

What do you mean by use globals?

A Global contains the same for every record in a file, doesn't it?

So why could this be helpful for me?

In other words: could you please specify your answer?

TIA

------------------

Yeti

That's correct. Globals can be used as temporary containers for data to be passed to another file. If you create fields defined as:

Constant (calculation, number, indexed) = 1

in both files and create a relationship based upon Constant <--> Constant (call it ConstRel), globals can be used to pass data. For instance:

In file 1:

Set Field (globalOne, Name)

Set Field (globalTwo, Address)

In file 2:

New Record/Request/Page

Set Field (Name2, ConstRel::globalOne)

Set Field (Address2, ConstRel::globalTwo)

-bd

  • Author

I'm sorry, but I get really lost here....

Do you mean that I have to create three files two accomplish my task?

As in: one Adressfile

one Globalfields-file

and one Projectsfile

Relate them together and: Presto?

Or do you mean that I have to set every field in the Projectsfile to being a global.

Or...or....I'm so sorry for not grasping what you're saying, but could you explain it to me one more time? Maybe in Sesamestreet-language?

------------------

Yeti

The fields globalOne and globalTwo are fields in file 1.

The constant relationship is really invalid for real data in records since all records in file 1 relate to all records in file 2. It usefulness is to allow access to global fields (which exist once per file, not once per record) created in file 1 from file 2.

Global fields are like data buckets. Walk over to file 1, dump data into global buckets (say 2 buckets in my example), walk over to file 2, create a new record, reach back to file 1 and pickup your data buckets (access the globals), and dump the first bucket into the Name field in file 2, and dump the second bucket into the address field in file 2.

You could jump back and forth using copy and paste (using the clipboard as a bucket), but sometimes other programs change the clipboard.

-bd

  • Author

That makes things a lot clearer.I'll go play around with this to make it work.

Thanks for yor reply and patience, LiveOak

  • Author

It works! Partly....

I followed your guidelines by the letter and I understand what I'm doing, which is more than I could say last week!

But (there's allways a but)??? I only get the data from the first record from my adressfile to show up in the projectsfile. I used the Omit Scriptsteps to filter out the record I want to "transport", but still only the first records data goes to Projects.

This would make sense without Omit 'cause FM allways gets the first record in line.

What do I do now. I know of no other scriptstep than Omit to filter out a record. It allways works, so why doesn't is now.....

------------------

Yeti

I think it's time you step back and tell us what the overall effect you are trying to accomplish is. I'll bet there is a much easier solutions. -bd

  • Author

Dear LiveOak, it helps me a lot to know that there are tutors I can turn to when I'm at a loss.

The good news is that I solved what I was trying to accomplish, using your advice and explanations.

Thanx a million!

------------------

Yeti

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.