FileLocation

You can use this function for Optiva Workflows.

Purpose

Returns a path that is based on the entries in the File Location form.

Syntax


Dim variable As String = FileLocation(LocationType, LocationName[, UserCode, Default-Value])

Arguments

Part Description
LocationType Set type in the File Location form. For example, WEBREPORT is a commonly-used set type.
LocationName Name of the path. For example, XMLWORK for WEBREPORT has the path to the folder that contains XML files: C:\inetpub\wwwroot\FsWebReports\SESSIONXML.
UserCode User code for the path from the File Location form.

If you do not specify a UserCode, then the current user code is used. This function resolves the hierarchy of File Location entries returning the user-specific entry before a default entry in the form (@DFLT).

Default-Value String. Value to be used if no File Location entry is found for the LocationType or Location Name values that you entered.

Examples

This example retrieves the path to XML files. The path is specified in the File Location form for the set type WEBREPORTS with the name XMLWORK.


Dim fl As String = FileLocation("WEBREPORTS", "XMLWORK")
MessageList("XMLWork = " + fl)

This example retrieves a path to both XML files and RPT files. These paths are specified in the File Location form. The set type is WEBREPORTS. The name XMLWORK is the path to XML files. The name SOURCE is the path to RPT files.


sFilePathXMLWork = FileLocation("WEBREPORTS", "XMLWORK")
sFilePathSource = FileLocation("WEBREPORTS", "SOURCE")

xdTemplate.Save(Path.Combine(sFilePathXMLWork, "FSWB_Formula.xml")
ShellAPI("http://localhost/FsWebReports/Launch.aspx?p1=FSWB_Formula.xml

&p2=FORMULA&p3=pdf&p4=" & Path.Combine(sFilePathSource, 
"FSWB_Formula_Data.rpt"))

You can use ObjProperty instead of FileLocation to retrieve the same information.