Wallstreet Suite

These keywords are specific for Wallstreet Suite (primarily the TRM module).

Wallstreet Suite Keywords

KeywordDescriptionArguments?Start Function?Target Objects?
*QueryDeclare a query:white-check-mark::white-check-mark:
*CreateCreate new main entity using the current factory:white-check-mark:
*QueryOrCreateDeclare a query and create a new entity if the query returns an empty result.:white-check-mark::white-check-mark:
*ApplyApply (or Commit) an entity:white-check-mark:
*FlowChange the status of objects. Use "a" for ACCEPT and "r" for REJECT. For any other specific actions, use double quotes to quote the action name, i.e. “ACCEPT-ORDER”:white-check-mark:
*SubentityFetch all subentities of the given type. This keyword needs to work together with *Filter if necessary:white-check-mark:
*CreateSubentityCreate a Static Data subentity. To be used in StaticData service only:white-check-mark:
*QueryOrCreateSubentityQuery a certain type of subentity and create a new one if the query returns an empty result:white-check-mark::white-check-mark:
*CommandDeclare a command on objects:white-check-mark::white-check-mark:
*FactoryCommandDeclare a command on entity factory:white-check-mark::white-check-mark:
*UpdateUpdate values on a Static Data subentity. To be used in StaticData service only:white-check-mark::white-check-mark:
*RemoveRemove a Static Data entity. To be used in StaticData service only:white-check-mark:
*RemoveSubentityRemove a Static Data subentity. This keyword should be inside *Subentity block. To be used in StaticData service only.:white-check-mark:
*StatusCommandUsed to execute a status command (set status) on transaction. To be used in Transaction service only.:white-check-mark:
*DuplicateDuplicate a Static Data entity or subentity:white-check-mark:
*NextUsed by a command having several steps. Must be inside Command or FactoryComand:white-check-mark::white-check-mark:

Query

The keyword *Query is used for querying on different entity types. The functionality is similar to that in the Wallstreet Suite applications. For the Transaction service, it queries for transactions, while for the StaticData service, the main entity to be queried has to be specified under the [entity_type] option in the service header. For the EntityBoard service, the main entity to be queried has to be specified under the [view] option in the service header. For example, when querying in the Hedge Manager application, the view “hedge-manager” must be provided.

*Query can take as many arguments as needed, where each argument is one query parameter. Query parameters are combined with an AND logic, while the OR logic is only available for transaction queries. To use OR queries, arguments must be typed in the format [<field name> (<index>)] where index is an integer value. The arguments will then be grouped by these indices and the relation between the groups is OR.

854

Column E contains the first group of parameter (number) and columns F and G contain the second group of parameters (number and portfolio_id).

Query Results as Target Objects

The objects returned from queries are usually sent as target objects to other functions within the query block. For example, a query block may contain a command function so that the query first looks for the particular entity, which will then be the target object of the command function.

🚧

Using *Query within *Query is not recommended as the results from the first query will be lost. If doing so is necessary, another *Query must be added afterwards if you wish to retrieve the previous results.

Create

The keyword *Create is used for creating new entities. For the Transaction Service, it creates new transactions, while for the StaticData service, the type of the new entity must be specified under the [entity_type] option in the service header.

Arguments are not required in this function when using Wallstreet Suite v7 and later. Instead, in most cases, the keyword is followed by a field sequences that set values to the new entity.

QueryOrCreate

The keyword *QueryOrCreate allows users to first query for the existence of an entity before performing actions on it. If the required entity does not exist, then it will be created. It is only available for the Transaction and StaticData services. The keyword first runs a query with the given parameters, and if an entity is returned, it passes that entity to further functions. If the query returns an empty result, a new entity will be created with the given parameters. The function stops if the query returns more than one entity.

Below is an illustration of how to check the existence of a client before updating its values, where the parameters are found in cells E30 to H30.

855

📘

The keyword *QueryOrCreateSubentity can be used to execute the same action for subentities.

Apply

The keyword *Apply/ has the same function as the “Apply” button in Transaction Board, “Save” button in Static Data Editors, and “Add” in subentities. It is used after setting values to entities and subentities in order to commit the new value into the system.

Flow

The keyword *Flow/ has the same function as the “Commit” and “Accept” buttons in WSS that pushes entities through their flows. The common values used for this keyword are multiples of “a” to accept an entity and “r” to reject. States may also be added as suffix in the form of “-State” in order to push the entity until that particular state. This is useful when the user does not know exactly how many “Accepts” are needed to reach a state.

For example, when pushing a new transaction to Final, instead of giving “aa”, the user can have “aaaaa-Final”, which means accept five times but stop when the state is Final. Several states may also be used to accept or reject until one of the states is reached. For example “aaa-Send|Final” means accept three times until the state is either SEND or FINAL. The figure below illustrates these different *Flow configurations.

990

For special actions such as ACCEPT-ORDER, type the action name within quotes instead of using “a” and “r” (e.g. “ACCEPT-ORDER” (including quotes)). It is possible to use several user defined actions, for instance, “ACCEPT-ORDER””ACCEPT-ORDER”.

Subentity

The keyword *Subentity is used to get subentities on from the current target entity (for example, cashflows on a transaction). It does not take any arguments. The type of the desired subentity should be declared in the data cell under the keyword.

📘

All subentities of the desire type will be returned from the function.

