I previously posted regarding the mockup (below), but I have another question.
I’m testing a mockup in which I have two DBs, Target and Source, each with a key field, “id” (text). Source has another field, “sourceData” (Integer). Target a field, “targetField” (Integer).
What I’d like is to define targetField as a “calculated” field in which its value is the same as that in sourceData for the same id. (in reality the calculation will be something involving sourceData and several other fields inTarget, but this is just a test, so I’m keeping this simple.). sourceData may be updated by the user or even changed due to an import from a CSV file. So when these changes occur I want targetField to change.
I do have a procedure («Update Target») in Target that performs:
formulafill lookup(“Source”, id, id, sourceData)
for field “targetField” - it works.
I also tested having a “push” in Source using the “pull” operation above. This procedure has the one line:
farcall Target, “Update Target”
and that also works.
My question is: is there a way of defining targetField using the lookup so that I don’t have to include procedures? (In reality, I’ll be using DBs with many fields, and a number of them involve calculations similar to above, but calculations that involve many parameters, unlike the targetField example.)
I tried entering a formula in Field Properties of targetField, and also in the Code tab. These don’t work. So, does Panorama X have a way to attach a calculation to a field that automatically updates fields when data changes in the DB or in other DBs?