Post in Field Properties Code

I have 2 databases running in parallel - one contains every cow I’ve ever owned, and the other contains the cows still alive and in production (a subset of the first database). Many of the fields in the 2 databases are different, but a few core fields are the same. Because I want to be able to select and sort these fields in either of the databases, I felt that using the lookup function to display the information between databases wouldn’t be practical. Therefore, I am trying to set up field property code, to post changes made in one database to the same field in the other database.

This is my code:

post "updatesave" ,"Cattle Database-Active 3","Unique",Unique,"Prefix",Prefix

When I have this in the code section of the Field Properties panel, I get an error message saying “Missing parameter in Post.” When I put the same text into a procedure through the menu, it runs, but is changing a record either side of the one that should (I thought) have been the matching record.

I don’t understand what is happening in either case. Any help/suggestions?

PS: I thought I did the 4 spaces for the code to look different, but not sure that worked??

In playing around with this in two simple databases, I am seeing that the post statement dose not appear to work from within a field’s code property routine (nor from a .modifyRecord routine). I further notice that the code in a field property runs after the user indicates exiting the field (via tab, enter, etc) but before the field’s edit box closes, so I’m wondering if the open field edit box creates some kind of conflict internal to Panorama.

In my simple test databases I do not observe the incorrect record being updated that you are additionally describing.

So I’ve stopped trying to put the procedure in the field code, but am using a call statement.
It’s no longer altering an adjacent record (for no apparent reason, even though it reproducibly did it last night).
However, if I just use the post statement, its returning an error to say there was no match (at the bottom of the procedure, not as a message type error statement) OR just not doing anything. I tried to test what was going wrong, by checking the values that were meant to match, with the following code:
local a
alertsheet Unique
a=lookup(“Cattle Database-Active 3”,Unique,Unique,Unique,"")
alertsheet a
post “updateall”,“Cattle Database-Active 3”,“Unique”,Unique,“Prefix”,Prefix

and not only do the messages match as they should, but the data is posted correctly. If I remove the lines above the post statement though, it stops working again!!!

Panorama X will always show an error this way if the procedure window is open.

I wonder if you are running into this previously reported bug.

Certainly sounds similar. I am getting the impression that the post command is generally a little erratic. I’ve now switched from my Panorama 6 to Panorama X cattle database, and I’m sometimes finding odd things turning up after running a procedure containing the post command (which previously worked fine in testing). I think I may have to go back to the old leave one database enter another approach, until it is a bit more reliable.

Any thoughts on a timeframe at this stage???
Would the plan in the long term be for the post command to work out of a Field Property Code?

Also another question about stability. As I’m using the database more, I’m having issues with it getting stuck and freezing, particularly while working with a text list, with several search fields attached, and database navigation. Sometimes it will work for 15 minutes, other times it will work for 1 minute. In Panorama 6, when it went crazy and wouldn’t open, I’d open the programme as a data sheet only (as per your suggestion Jim), which would seem to ‘wipe the silliness’ out for a while. Is there any similar options for Panorama X?

Of course. From David’s research it sounds like the problem might be a bit more universal than just the post command.

Yes, you can open just the data sheet from the Special Operations Menu in the Find & Open dialog.