Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Create a script in the second file that goes to the desired layout and then create a script in the first file that uses Perform Script [ External Script ], select the second file and the script in that file. Attach the script in the first file to the button you wish to perform the action.

Chuck

Posted

Thanks a lot,

but I have just one more question.

How do your import contents of a field to the new external file?

For example the Name field in old file is "John". I press a button to go to the external file (new file) and the NameFromOldFile field should automatically say "John".

Thanks,

J

Posted

There are many ways to do this, and the best way is going to depend on what the relation (not database relation) between the files is.

If they are related to each other, then a Set Field script step in one file or the other (depending on which is the one and which is the many, if either is half of a one-to-many relationship) should do the trick.

If they aren't related, then I would suggest creating a constant relationship (where the related field on both sides is a calculation set to 1) and push the data through this relationship via a global field.

If neither of those sound good, then there's always copy and paste. I tend to shy away from copy and paste because it disturbs the contents of the clipboard, which the user may have data in, but if you don't know how to work with relating the files, it would be a temporary and working solution.

Chuck

Posted

This is exactly what I mean.

In PO d/b, each record has a PO ID field. I press the button I made, then

I then get redirected to make an Invoice in an external file. That invoice will have one field that is the PO ID2 field that is the PO id from the record which it came from when I pressed the button.

Yes, they are related, but I'm only doing this to save typing. (I think for now)

Do you think the best way is global temp field? Because I tried to use a script to Set field (PO ID2, POfile::PO ID) in Invoice d/b. BUT it will not pull the POfile::POID info into that field. I based it on the relationship of POfile::POID = Invoice::POID2 in the Invoice d/b.

Help,

J.

Posted

I can't see how that can work. Your relationship is using the ID2 field but there is nothing in that field until you set it in the script. But you can't set it in the script because there is not a matching field.

Try setting up a relationship as Chuck suggests.

If you have only one record in the current set then another way to do it is to call a script in the Invoices file that imports the ID into the ID2 field. Then you can use the relationship as you describe and it should work. This is a method I sometimes use.

Posted

The easiest thing I did was to just copy that orginal field content into a global temp field. And then in the external file, I use Set field (field in this file to be the global field) inside a script!

This is good enough since I'm just basically cutting and pasting to reduce typing, although those fields relate.

Thanks anyway,

J

This topic is 8702 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.