CreateSubentity

This keyword is used to create a new subentity on the current entity. It is available only for the StaticData service. After creating a new subentity, both the new subentity itself and the main entity should be committed by using keyword *Apply/.

918

Example that creates a new Client Account on the queried client. Note that *Apply/ in column M is for the subentity (new account), while *Apply/ column O commits the entity (client).

Command

The keyword *Command is used to execute an entity or subentity command on the target objects. This keyword can take as many arguments as needed or no argument at all. A command, for example the transaction action “Duplicate”, usually generates one or more entities or subentities, which will be sent to the blocks inside the *Command block as target objects. Sometimes the type of new object is different from the object on which the command was executed.

In this case, the type of the new object needs to be declared in the header in this format *Command(<new type>), where <new type> is the type of the new object generated by the command. For example, adding a charge to a transaction is a command on cashflow, but generates a new object of type Charge. The header for this command should then be *Command(Charge).

📘

The name of the command is provided in the cell under the keyword. The name is case-sensitive.

Update

This keyword is used to update subentities and is only available for the StaticData service. The arguments sent to this keyword are the names of fields to be updated. The figure below shows an example of how it is used to update the currency of a client account from EUR to USD.

1099

Update the currency of a client account from EUR to USD. Important: the keyword *Apply/ in column N which commit the main entity, Client in this case, is necessary.

Remove

The keyword *Remove/ is used to remove an entity and is only available for the StaticData service. This keyword does not take any arguments.

455

RemoveSubentity

The keyword *RemoveSubentity/ is used to remove a subentity and is only available for the StaticData service. The same as *Remove/, this keyword does not take any arguments. The example below removes a client account with currency USD. The *Apply in column L is necessary.

786

StatusCommand

This keyword is used to set the transaction status and is only available for the Transaction service. It does not take any arguments, making it a non-terminal keyword, and, hence, must end with a slash (/). The command name must be written in the cell under the keyword and is case-sensitive. Below is an example.

577

Duplicate

The keyword *Duplicate is used to duplicate a static data entity or subentity. When using this keyword, the newly created entity or subentity must be committed by using *Apply/. If it is a new subentity, the main entity must be committed too.

Certain fields will need to be changed before committing the new entity or subentity since they are used as unique key in the system.

Next

The keyword *Next is used in transaction actions or transaction commands that require more than one step to execute, such as Exercise for example. It is only available for the Transaction service. As with *Command, this keyword can take as many arguments as needed and can take the type of the new object that will be generated by the command.

The example below illustrates how the keyword is used to exercise a deal. The first step is declared in column F by *Command, and the second step is declared in column I with *Next. The arguments for *Next are in Columns J to O, while column P sets a value to the opening date of the new transaction.

1061

Fetching Keywords

It is possible to fetch metadata and similar information through data processing using fetch keywords. They are described below.

KeywordDescriptionArguments?Start Function?Target Objects?
*FetchFactoryCommandsFetch available commands on factory.:white-check-mark:
*FetchFactoryCommandParametersFetch parameters used by factory command.:white-check-mark:
*FetchSubentityTypesFetch subentity types from a factory.:white-check-mark:
*FetchFieldsFetch fields on entity or subentity.:white-check-mark:
*FetchCommandsFetch available commands on an entity or subentity.:white-check-mark:
*FetchStatusCommandsFetch available status commands on a transaction. To be used in Transaction service only.:white-check-mark:
*FetchParametersFetch command parameters.:white-check-mark:

FetchFactoryCommands

Use this keyword to get the available commands on the current factory. The rules for this keyword are:

  • It does not take any arguments.
  • No value is needed in the data cell.
  • Any actions after the keyword will be ignored.
625

FetchFactoryCommandParameters

Use this keyword to get the parameters of a factory command. The rules for this keyword are:

  • It does not take any arguments.
  • The name of the factory command needs to be provided in the data cell.
  • Any actions after the keyword will be ignored
626

FetchSubentityTypes

Use this keyword to get a list of subentity types. The rules for this keyword are:

  • It does not take any arguments.
  • No value is needed in the data cell.
  • It must be the only keyword in the header.
628

FetchFields (Main Entity)

Use this keyword to get the metadata of the fields in the main entity. The rules for this keyword are:

  • No value is needed in the data cell.
  • It must be the only keyword in the header.
624

FetchFields (Subentity)

Use this keyword to get the metadata of the fields in a subentity. The rules for this keyword are:

  • It does not take any arguments.
  • The subentity type needs to be provided in the data cell.
  • It must be the only keyword in the header.
562

FetchCommands

Use this keyword to get the available commands on an entity or a subentity. The rules for this keywords are:

  • It does not take any arguments.
  • No value is needed in the data cell.
  • Any actions after the keyword will be ignored.
692

FetchCommandParameters

Use this keyword to get the parameters of a command. The rules for this keywords are:

  • It does not take any arguments.
  • The command name needs to be provided in the data cell.
  • Any actions after the keyword will be ignored.
697

If a command takes more than one step, then this keyword should be placed where the keyword *Next should be.

996

FetchStatusCommands

Use this keyword to get the available status commands on a transaction. This is for the Transaction service only. The rules for this keyword are:

  • It does not take any arguments.
  • No value is needed in the data cell.
  • Any actions after the keyword will be ignored.
699