K2BTools Tutorial - Exercise 2.3: Advanced properties in forms

1 - Element Relative Position

By default, when including elements (attributes, variables, sdt, textblocks) that are not inside Grid Columns each element is generated in a different row. Using this property, different layouts can be obtained by telling K2BTools that some elements must be shown in the same row. When in the same row the relationship with the previous field can be configured, deciding whether to place the new element close to the previous one (same cell) or in a new different cell.

  • New Row: The element is placed in a new row.
  • New Cell: The element is placed in the same row of the previous element, in a new cell.
  • Same Cell: The element is placed in the same cell of the previous element.

Make this changes to the property "Element Relative Position" of the following attributes:

  1. CustomerLastName: New Cell
  2. CustomerBirthDay: New Cell
  3. CountryName: New Cell
  4. CustomerMaritialStatus: Same Cell
  5. CustomerSex: Same Cell

2 - “Invite Message” and “Context Help Value”

These properties can be used to help the user understand which information to enter in a certain attribute. Use it following these steps:

  1. Enter the K2BTrnForm instance for the “Customer” transaction.
  2. Go to the “CustomerFirstName” attribute and set its “Invite Message” property to “First Name”.
  3. Go to the “CustomerLastName” attribute and set its “Invite Message” property to “Last Name”.
  4. Go to the “CustomerNumber” attribute and set the “Contextual Help Value” to “Enter Id. Number” (quotes must be included in this case).
  5. Save the pattern instance, and execute the application.
  6. See in the generated interface the effect on the attributes, and the differences between the properties.

3 - Description

Make this changes to the following descriptions:

  1. Empty "CustomerPhoto" description.
  2. Set "CityId" description to "City".
  3. Set "CountryName" description" to "Country".

4- Control Info

Add a control info to "CityId" attribute with the following properties:

  • ControlType: DynamicComboBox
  • ItemValues: CityId
  • ItemDescriptions: CountryName

5- Run!

It’s time to see the result of all this! Execute your application and see the results in runtime.