Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Work Tasks

Enable Versioning for List Item

  • Last UpdatedNov 15, 2023
  • 11 minute read

AVEVA Work Tasks allows its users to create different versions for a list item which is mapped to multiple tables (parent and child). The information in the parent table is considered as an identifier and is not versioned. All child table information is versioned.

In case of Employee Details, the parent table contains the parent items, Employee Name and Employee No. This list is not version enabled until a child list is added.

Versioning can be enabled for a child table with a single row of data and for a child table with multiple rows of data. In this scenario, first you will see how a child table with one record can be version enabled and the second scenario deals with a child table with multiple records.

Assume that you are creating an Employee Details list with the following table schema.

Table Employee Details with fields

  • EmployeeName

  • EmployeeNo

Table Address with fields

  • CurrentAddress

  • PermanentAddress

Also assume that, to map the list you have created two tables Employee Details and Address in your database.

If you have not created the tables in your database, use the script given below to create the Employee Details table.

To create an Employee Details table

  1. Login to your SQL Server.

  2. Copy the script given below to your server and execute.

    USE [formsandlist]

    GO

    /****** Object: Table [dbo].[EmployeeDetails] Script Date: 12/15/2008 15:47:44 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    SET ANSI_PADDING ON

    GO

    CREATE TABLE [dbo].[EmployeeDetails](

     [Id] [uniqueidentifier] NOT NULL CONSTRAINT [DF__EmployeeDetails__Id__1E6F845E] DEFAULT (newid()),

     [Title] [nvarchar](250) NOT NULL,

     [Application] [nvarchar](150) NULL,

     [CreatedBy] [uniqueidentifier] NULL,

     [CreatedDateTime] [datetime] NULL,

     [LastUpdatedDateTime] [datetime] NOT NULL,

     [WIP] [bit] NULL,

     [WIPItemId] [uniqueidentifier] NULL,

     [MainItemId] [uniqueidentifier] NULL,

     [ParentItemId] [uniqueidentifier] NULL,

     [RecordParentItemId] [uniqueidentifier] NULL,

     [TableId] [uniqueidentifier] NULL,

     [ItemRowIndex] [int] NULL,

     [IsLatest] [bit] NULL,

     [Version] [nvarchar](25) NULL,

     [VersionHistory] [nvarchar](max) NULL,

     [Status] [int] NULL,

     [LockedBy] [uniqueidentifier] NULL,

     [LockedOn] [datetime] NULL,

     [ListID] [uniqueidentifier] NULL,

     [SecuritySettings] [nvarchar](max) NULL,

     [ItemId] [uniqueidentifier] NULL,

     [ItemType] [int] NULL,

     [SecurityItemId] [uniqueidentifier] NULL,

     [Owner] [uniqueidentifier] NULL,

     [ModifiedBy] [uniqueidentifier] NULL,

     [AuditTrail] [nvarchar](max) NULL CONSTRAINT [DF_EmployeeDetails_AuditTrail] DEFAULT (''),

     [IsDisabled] [bit] NULL CONSTRAINT [DF_EmployeeDetails_IsDisabled] DEFAULT ((0)),

     [WorkflowStatus] [varchar](50) NULL,

     [SecurityCustomizationId] [uniqueidentifier] NULL,

     [EmployeeName] [nvarchar](50) NULL,

     [EmployeeNo] [nvarchar](50) NULL,

     CONSTRAINT [PK_EmployeeDetails] PRIMARY KEY NONCLUSTERED

     (

     [Id] ASC

     )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

     ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

     GO

     Insert into SKList Tables (Application,TableName)

     Values ('<SketlaListandForms>','EmployeeDetails')

     /***** Note: You need to replace the repository name ‘<SkeltaListandForms>’ with your repository name. Also replace the database ‘formsandlist’ with
     your database name *******/

     Go

