September 24, 200223 yr 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
September 24, 200223 yr 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.
September 24, 200223 yr Author 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.
September 25, 200223 yr Author Orders In and Orders In Items both have an OrderID field, I have relationships in both directions based on that field.
Create an account or sign in to comment