spankalee Posted September 24, 2002 Posted September 24, 2002 Hi, I have a field called Placed that looks up its value from a parent database. When the value of the related record in the parent DB changes I want the value of Placed to change. I'd use a caculation, but Placed is used to caculate a match field, so I need to be able to store and index it. The value of Placed is a boolean, so I decided to make a button that called a script to toggle the value and then call Relook Content to refresh the children. The lookup happens fine, initially, but all Relook Contents attempts fail, whether through a script or from the Record menu. If I hilite the Placed record in the child and choose Relookup, I get an error thaty says: There are no fields that lookup values based on the field "Placed". I also get this eror if I hilite the Placed field in the parent file, and I get it from the script. I've tried calling Relookup from the script in the parent file, as well as putting it in a script in the child file and calling that sript from the parent. Nothing works. The documentation of script steps is very lacking, so I can't exactly how I should be using it. Can anyone help me on this? Thanks, Justin
BobWeaver Posted September 24, 2002 Posted September 24, 2002 In the relookup, you need to specify the field that is used in the relationship on which the lookup is based, not the field that is getting refreshed.
spankalee Posted September 24, 2002 Author Posted September 24, 2002 I've tried that, and I still get the same error. Here's the first version of the script I wrote: Set Field ["Placed","if(Placed,"No","Yes")"] Relookup Contents ["Placed"] It toggles the value fine, but gives me the error. I've also tried Relookup Contents ["Order In Items::Placed"] which doesn't give me an error, but doesn't relookup the value either.
BobWeaver Posted September 24, 2002 Posted September 24, 2002 Which fields is your relationship based on?
spankalee Posted September 25, 2002 Author Posted September 25, 2002 Orders In and Orders In Items both have an OrderID field, I have relationships in both directions based on that field.
BobWeaver Posted September 26, 2002 Posted September 26, 2002 Then you need to do your relookup on the OrderID field Relookup[OrderID]
Recommended Posts
This topic is 8165 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