AddDistributionOption method: ProcessRequest class

Syntax

AddDistributionOption(DistIdType, DistId [, JobName] [, PrcsItemLevel] [, JobSeqNo] [, ItemJobSeq])

Description

Use the AddDistributionOption method to set the distribution options for any job item in the main job. Distribution options enable you to distribute output in different formats (HTML, PDF, Excel, and so on) to other users based on their user ID or role ID.

This function is valid only if the output destination for the request is routed either to Web or Email.

Parameters

Parameter Description

DistIdType

Specify the distribution ID type as a string. This identifies if the value passed in the DistID is either a user or role. Values for this parameter are:

  • User

  • Role

DistID

Specify the distribution ID as a string.

JobName

Specify the name of the job that this item belongs to as a string.

PrcsItemLevel

Specify the job item's process item level within the main job as a number.

JobSeqNo

Specify the job item's job sequence number within the process item level as a number.

ItemJobSeq

Specify the job item’s sequence within its parent job as a number

Returns

Returns a number: 0 if successful, 1 if system detected an error in the parameter passed.

Example

The following example grants access to the QEDMO user all reports in MULTIJOB from the Web, while users with role of MANAGERS have access to reports created in the BIJOB03 job.

&RQST.SetOutputOption("Web", "PDF", "");
&RQST.AddDistributionOption("User", "QEDMO", "MULTIJOB" );
&RQST.AddDistributionOption("Role", "MANAGERS", "BIJOB03");