Newby question re lookup

I have two databases:

+ lots of other fields
+lots of other fields

I want to populate the field sessions:FullAddressSessions using data in the field clients:FullAddress on three occasions: when a new record is added in the sessions database, when an existing record is edited in the sessions database, and when some forms in the sessions database are opened.

The lookup produced by the Relational Workshop is:


so far so good.

But now I’m stuck. I do not know what to do with this lookup. Where does it go? Is it code to be connected with a field? Or is it a formula to be connected with a field? Is it a ‘form event procedure’? Or a different kind of procedure? I’m pretty sure it needs to be put into a variable before anything else - but I am unsure of the syntax for that as well,

Any help would be appreciated.

If you can wait until 10.2 is out, this can be done easily using the upcoming relational tools. There are ways to do it now, but they are more complicated.

Typically you would use the lookup formula in a Field > Morph… formula. Or you can do the same in a procedure with a formulafill statement. Example:

field FullAddressSessions
formulafill lookup(“clients”,«IDNO»,«IDNOsessions»,«FullAddress»)

Dryan, I’m still learning the “new” of PanX but the following, from Pan6 might work …
Sounds like you are asking about triggers - you know where the info comes from, you know where it goes, and you know when you want it to happen - so how to do the “When”.
If you want an action to happen when a record is added, you can create a procedure called .NewRecord Note the period at the beginning of the name. The actions you put in there - your lookup - will trigger when a new record is added.

Triggering an action when an existing record is edited is a bit trickier because that point in time is … fuzzy. You said “record edited” not “field edited”. So when do you consider the record edited? If you click into a field and out, but not change anything, is it edited. If you change a field, then change it back to what it was initially, is it edited? Do you expect one or more fields to be changed, then some “Do it” button is pushed so all the changes are “made real”? So you see - “when a record is edited” is not a clean as adding a new record. You can read up on “.modifiedrecord” or its equivalent in PanX, but I’m guessing your idea of when and what is changed such that you want to trigger your lookup is more precise than “when a record is edited”.

Triggering when some forms are open, like new record, is unambiguous. I don’t see an “open form event” in Pan6 but if you opened the from a menu selection or button push or other procedure, you could put your formula in that area. There is a “Form Event procedure” in PanX. Read about that and I’m guessing you’d put your action in there with PanX.