To create an Address table

  • Copy the script given below to your database server and execute it.

    USE [formsandlist]

    GO

    /****** Object: Table [dbo].[Address] Script Date: 12/15/2008 15:49:29 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    SET ANSI_PADDING ON

    GO

    CREATE TABLE [dbo].[Address](

     [Id] [uniqueidentifier] NOT NULL CONSTRAINT [DF__Address__Id__1E6F845E] DEFAULT (newid()),

     [Title] [nvarchar](250) NOT NULL,

     [Application] [nvarchar](150) NULL,

     [CreatedBy] [uniqueidentifier] NULL,

     [CreatedDateTime] [datetime] NULL,

     [LastUpdatedDateTime] [datetime] NOT NULL,

     [WIP] [bit] NULL,

     [WIPItemId] [uniqueidentifier] NULL,

     [MainItemId] [uniqueidentifier] NULL,

     [ParentItemId] [uniqueidentifier] NULL,

     [RecordParentItemId] [uniqueidentifier] NULL,

     [TableId] [uniqueidentifier] NULL,

     [ItemRowIndex] [int] NULL,

     [IsLatest] [bit] NULL,

     [Version] [nvarchar](25) NULL,

     [VersionHistory] [nvarchar](max) NULL,

     [Status] [int] NULL,

     [LockedBy] [uniqueidentifier] NULL,

     [LockedOn] [datetime] NULL,

     [ListID] [uniqueidentifier] NULL,

     [SecuritySettings] [nvarchar](max) NULL,

     [ItemId] [uniqueidentifier] NULL,

     [ItemType] [int] NULL,

     [SecurityItemId] [uniqueidentifier] NULL,

     [Owner] [uniqueidentifier] NULL,

     [ModifiedBy] [uniqueidentifier] NULL,

     [AuditTrail] [nvarchar](max) NULL CONSTRAINT [DF_Address_AuditTrail] DEFAULT (''),

     [IsDisabled] [bit] NULL CONSTRAINT [DF_Address_IsDisabled] DEFAULT ((0)),

     [WorkflowStatus] [varchar](50) NULL,

     [SecurityCustomizationId] [uniqueidentifier] NULL,

     [CurrentAddress] [nvarchar](150) NULL,

     [PermanentAddress] [nvarchar](150) NULL,

     CONSTRAINT [PK_Address] PRIMARY KEY NONCLUSTERED

     (

     [Id] ASC

     )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

     ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

     GO

     Insert into SKListTables (Application,TableName)

     Values ('SketlaListandForms','Address')

     /***** Note: You need to replace the repository name ‘SkeltaListandForms’ with your repository name. Also replace the database ‘formsandlist’ with
     your database name *******/

     Go

