Salesforce

Link Properties (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Link Properties (Magic xpa 4.x)

The Link properties define how the link is evaluated for the Link definition.

The Link properties are listed below:

Property

Description

Index

Identification number of the index.

The link between the Main data source and the linked table is executed according to the Linked data source index segments. It is important to use an index that corresponds to the Locate criteria that you use in order to shorten the search time of the linked record.

From the Index property, zoom to the Index list to select the index for the link.

Once you have selected this property, Magic xpa automatically creates a set of variable entries (column, virtual, or parameter), one for each segment of the index, between the Link and End Link operations.

Only a unique index can be used between the main and linked file, a many-to-one relationship.

Condition

Defines the Link condition. The options are: Yes, No, or an expression that evaluates to True or False.

If the Condition value is Yes or evaluates to a True value, the Link operation is executed.

If the Condition value is No or evaluates to a False value, the Link operation is not executed.

When the Link operation is not executed or fails:

  • All values of the Link operation’s selected columns return to their default values.

  • The Success Indication value is False.

If the Link condition is evaluated to False at the end of the Record Suffix, any modification is disregarded.

Data Source Number

The number of the data source to be used.

Data Source Description

Displays the data source name. You can change the name to better distinguish repeated occurrences of the data source name, but you cannot leave it blank.

You can use this property to specify the physical database that will execute the SQL Command. SQL Commands can be issued to only one database, and cannot refer to the repositories residing in two physically separated databases. You can obtain a data view composed of repositories in more than one database, by using Magic xpa’s built-in support.

Direction

This property specifies the direction by which Magic xpa scans the records in the linked data source in the specified direction.

The options are Default (for the order of the index) or Reversed (for the reverse order of the index). By specifying Reversed, you reverse the sequence of all scan operations for all Locate lower/upper and Range lower/upper expressions associated with the variable selections inside the link.

This property is enabled only for Link Query, Link Write, and Link Create operations.

If the link's Direction is different than the index segment's Order, performance will be slower, depending on the database.

Success Indication

Indicates whether the Link operation was successful. To retrieve the Link Success indication value, you need to set a Logical or Numeric variable in the property.

This property returns a logical or numeric value as follows:

  • True or 0 (zero) value means the link succeeded.

  • False or 1 (one) value means the link failed.

You can use the Success indication value to alert the end user when the link fails.

Note: If you need to perform a range on the variable set in this property, then this variable needs to be defined after the End Link operation.

Evaluate Link

This property determines whether the Link condition will be evaluated once before the entire data view is retrieved (task), or for each record (record).

Task – When this property is set to Task, the Link condition of the table is evaluated only once before the entire data view is retrieved.

Record – When this property is set to Record, the Link condition of the table is evaluated for each record.

See also: The Online and Rich Client Samples projects (DV21 and RDV21)

Access

The Access property is relevant only in a multi-user environment. This property determines how the repository is accessed by multiple users.

Use Read for Read Only access or Write for Read and Write access.

When adding a link to a program, it will be defined with the Access property set according to the link type:

  • Changing a link to Link Query, Link Join, or Link Outer Join will change the Access property of the link to Read.

  • Changing a link to Link Write or Link Create will change the Access property of the link to Write.

When performing APG to generate a program which should have links, the Access mode will be Read.

A special setting called SpecialLinkWriteAccess can be used to support behavior from previous versions (where the default was Write).

Limitations: For local data sources, this property is not supported and is considered as Write.

For more details on Access/Share mode, refer to Multi-User Deployment Considerations, Access/Share – XML and Access/Share – XML Runtime.

See also How Do I Access a Data Source for Read-only in a Task?

Data Source Name

Lets you create an expression that determines the physical name of the data source in runtime. If this property has no value, Magic xpa uses the data source name defined in the Data repository and designated by the selected value in the Data Source Number property.

The advantage of this property is that it lets you set different data sources with the same data structure. The expression used to determine the physical name of the data source will only be used if this entry was not already used to open a data source in an ancestor task. In such cases, the name set in the expression will be disregarded.

See also:

How Do I Set a Dynamic Name for a Data Source?

How Do I Open a Data Source Using a Physical Name that is Different than the one Specified on the Data Repository?

XML Source Variable

The XML Source Variable column is only available for XML sources. In this column you can specify a BLOB variable, through which you transfer the XML. The task will read and/or write to this variable.

You can zoom to the Variable list, which displays the BLOB variables of the current task and its ancestors.

Share

The Share property is relevant only in a multi-user environment. This property determines how other, concurrent tasks can access the table.

You can select the Read option to let other tasks have Read Only access. You can select the Write option (the default) to let other tasks have Read and Write access, which effectively locks the row. You can select None for no shared access, which means the table is locked.

The Access and Share combination is used to automatically determine the Open mode of the repository. Access Write with Share Write implies row locking, while Access Read and Write with Share Read implies table sharing. Share None implies exclusive use of the table.

See also Multi-User Deployment Consideration, Access/Share – XML and Access/Share – XML Runtime.

Open

The Open mode options are:

Normal – The Open mode for a valid table for all normal purposes.

Reindex – The Reindex Open mode is available only for ISAM databases. The Reindex Open mode instructs Magic xpa to drop all the indexes of the table when opening it, and process and rebuild the indexes upon session termination. Reindex Open mode is a performance-enhancing feature, for large table imports in Create mode, or for massive index value modification to a table. By removing all the indexes in sequential processing, Magic xpa saves the index-maintenance time normally required for every insert and modify index operation performed by the underlying database manager, such as balancing the B-tree in Btrieve. When the process ends, Magic xpa builds the index structure once for the whole table.

The Reindex Open mode depends on support by the underlying database gateway. Note that when specifying Reindex Open mode, if duplicate index values were entered in a unique index, the re-indexing process may give unexpected results. For instance, Btrieve simply aborts the re-indexing process. Other database gateways may skip the duplicate rows.

Cache

The Cache property is relevant for linked tables only. The setting of this property specifies if the linked table is cached or not. This setting should not be changed for the Main Source.

The possible settings are:

  • Yes – Use cache for the linked tables

  • No – Do not use cache for the linked tables

The default value is based on the Cache strategy in the Data Source Properties dialog box.

Note that for linked tables there is no meaning for Position Cache. Therefore the Position Cache setting is considered as No Cache.

The default setting is taken from the Data Source Properties dialog box as follows:

  • Yes – If Position and Data was specified in the Data Object Properties dialog box; or

  • No – If Position or None was specified in the Data Object Properties dialog box.

See also:

How Do I Reduce Database Access?

Identify Modified Row

You can have Magic xpa indicate the select rows that have been modified by another user, before updating your database.

Magic xpa can identify and select records according to the following options:

  • Position

  • Position and selected fields

  • Position and updated fields

  • As table

This property applies only for deferred transaction mode tasks and SQL or ISAM tables.

For XML sources, this column is set to As Table and is disabled. The file is set to Share = None.

See also Identify Modified Row – Multi-User.

How Can I Determine Magic xpa Behavior When Several Users Are Modifying the Same Row?

Related Topics

Reference
Attachment 
Attachment