pradeep Posted October 17, 2001 Posted October 17, 2001 This must be simple to do but I just can't figure it out.I have 2 realted files related by Id.Its one to many realtionship.A has got one product code and B has got many products with that product code.I want to set a field from the last product of B into a field in Product A.How do I do this. Thank You
LiveOak Posted October 18, 2001 Posted October 18, 2001 I'd probably do this with a script. Pass the contents of the field in the last record of file B using a global field in file A. How to access a global field in file A from file B? Create a field in both file A and File B: Constant (calculation, number, indexed) = 1 Create a field in file A: gTemp (global, text or number) Create a relationship in file B: ConstRel with Contant (file <--> Constant (file A) Then create a script in A: Allow User Abort (off) Set Error Capture (on) Perform Script (external, file B, "Get Field Script") Set Field(YourField, gTemp) Create a script in B called "Get Field Script": Allow User Abort (off) Set Error Capture (on) Show All Records Go to Record/Request/Page (last) Set Field (ConstRel::gTemp, YourFieldInB) -bd
Recommended Posts
This topic is 8505 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