The Big Bear Posted January 9, 2008 Posted January 9, 2008 Hi all I was under the understanding to you could push or pull information using the set field function. I have a table called printing and a table called information. I would like to run a script from printing that would set the set fields in the table printing from information stored in the table information. But the script does not work. I attached a file of what I am trying to do. Thanks in advance. Lionel setfield.zip
Raybaudi Posted January 9, 2008 Posted January 9, 2008 Hi you can't have access to the values of "Information" table because those values aren't global, neither those tables are related.
The Big Bear Posted January 9, 2008 Author Posted January 9, 2008 Related or not the set field command does not work when I try to run the script from the printing table. Lionel
comment Posted January 9, 2008 Posted January 9, 2008 Actually, the Set Field[] step DOES work. What doesn't work is the reference to fields from the other table. If the table were related, the reference would fetch data from the first related record. Since there is no related record, the reference returns empty - and that's what the field is being set to.
The Big Bear Posted January 9, 2008 Author Posted January 9, 2008 comment I related the tables and the set field does not work from the printing table. Is does not create a record or set the fields. Would you please review the file that I attached to see what I have done wrong. I would like to pull data from the information table to the printing table while in the printing table using a script written in the printing table using the set field command in this script. setfield.zip
Simon K Posted January 10, 2008 Posted January 10, 2008 Hi Don't want to step in on a thread (apologies Michael) but I have had a quick look and hope the following helps: Attached are two revised files. To make the script approach work: You should/(can)not use the serial number/primary key in "printing" as a "look up" field. You need another field - which I have called "serial number to look up" on which to base the relationship (which I have created and defined as global storage). For ease of use I have created a value list looking at "info" to get the possible serial numbers to display. I have added another record in "info" just so you can see this working. But... Its really unlikely to be the way to go, ie it is unlikely that there is a good reason for copying this sort of data into the printing table. - just to show you what I mean I have placed the same fields as you had before, but now coming from the "info" table occurrence within the "Printing" file. HTH SETFIELDEXAMPLE2.zip
The Big Bear Posted January 10, 2008 Author Posted January 10, 2008 simom Thanks will give it a try Lionel
comment Posted January 10, 2008 Posted January 10, 2008 I agree with Simon that the process makes litle sense. Records can be printed from their original table - what's the point of having a separate table (let alone a file) for printing? In any case, "to pull data from the information table to the printing table" you need to specify which record to pull from - as shown in Simon's example.
The Big Bear Posted January 10, 2008 Author Posted January 10, 2008 thanks for the help and the advice Lionel
Recommended Posts
This topic is 6163 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 accountSign in
Already have an account? Sign in here.
Sign In Now