Adding a field to another database

Is it possible for a procedure (.ModifyRecord) to add a field in another database? The way I was doing it doesn’t seem to work in Pan 6.

TIA
Sam

I just tested this with a .ModifyRecord procedure with this code:

setactivedatabase "DataBaseTwo"
addfield "Test"
setactivedatabase ""

After editing a field in the first database the DataBaseTwo had the new field “Test” added.

Gary,

Thank you, but I misspoke. I needed to add a new record, not a field; however, you may have answered the question anyway with the “setactivedatabase” procedure. I will investigate. thanks again

I figured you probably needed to add a new record instead of a new field – otherwise your second database would quickly have a LOT of fields. You should be able to just use addrecord instead of addfield.

By the way

setactivedatabase "DataBaseTwo"

is exactly equivalent to the old method in Panorama 6:

window "DataBaseTwo:SECRET"

The old method will still work in Panorama X, but I think setactivedatabase is nicer, and also you don’t have to remember what the original window was, you can just use

setactivedatabase ""

at the end, as Gary showed in his example.