Linking to a file in a specific IPV

You can use PiForce to create a link from a widget to download a file in a specific IPV. This can be useful when you want to link to a specific release of a file, for example when you are referencing Release Notes. These links work with the following widget types:

  • Button widget

  • Tree widget

  • Text widget

  • Table widget

  • List of links widget

Define the PiForce file links

Use the following fields to define the PiForce file links in the widget definition.

Field name Required? Description
path Required Full repository path to file.

If IPV FQN is provided, relative path to file can be used.

(See Define the repo file path or relative path for more information.)

fqn Optional IPLM uses this to determine the repo path and file version if it is not provided. Must be an IPV.
version Optional Can be used to override the IPV file version (if IPV FQN provided) or the default #head file version (if no IPV FQN provided).

(See File version assumptions for more information.)

text Optional Link text to display, if not provided show full file path in repo.

Define the repo file path or relative path

The repository path of the linked file can be defined in one of two ways:

  • The full repository path to the file.

    for example: //mdx_test/tutorial/tutorial/TRUNK/hw_code/test/test.v

  • A combination of the IPV FQN and the relative path in the IPV repo_path:

    The repo_path is retrieved from the IPV FQN and concatenated with the relative path specified.

    for example: IPV FQN "tutorial.tutorial@6.TRUNK" plus the relative path "hw_code/test/test.v"

Define the linked file version

The file version of the linked file can be specified using a subset of the Helix Core file version specifications. Supported specifications include:

Specifier Name Description
#n Revision specifier nth revision of the file
#head Head specifier Latest revision of file
@n Changelist specifier Revision of file in the changlist number 'n'
@labelname Label specifier Revision of file at the label 'labelname'

File version assumptions

Is fqn provided? Is version provided? File version used
N N Uses latest checked in version (default P4 behavior)
N Y Uses specified file version
Y N Uses IPV release file version
Y Y Uses specified file version (overrides IPV)

Link syntax examples

Example 1 – FQN, relative path, and file version provided

This example shows using the FQN, which provides the top portion of repo_path, plus a relative file path to locate a particular file. The file version is overridden, so instead of the released version, the ‘head’ p4 file version is specified. The link text is set to Download Checklist. The link is set on a button type widget.

pi ip attribute set tutorial.tutorial@1.L1 Button '{"display": "button", "data": { "p4": "<p4-file-link fqn=\"tutorial.tutorial@1.L1\" path=\"/docs/hw_design/blg_checklist.xlsx\" version=\"head\"> Download Checklist </p4-file-link>" }}'

Example 2 – Full path and changelist number provided

This example shows providing a full file path plus a change list number to locate a particular file. This managed file may or may not be part of an IP.

pi ip attribute set tutorial.tutorial@1.L1 Button3 '{"display": "button", "data": { "p4": "<p4-file-link path=\"//mdx_test/tutorial/tutorial/L1/docs/hw_design/blg_checklist.xlsx\" version=\"@1\"> Download Checklist </p4-file-link>" }}'

Example 3 – FQN and relative path provided

This example shows using the FQN, which provides the top portion of repo_path, plus a relative path to locate a particular file. The file version is not specified so the version corresponding to the FQN release is used.

pi ip attribute set tutorial.tutorial@1.L1 Button5 '{"display": "button", "data": { "p4": "<p4-file-link fqn=\"tutorial.tutorial@1.L1\" path=\"/docs/hw_design/blg_checklist.xlsx\" > Download Checklist </p4-file-link>" }}'