How Unica Campaign uses the TempFlag column

Problem or error: What is the TempFlag column used for in the Unica Campaign system tables?

Solution: The TempFlag column is the mechanism for allowing the user to cancel without saving changes. Depending on the version of Unica Campaign, this column is found in different Unica Campaign system tables. For example, the UA_flowchart, UA_Segment, and UA_SummaryCube tables contain this column. The following values are used in the TempFlag column.

  • 1 - temporary
  • 0 - saved

When you create a Unica Campaign object and you begin configuring it, a new row is created with TempFlag = 1. At this point there is no row with TempFlag = 0.

When you save the object, a new row is created with TempFlag=0. Now there are two rows for the same record. The system uses these rows as follows:

  • All the changes made after the save are saved to the TempFlag=1 row.
  • If the operation is cancelled, the changes are ignored.
  • If the operation is saved, then the changes are first copied to the TempFlag=0 row. The TempFlag=1 row is deleted.