Using the Add Attributes From Transaction Action

Objective

Adding Attributes nodes to a web panel developed using K2BWebPanelDesigner involves many steps, as the developer must add one node for each Attribute or Variable he wants to show. In most cases these nodes are related to a transaction. To simplify this process in this case, K2BWebPanelDesigner includes the "Add attributes from transaction" action. Using this action, attributes or variables are added to the web panel based on the selected transaction's structure.

How it works

Adding an Attributes node from a transaction involves four steps:

  1. Choose the node under which the Attributes node should be created. The developer may choose nodes from any type, as long as they support having Attributes nodes as children.
  2. Select the "Add Attributes From Transaction" action in the Actions menu inside the contextual menu belonging to the node chosen in the previous step.
    AddAttributesFromTransactionMenu
    Contextual menu

  3. Choose the transaction the Attributes node should be based on.
    AddGridFromTransctionChooseTransaction
    Transaction selection

  4. Choose the layout that should be used when generating the grid. In this point you can choose a dynamic layout, or an attributes section.
    AddAttributesChooseLayout
    Layout selection

  5. Select if you want to use Attribute or Variable nodes. See differences between these options below.

Differences between adding attributes or variables

Using this action, the developer can choose to include Variable or Attribute nodes inside the Attributes node definition.

If the developer chooses to include attributes, a parm rule involving attributes or a global condition must be set to decide which record must be showed.

If variables are added the developer must decide whether the variables are readonly or not, using the "Enabled" property inside these nodes. In either case the developer may add code to the web panel's events to initialize the value of the variable.