User-Defined Function Links Overview

The Linkage View displays all the calls and links to functions and Global Logics that are defined in the Caller Function or Global Logic. This view includes ‘soft links' to functions. A soft link is always set in logic and is determined by the contents of a variable. Note that PROIV does not allow soft links to Global Logics or Global Functions. If the acceptable values of the variable are known, then these can be displayed in the Linkage View via the User-Defined Function Links functionality, which may be very useful to you.

For example:

@LFUNCT = LinkFunctionName

where 'LinkFunctionName' is a variable containing the name of the PROIV Function that is to be linked to. If the values that 'LinkFunctionName' can accept are known, then it may be useful to define a link for each of them.

A further example is as follows:

@LFUNCT = @PFUNCT

@PFUNCT holds the name of the function that linked to the one with the logic statement. For example, if there were 10 functions that linked to, then it may be beneficial to display them explicitly in the Linkage View.

This feature may be particularly useful if function linkage is controlled by data in the application. Some PROIV applications make use of ‘router’ methods to control navigation, and therefore PROIV Developer has no knowledge beyond the name of the variable that is used to set the links.

Note: User-Defined Function Links can only be created or deleted using the @VIPAddUserLinkage and @VIPDeleteUserLinkage Global Functions, so performing a Linkage Rebuild (from the Linkage view) or a Bulk Linkage Rebuild (from the Tools tab) does not affect these links. However, the Import/Export and Function Backup/Restore processes automatically include User-Defined Function Links.

The two Global Functions that enable the User-Defined Function Link functionality are as follows:

@VIPAddUserLinkage

@VIPDeleteUserLinkage

You can call the above functions in a number of ways. For example, you can call them from a Screen function where the values are directly inputted or from an Update function that reads the values from a file.

The following table explains the parameters:

Name

Usage

Type

$FromObjectType

Specifies the Object Type. Valid options are:

FN - Function

GL - Global Logic

Mandatory

Input

$FromObjectName

The name of the function or Global Logic the link is from.

Mandatory

Input

$LinkedFunction

The name of the function that is linked to.

Mandatory

Input

$LinkDescription

Free text description.

When using the @VIPDeleteUserLinkage, if the $LinkDescription is supplied, then only that specific link is deleted, otherwise, all links to the specified function are deleted.

Optional

Input

$Error

Contains a value when a link was not added or deleted successfully.

This is to due either:

  • invalid or null object type

  • non-existent or null linked from object

  • non-existent or null link to function name.

(The parameter is blank if the link value is added or deleted successfully.)

Output

 

Creating an User-Defined Function Link

The following section contains an example of User-Defined Function Links with explanatory screenshots:

  1. The Linkage View displays all the calls and links to functions and Global Logics that are defined in the Caller Function or Global Logic. Click here to view a Linkage View example screenshot which displays a link to a function that is determined by the contents of a variable.

  2. Run the @VIPAddUserLinkage function using the following parameter values:

$FromObjectType - ‘FN’

$FromObjectName - ‘LinkageTest’

$LinkedFunction - ‘LinkFromLinkageTest’

$LinkDescription - ‘To demonstrate user defined links’

  1. Refresh the Linkage view for the 'LinkageTest' function. Click here to view a screenshot of the '$FromObjectName' links.

  2. Open the 'LinkFromLinkageTest' function in the Linkage View. Click here to view a screenshot of the $LinkedFunction links.  

Deleting User-Defined Function Links

Furthermore, to demonstrate that the User-Defined Function Links sets up the data at both ends. If you run the @VIPDeleteUserLinkage function using the following parameter values:

$FromObjectType - ‘FN’

$FromObjectName - ‘LinkageTest’

$LinkedFunction - ‘LinkFromLinkageTest’

The User-Defined Function Link is now deleted and refreshing the Linkage View produces the same result as in the screenshot in step 1.

Comment on this topic

Topic ID: 500604

 
 
 

Table of Contents

Index

Glossary

-Search-

Back