Xbasic Change Record

Description

The Xbasic Change Record action changes the contents of a record without opening a form or browse. The user does not have to be aware that changes are being made.

Procedure 

  1. Choose an operating mode from the Select Action list. The options are:

    • "Enter a new record"

    • "Edit an existing record"

    • "View existing record"

  2. Select the table that contains the record from the Specify name of Table to edit list.

  3. If you selected "Edit an existing record" or "View existing record" in step 1, make a selection from the Specify how Record to edit should be selected list. Otherwise, continue with step 8. The options are:

    • "By record number"

    • "By key value"

    • "By filter expression"

  4. If you selected "By record number" in step 3, enter the record number, or -1 for the last record, or an expression that evaluates to a record number in the Record number field. Optionally, click the 'x-y' icon button to open the Expression Builder.

  5. If you selected "By key value" in step 3:

    • 1. Enter an expression in the Key Expression field. This expression will be the same as used by one of the indexes for the table. It will reference one or more fields from the table and produce a value of the same type entered into the Key Value field. Optionally, click the 'x-y' icon button to open the Expression Builder.

    • 2. Enter an expression in the Key Value field. This is the specific index value that you want to find. Optionally, click the 'x-y' icon button to open the Expression Builder.

  6. If you selected "By filter expression" in step 3, enter an expression in the Filter Expression field. Optionally, click the 'funnel' icon button to open the Filter Builder.

  7. Click Add Fields to display the Add Fields to List Dialog Box and select the fields you want to update.

  8. Optionally, select a field in the Fields to enter/edit list and click Remove Field to eliminate it from the list.

  9. For each field in the Fields to enter/edit list, make a selection in the Update field to a list. The options are:

    • "Value specified now"

    • "Value contained in a variable"

    • "Result of an expression"

    • "Prompt at runtime"

  10. If you selected "Value specified now" in step 10, enter a value in the Value field.

  11. If you selected "Value contained in a variable" in step 10, enter a value in the Variable Name field.

  12. If you selected "Result of an expression" in step 10, enter a value in the Expression field. Optionally, click the 'x-y' icon button to open the Expression Builder.

  13. Optionally, check Include error checking code to include the Xbasic code to handle errors when opening the table.

  14. Click Next >.

  15. Optionally modify the comment that describes the action.

  16. Click Finish.

Limitations

DBF Desktop Only

See Also