find channel(a,b,[c,d])

This function returns the ID of a partner channel that has an additional ID with name a and value b.

If the optional parameter c is set, the search will be restricted to partner channels of a given type.

If d is true, the search will be restricted to active channels only.

If no fitting channel is found, an empty string with set Empty Flag will be returned.

Parameters


Parameter

Description

a

Name of the additional ID.

b

Value of the additional ID.

c

(optional) Type of the partner channel to restrict the search. Default: No restriction. Note: Use the three dots to select a value.

d

(optional) "true" if only active partner channels should be used. Default: "false".

Examples


The partner channel administration should contain two partner channels for partner Lobster with the following attributes (simplified).


Partner channel ID

<Partner name>:<Channel name>

Channel type

Active?

1

Lobster:FTP

ftp

true

2

Lobster:AS2

as2

false

The following additional references are defined.


Partner channel ID

Name of additional ID

Value of additional ID

1

customerid

4711

1

accountno

12345

2

customerid

4712

2

accountno

23456

This will lead to the following results.


Parameter a

Parameter b

Parameter c

Parameter d

Result

customerid

4711

ftp


1

accountno

23456

as2


2

customerid

4712

ftp


(Empty string with set Empty Flag.)

customerid

4713

ftp


(Empty string with set Empty Flag.)

customerid

4711

ftp

true

1

customerid

4712

as2

true

(Empty string with set Empty Flag.)

You can, for example, store the result in system variable VAR_SYS_CHANNEL_RESPONSE[1..n] (see explanation there) to exchange the channel of a Response. Note: See also VAR_SYS_TRIGGER_CHANNEL_ID for exchanging time-driven Input Agents.