Post Operations

Description

A guide to performing post operations and to using the post genie.

Overview of Post Operations

The Post operation takes field-values from records in the transaction (source) table and uses them to replace, add to, or subtract from field-values of records in master (destination) table. If the master table is a set, you can only update field values contained in the parent table. For example, you have a master table in which you keep the total amount of expenses for each department in your company. You also have a transaction table in which you store the individual expenses as they occur.

images/atable14.png

By using a Post operation, you can post these transactions to the correct records in the master table.

images/atable15.png

Furthermore, you can update one or more fields in the transaction table, letting you keep track of which records have already been posted.

Post operations cannot post to a memo field, or use the memo field as a source for a posting operation.

Performing a Post Operation

  1. Display the Operations tab of the Control Panel.

  2. Click New.

  3. Select "Post Operation" from the Select operation list.

  4. Select the master table (which receives the updates) from the Select Table/Set list.

  5. Click Create to display the Post Builder dialog or Create Using Genie to display the Post Genie (see Using the Post Genie ).

    images/Post_Builder.gif
  6. Specify the name of the transaction table (which sends the updates) in the Transaction table field.

  7. In the Master Linking Key and Transaction Linking Key fields, enter the appropriate linking key expressions.

  8. You can select the records from master table or the transaction table, by filling in filter expressions in the Master Filter and Transaction Filter boxes. For a record to be selected, the filter must evaluate to TRUE.

    • Specifying Master Table Update Criteria

      Use the Post Settings Table at the bottom of the Post Builder to specify update criteria for the master table. Before setting these criteria, make sure the Master radio button is clicked; make sure the Transaction radio button is clicked when filling in the update criteria for the transaction table.

  9. To specify the update criteria, select a field to update in the Field column's drop-down list box. In the Operation box, choose the manner in which you want to update the field. You can choose to "Replace", "Add", or "Subtract".

  10. In the Expression column, enter a field or an expression that uses fields from the transaction table. You can choose a field from the Expression column's drop-down list box, or you can choose "" to open the Expression Builder.

  11. You can further refine the criteria by entering a filter expression in the Condition column. If the expression evaluates to TRUE, the operation specified in the row is performed, if it evaluates to FALSE, the row is ignored. You can fill in as many update rows as you want.

    • Only Replace operations are meaningful when dealing with character data.
    • Example of Master Update Criteria

      Suppose you have a transaction table that keeps track of individual sales and has a field called Sale_amount, and a master table that keeps track of total sales by department and has a sale called Total_sales (as in the example at the beginning of this section). To add values from the Sale_amount field to the Total_sales field, you can fill in the table as follows:

      images/atable16.png
    • Specifying Transaction Table Update Criteria

      By specifying update criteria for the transaction table, you can keep track of which records have been posted. When specifying these criteria, make sure that the Transaction radio button is clicked.

      images/Post_Builder_2.gif
    • To specify Transaction update criteria:

  12. In the Case column, select the condition under which you want the transaction to occur. You can select:

    • "Posted" = means that the record was successfully used

    • "No-match" = indicates that the transaction-record does not match a record in the master table

    • "Violated" = means that the transaction-record matched a master record, however the operation conflicted with one or more of the master table's Field Rules, and thus was added to the Violated table.

  13. In the Field column, choose the field from the transaction table that you want to update.

  14. In the Expression column, enter either a field name or an expression, the value of which will be inserted into the field you selected in the Field column. (The expression may use fields from the master table.) Fields can be chosen from the Expression column's drop-down list box, or you can choose "" to use the Expression Builder.

  15. You can further refine your criteria by specifying a filter expression in the Condition column. For the update specified on the row to occur, the expression must evaluate to TRUE.

  16. Click the 'lightning' icon to run the operation.

Example of Transaction Table Update Criteria

Suppose you have a transaction table that has a field called Posted, and you want to set the value of this field to TRUE if the record is posted to the master table (as in the example at the beginning of this section). To update the Posted field, you can fill in the table as follows:

Operation
Expression
POSTED

.T.

Using the Post Genie

  1. Click Next > to continue.

    images/UG_Post_Genie_1.gif
  2. Enter the name of the Transaction table.

  3. Click Next > to continue.

    images/UG_Post_Genie_2.gif
  4. Enter values in the Master table and Transaction table fields that specify how Alpha Anywhere should determine matching records.

    images/UG_Post_Genie_3.gif
  5. Optionally, click Advanced Options to display the Advanced Options dialog box. This allows you to enter a Filter expression that will cause Alpha Anywhere to check only a subset of the records in the master table for matching records.

  6. Click OK to continue or Cancel to discard your inputs.

    images/Post_Genie_Advanced_Options.gif
  7. Specify a posting rule.

  8. Optionally, click Add New Rule to create another posting rule.

  9. Optionally, click Delete Rule to remove a posting rule.

  10. Click Next > to continue.

    images/UG_Post_Genie_4.gif
  11. If you clicked the Selected records radio button, make a selection from the list box.

  12. Enter the filtering (a logical expression ) and ordering (a character expression ) criteria required by your choice.

  13. Click Next > to continue.

    images/UG_Post_Genie_5.gif
  14. Indicate whether you want to update a record in the transaction table when it is posted to the master table.

  15. Click Next > to continue.

    images/UG_Post_Genie_6.gif
  16. If you selected Yes in step 14, enter the names of the Fields to Update and the Update Expressions to use. Optionally, display the Violated and No Match tabs and enter corresponding information.

  17. Click Next > to continue.

    images/UG_Post_Genie_7.gif
  18. Indicate whether you want to run the operation now, save the operation and then run it, or view the settings of the Post Card.

  19. Click Finish.

    images/UG_Post_Genie_8.gif
  20. If you selected Run the Post Record operation now, (but first save the definition for future use), the Save post settings as... dialog box will appear.

  21. Enter the name of the operation into the Name field and click OK.

  22. If you selected Don't run the Post operation now, just show me how the genie has filled in the Post card, the Post Card will appear.

  23. Optionally, click Save to display the Save post settings as... dialog box.

  24. Enter the name of the operation into the Name field and click OK.

  25. Optionally, click the Run button on the toolbar to run the operation.

Limitations

Desktop Applications Only

See Also