Creating a Positional Layout using Layout Builder

This feature helps you to upload a sample or an exact source file to define the layout by custom selection. By default, this feature remains disabled in the product. You need to enable this feature before you start working on this. 

Steps to create positional layout:

  1. Click Configure > LAYOUTS > Positional.
  2. Click Create Positional Layout.
  3. On the Create Layout screen, select the Layout Builder option from the drop-down list of Select Layout UI Type field.



  4. Click Next. The Create New Positional screen is displayed in a new page.
    1. Type the name and description of the new mapping service in the Name and Description text boxes.

      Name: Only alphanumeric and underscore are allowed and you must start the layout name with an alphabet or underscore.
      Description: Only alphanumeric and few special characters(_ - . : , @ $ ? \\ and space) are allowed and you must start the description with an Alphabet/Underscore/Number.

    2. Select the Data Header Present check box if you want to add the titles of the fields in your text file. Data Header usually contains the name of the fields in text file. If layout is used at the source end and data header is present in the file. If the layout is used at the target end, and the Data Header Present check box is checked, the Header will be written in the target text file.
    3. Define the Definition Mode either using definition file or entering the fields sequentially.

      Using Import Definition File
      1. Select Import Definition File.
      2. Select the type of file from the Definition File drop down list box. The available options are Data and JSON.
      3. Browse and upload the data file in Upload Data File field.

      4. Select the project from the Project drop-down box.
      5. Click Continue.


      Using Entering the Fields Sequentially
      1. Select Enter the Fields Sequentially as a definition mode.
      2. Select the field position - Field Length or Start & End Positions.
        Field Length: Select this option if the field length is used to set the field positions.
        Start & End Positions: Select this option if the start and end positions are used to set the field positions.
      3. Select the project from the Project drop-down box.
      4. Click Continue.

  5. In Definition panel, select the type of layout from the drop-down list of Reference Layout Type field that you want to take as a reference.
  6. Select the layout which you want to use as a reference file from the drop-down list of Reference Layout field.
  7. Select the Project from the drop-down list of Project. 
  8. Expand Advanced Properties to view the advanced properties of positional layout.
    1. In case, you want to prevent the header rows from being parsed then define a number in Header Skip Row(s) field.
    2. In case, you want to prevent the footer rows from being parsed then define a number in Footer Skip Row(s) field.
    3. Define the Character-set encoding for your positional layout from the drop-down list of Character Set Encoding field. The available options are UTF-8, UTF-16, and ISO-8859-1.

      In case, the data you are processing through Adeptia Connect contains characters that are a part of another character set encoding, for example, UTF-8, then you need to change the character set encoding.
    4. Enter the target record separator in the textbox Target Record Separator, if you want to write each record in new line in target file. By default records are written in single line. This option is applicable only for the schema used at target end.
    5. Disable the Handle CR/LF (Source Data) check box, if the source file does not have any carriage return. By default, this option is checked, and schema expects file with carriage return. Handle CR/LF (Source Data) option is applicable only for the schema used at the source end.
    6. Select the Data Truncation check box, in case the data length is more than specified in the schema and you want to pass the specified length of data and ignore the rest of the data.

      The schema that you use at the target end has the option of Data Truncation.
    7. Select Allow Less Fields check box if you want to parse the data even if the number of fields in the data file is less than the number of field specified in the schema. If Allow Less Fields checkbox is selected and the schema is used at source end, schema will parse the input data and insert the empty tag of missing fields. If the schema is used at target end, it will write all the tags coming in input XML.
    8. In case number of fields in source data is more than the number of fields specified in the schema, only those fields are parsed, which are specified in schema. Other fields are ignored. If you want to generate error records, when number of fields in source data is more than the number of fields specified in schema, disable the Allow More Fields check box.
    9. Select Remove Last New Line Record Separator check box if you want to remove the new line record separator from the target file.

      • When the number of fields in the data file is less than the number of fields defined in the schema then schema will not process the data and give an error during execution.

      • When you select the Allow Less Field check box then layout generates an empty tag for fields that are not present in the data file.
      • This option is applicable only when you use the schema at the source end.
    10. In case the input data contains some characters that are invalid in XML, then this may result in the mapping getting aborted. You can filter these invalid XML characters by selecting the Filter Invalid XML Characters checkbox.
    11. Select Remove Space(s) check box if you want to remove all the leading and trailing spaces(s) from the data value on the source side.
    12. Select Remove Leading Zero(s) check box if you want to remove all the leading zero(s) from the numeric data value on the source side.
  9. Once the required properties are defined, you can create the Table Data and Control Total Data.

    Steps to define the Table Data:

    1. In File View Area, select the row which you want to define as a header.
    2. Right-click and select New Table option to display the Table Data screen.
    3. On Table Definition screen,



      1. You can adjust the data length, start and endpoint of a data field using scale. You can also add column by clicking Add Column button. 
      2. You can Insert column left or right, delete column, and split column using the column menu by right click on columns.
      3. Click on the column to rename it.  
      4. Click Next.

    4. On Table Column Definition screen, 



      1. You can edit the Field Name value. If reference layout is defined, click the field to get the suggestions based on the reference layout.

        You can use spaces and other special characters (~`! @ # $%^&*() {} [] | \\ : ; " ' - + =<> / ? . ,  ) in the field names. The special characters are rendered as underscores (__) if you use this layout in a Mapping.

      2. Select the type of data from the Data Type drop-down list. The supported data types for text Layout are:

        Data Type

        Description

        String

        Select this data type if the field accepts a string value.

        Number

        Select this data type if the field accepts a numeric value.

        Date

        Select this data type if the field accepts a Date or Date and Time value.

      3. If data type is Date, select the date and time format from the Format drop-down list.

      4. The default value of the start position in the Start is 1. You can edit the start position as per your requirement.
      5. Type the end position of the field in the End after which you want to create a field position that is not in sequence.
      6. Select the alignment of the field from the dropdown list Align.

         L if the field is left aligned.
         R if the field is right aligned.

      7. Select Skip check box if you want to skip some fields while generating the XML for your layout. For example, your source file has over 1500 fields, but you only need to use 1000 fields. This Skip check box will omit the 500 fields and it will not read them when it parses the data to XML. However, the fields will be visible in the file. If you create the layout using an existing XSD, then the skipped fields will appear blank. However, when you will use the same layout in other activities such as Mapping, it will display all the fields of the file.

        The skipping of fields is useful in case where a standard XSD has a large number of fields. Skipping reduces the size of the XML that will now contain the required fields.
      8. To insert rows, specify the number and position of the rows that you want to add in the Number of Rows and at Position fields respectively and click Add Row button. You can add a maximum of 99 rows at a time.

      9. Click Save to save the table data.

    5. You can see the created Table data in Details Panel. 

      Click  button to open table data in data view panel. Also, click  button to delete the table data.

    Steps to define the Control Total
    Before defining the control total value, you must specify these values:
    • Define the Header Skip Row(s) in case you want to parse value in header. 

    • Define the Footer Skip Row(s) in case you want to parse value in footer. 

    Follow these steps to define the control total:
    1. In File View area, select the row (based on the defined Header Skip Row(s) or Footer Skip Row(s)) which you want to parse to the source side. 
    2. Right-click and select Control Total option.



    3. On Control Total Definition screen:



      1. Control Total Position and Control Total Row Number are automatically updated based on the user selection.
      2. You can adjust the data length, start and endpoint of a data field using scale. You can also add column by clicking Add Column button. 
      3. You can Insert column left or right, delete column, and split column using the column menu by right click on columns.
      4. Click on the column to rename it.  
    4. Click Next.

    5. On Control Total Column Definition screen, you can get the suggestion for the Field Name if you have selected Reference Layout in the Definition panel. To achieve this, click on the Field Name to view the suggestion. 

    6. Click Save.
    7. You can see the created Control Total in Details Panel. 



      Click  button to open control total in data view panel. Also, click  button to delete the control total.
  10. You can view the Control Total and Table Data in Data View panel by clicking Data View  button from the toolbar. You can also edit and delete form this panel.

  11. If you want to see the layout in XSD format, click XSD View  button from the toolbar. You can also download the XSD file by clicking Download XSD button. 

  12. You can test the layout by clicking Test Layout  button from the toolbar. Click here to get more details.

  13. Click Save.