To create the Employee Details list

  1. On the Manage List page, click New. The Create List window is displayed.

  2. Enter the Title as Employee Details.

  3. Enter any description to identify your list.

  4. Select Yes for Is Folder Supported? option to make your list folder supported so that you can organize your list in folders.

    Note: If the Title field is removed from the base List, the Folder is not supported for the list.

  5. Click Save and Continue. The Select Table window is displayed.

  6. In this case, you will map your list to the custom table. Hence, select the Existing Table option. Then, the Select Table field is displayed.

  7. Select EmployeeDetails table from the list and then click Next. The List Designer page appears.

    Note: All the fields that you have created in your database are displayed in the list. The parent items like Title, EmployeeName and EmployeeNo are displayed in the list.

  8. Click Submit.

  9. A form with the same name as that of the list is auto-generated when you submit the list. Select Yes if you want to regenerate the form, else select No. You can also edit the form using the Edit option from the Forms page.

    This list data is not version enabled. Let us see how non-versioned data is managed in a list.

    1. In the Enterprise Console, click menu icon, click Tools, and then click Manage List. The Manage List page appears.

    2. Click Employee Details. The Employee Details items list is displayed.

    3. Click New on the Ribbon bar to create a new list item for the Employee Details list.

    4. Type the list item details as follows.

      Field

      Data

      Title

      Mr

      EmployeeName

      Alex

      EmployeeNo

      A00012

    5. Click Submit. The list item is saved.

    6. Select the list item and right click the mouse. Since the Employee Details list does not have a child list, it is not version enabled. So you cannot see the Save As context menu in the right click options.

      Next, add one child table Address to the Employee Details list to make this list version enabled.

      To add an Address list

      1. In the Enterprise Console, click menu icon, click Tools, and then click Manage List. The Manage List page appears.

      2. Select the Employee Details list and click Edit on the Ribbon bar. The Create List window is displayed.

      3. You can edit the Description and Folder Supported option. The Title field will be disabled for editing. Click Save & Continue. The Forms Designer page is displayed with the Employee Details list.

      4. Drag and drop the List table in to the orange bar of the list name area. The Select Table window is displayed.

      5. Select the Existing Table option to map your child table to the custom table.

      6. Select the Address table from the list and then click Select. The Form Property window is displayed.

      7. Enter the Tag name as Address.List Table

      8. Click Save.

      9. Now, a child list table is also added to the Employee Details list and this data will be versioned.

      10. Click Submit. The Re-Generate Form dialog box appears.

      11. A form with the same name as that of the list is auto-generated when you submit the list. Select Yes, regenerate the default form and click OK if you want to regenerate the form, else select No, do not regenerate the default form option and click OK. Select Yes and regenerate the default form with the new fields (Current Address and Permanent Address).

      12. Remove the Title Field from the Address child form. See Also Deleting a Control.

      13. Next, disable the repeating property of the Address since a person will have only one current address and permanent address. For that, click the Properties button for the Address control. The Address Properties window is displayed.

      14. Delete the Mapped XML Node.

      15. Select False from the Is repeating drop-down list.

      16. Click Save.

      17. Click Submit.

        Now, you can create list items for this and save it as a different version. To verify this:

        1. In the Enterprise Console, click menu icon, click Tools, and then click Manage List. The Manage List page appears.

        2. Click Employee Details. The Employee Details items page is displayed.

        3. Click New on the Ribbon bar to create a new list item for the Employee Details list.

        4. Type the list item details.

          Field

          Data

          Title

          Mr

          EmployeeName

          John

          EmployeeNo

          J012

          CurrentAddress

          21, HSR Layout, Bangalore

          PermanentAddress

          2nd Cross Rd, Powai, Mumbai

        5. Click Submit. The list item is saved.

        6. Then select the list item and right-click it to open the context menu. Since the Employee Details list is version enabled, you can see the Save As context menu in the right-click options. This menu will help you to create different versions for the list item.

          To save an item as next major version:

          1. In the Enterprise Console, click menu icon, click Tools, and then click Manage List. The Manage List page appears.

          2. Select Lists and click Employee Details.

            Note: Our objective is to create a next major version for the item.

          3. Right click the required item list.

          4. Click Next Major Version. The Save List Item dialog box appears. You can specify your comments in the text box provided. Let us leave the field blank as it is not a mandatory field.

          5. Click Save New Version. An information message appears.

          6. Click OK. An information message appears.

          7. Click OK.

          8. Right-click the same item list and select Show All Versions.

            Note: In the same way, you can create Next Minor Version, Specific Version and Next version of the list item. If you make any changes in the main list i.e. Employee Details, this will reflect in all the versions. If you make changes in the Address items, that will not affect any other items or other versions.

            Version enabling for a child table with multiple records

            Next you will see how a child table with multiple records can be version enabled. For this purpose, add one repeating child item Qualification to the existing list.

            The Qualification table has the following schema:

            • Title

            • University

            • Year of Pass

            Before starting with this scenario, create a table Qualification in your database.

            To create a Qualification table

            1. Login to your SQL Server.

            2. Copy the following script to your server and execute it.

              CREATE TABLE [dbo].[Qualification](

               [Id] [uniqueidentifier] NOT NULL CONSTRAINT [DF__Qualification__Id__1E6F845E] DEFAULT (newid()),

               [Title] [nvarchar](250) NOT NULL,

               [Application] [nvarchar](150) NULL,

               [CreatedBy] [uniqueidentifier] NULL,

               [CreatedDateTime] [datetime] NULL,

               [LastUpdatedDateTime] [datetime] NOT NULL,

               [WIP] [bit] NULL,

               [WIPItemId] [uniqueidentifier] NULL,

               [MainItemId] [uniqueidentifier] NULL,

               [ParentItemId] [uniqueidentifier] NULL,

               [RecordParentItemId] [uniqueidentifier] NULL,

               [TableId] [uniqueidentifier] NULL,

               [ItemRowIndex] [int] NULL,

               [IsLatest] [bit] NULL,

               [Version] [nvarchar](25) NULL,

               [VersionHistory] [nvarchar](max) NULL,

               [Status] [int] NULL,

               [LockedBy] [uniqueidentifier] NULL,

               [LockedOn] [datetime] NULL,

               [ListID] [uniqueidentifier] NULL,

               [SecuritySettings] [nvarchar](max) NULL,

               [ItemId] [uniqueidentifier] NULL,

               [ItemType] [int] NULL,

               [SecurityItemId] [uniqueidentifier] NULL,

               [Owner] [uniqueidentifier] NULL,

               [ModifiedBy] [uniqueidentifier] NULL,

               [AuditTrail] [nvarchar](max) NULL CONSTRAINT [DF_Qualification_AuditTrail] DEFAULT (''),

               [IsDisabled] [bit] NULL CONSTRAINT [DF_Qualification_IsDisabled] DEFAULT ((0)),

               [WorkflowStatus] [varchar](50) NULL,

               [SecurityCustomizationId] [uniqueidentifier] NULL,

               [University] [nvarchar](50) NULL,

               [YearofPass] [int] NULL,

               CONSTRAINT [PK_Qualification] PRIMARY KEY NONCLUSTERED

               (

               [Id] ASC

               )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

               ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

               GO

              To add a Qualification child table to the Employee Details list

              1. In the Enterprise Console, click menu icon, click Tools, and then click Manage List. The Manage List page appears.

              2. Select the Employee Details list and click Edit on the Ribbon bar. The Create List window is displayed.

              3. You can edit the Description and Folder Supported options. The Title field will be disabled for editing. Click Save & Continue. The Forms Designer page is displayed with the Employee Details list.

              4. Drag and drop the List Table in to the orange bar of the list name area. The Select Table window is displayed.

              5. Select the Existing Table option to map your child table to the custom table.

              6. Select the Qualification table from the list and then click Select. The List TableForm Property window is displayed.

              7. Enter the Tag name as Qualification.

              8. Click Save. The List Designer page appears. Now, a child list table is also added to the Employee Details list and this data will be versioned.

              9. Click Submit. The Re-Generate Form dialog box appears.

              10. A form with the same name as that of the list is auto-generated when you submit the list. Select Yes, regenerate the default form and click OK if you want to regenerate the form, else select No, do not regenerate the default form option and click OK. On regenerating the form, all the changes made to the form will be lost. So it is recommended that you do not select this option. You can also edit the form using the Edit option from the Forms page.

                To edit the list form

                1. In the Enterprise Console, click menu icon, and then click Forms. The Forms page appears.

                2. Select the Employee Details form and click Edit on the Ribbon Bar.

                3. Replace the Qualification Form with the Grid control.

                4. Click Save.

                5. Click Submit.

                  Now, you can create list items for this and save it as a different version. In this scenario, you will add multiple records in the Qualification grid and save it as different version. To verify this:

                  1. In the Enterprise Console, click menu icon, click Tools, and then click Manage List. The Manage List page appears.

                  2. Click Employee Details. The Employee Details items page is displayed.

                  3. Click New on the Ribbon bar to create a new list item for the Employee Details list.

                  4. Type the list item details.

                    Field

                    Data

                    Title

                    Mr

                    EmployeeName

                    Alex

                    EmployeeNo

                    A00352

                    CurrentAddress

                    21, BTM Layout, Bangalore

                    PermanentAddress

                    706, Oxford, 21, Thane

                    Qualification 1

                    Title

                    MCA

                    University

                    University of Bangalore

                    YearofPass

                    2002

                    Qualification 2

                    Title

                    ME

                    University

                    University of Mumbai

                    YearofPass

                    2005

                  5. Click Submit. The list item is saved.

                  6. Select the list item and right-click the mouse. Since the Employee Details list is version enabled, you can see the Save As context menu in the right-click options. This menu will help you to create different versions for the list item.

                  7. Our objective is to create a next version for the item.

                  8. Click Next Version. The Save List Item dialog box appears. You can specify your comments in the text box provided. Let us leave the field blank as it is not a mandatory field.

                  9. Click Save New Version. An information message appears.

                  10. Click OK. An information message appears.

                  11. Click OK.

                  12. Right-click the same item list and select Show All Versions.

                    Note: In the same way, you can create Next Minor Version, Specific Version and Next version of the list item. If you make any changes in the main list i.e. Employee Details, this will reflect in all the versions. If you make changes in the Address items, that will not affect any other items or versions.

                    Related Links
                    TitleResults for “How to create a CRG?”Also Available in