SEARCH:

The Upsave

The UPSAVE is a very flexible and powerful way to move data around.

The UPSAVE was developed when I was working on a sports application that was receiving scores in real time. I wanted to record and keep the individual score lines as they came in, and at the same time to automatically update the master game row. The result was the UPSAVE.

An UPSAVE writes values to a parent table when some event occurs on a child table. There is a complete reference section on the upsave.

The UPSAVE is the only automation that lets the computer overwrite human-entered values and vice-versa.

This example shows how we allow users in a Medical Practice Management Package to save changes to patient information on a visit screen, and at the same time copy the same values back to the patient's permanent record:

table visits:
    #  various column definitions...
    column flag_upsave:
        suffix: _upsave
        description: Triggers upsave if Y   
    
    upsave topatient:
        # only fire if this column has value of Y
        column_id_flag: flag_upsave
        # set the flag back after firing
        flag_reset: Y
        afterins: Y
        afterupd: Y
        column first_name:
            retcol: first_name
        column last_name:
            retcol: last_name