<inline>: Provides a method for making server-side inline callout programs that return multiple XML elements to the data capture form. It is like include method in any other anguage.

Syntax of  inline callout in Teamsite:

Example of inline callout in Teamsite:

The inline callout program should return a well-formed XML document. The document’s outermost element should be a <substitution> element. It should contain any XML that is valid according to datacapture.dtd. That <substitution> element will contain six <option> elements as follow

This simple callout outputs a static result. A more sophisticated callout program could query a database and return the query results as <option> elements. When a server-side inline callout program is executed, it inherits the following  environment variables:„

  • IW_DCT: The server-inclusive vpath to the datacapture.cfg in use (for example, //servername/default/main/development/WORKAREA/username/templatedata/press/events/datacapture.cfg).
  • „IW_ROLE: The role of the current data capture user (for example, editor).
  • IW_USER: The domain and full user name of the current templating user (for example, domain\username).
  • „ IW_WORKAREA: The vpath to the current workarea (for example, //servername/default/main/development/WORKAREA/username).

The exit status from a server-side inline callout should be 0 to indicate a successful execution. Normally an inline callout should not return a non-zero value. However, an example where a non-zero value may be needed to indicate an error condition is if you are populating a <select> menu by making a database query and the database is offline. Rather than displaying a form with no choices, you may prefer an exception be displayed.

Calling Perl file Using inline command:

Here first we need to pass the commnad that execute the perl file code and second is the path to the perl file to be executed. Perl file should return well-formed XML as per above example. Perl file can return any number of example.

Getting passed parameter value in perl variable:

You can set first parameter value to perl variable as follow

Second Parameter as

Like this you can get any number of parameter passed using $ARGV.

You can get IW Home, IW Mount, Current Workarea path and DCT Path as follow:

You can extract Server, Store, Branch, Workarea name, Category and Datatype in one line code as follow:

Please comment if this information is useful to you or any you have any queries.