FieldLookupButton Template (ABC) - Error: File Lookup needs a key to perform a Pre or Post-Edit lookup


I have a problem with FieldLookupButton Template. When I add button in the window, and in the Extensions I set up entry field in the Trigger an Entry Control Lookup, I get an error message: Error: File Lookup needs a key to perform a Pre or Post-Edit lookup.

In the Embeds, in the section ControlEvents -> ?EntryField -> Accepted, after Generated Code the template has generated:

       = FILE:Field    ! From Entry
      IF SELF.Run(0,SelectRecord) = RequestCompleted       ! Call lookup procedure and verify RequestCompleted
        FILE:Field = 

I have found in the help file section about this template, but it is only explanation how template works. I can not understand what I need to do to, so that template understands what key to use, and to completes correctly code.

Thanks in advance for any kind of help.

Sounds to me like you have a lookup on a file that you haven’t selected a key. Or you have deleted the for that.

The fieldLookupButton refers to a field that you have set the action to lookup. Look to that field you have selected to fix this problem.

1 Like

You specify the Key (and more) in that ENTRY Field Actions.

E.g. the Button next to Majors says ?STU:Major is the Entry Control


The Major Entry Actions has the Key:



Thank you all for reply.

@CarlBarnes thanks a lot for screenshots. That helped me a lot.