populating the date field values in a grid

Hi All,

Id date1 date2
1 5/8/2017 7/9/2017
2 7/9/2017 8/10/2017

Actually, the issue is we need populate the data as above in grid. Firstly the value in date1 column is original date and if we select a new date that should be populated in date2 field. Similarly if we add next row then the value in date1 column must be value in date2 column in first row, in the same way the value in date1 field for 3rd must be the value in date2 field in 2nd row. In this way I need to show the values in grid.

  Discussion posts and replies are publicly visible

Parents
  • Hi Sravansi,
       Agree with Jocob, you can create the additional CDT with all the filed on the GRID and use of apply function to populate the data on the CDT variable,
    Example :
      local!AllDetails:
             apply(

                  rule!CreateDataFormat(
                      Index:_
                      MainData:local!MainData
               ), 
               1 + enumerate (count(local!MainData))

     and On the Expression : CreateDataFormat
         type!MyNewCDT(
             Id : ri!MainData[ri!Index].Id,
             date1: ri!MainData[ri!Index].date,
             date2: index(ri!MainData,ri!Index+1,null)
        )

    hope it helpful

Reply
  • Hi Sravansi,
       Agree with Jocob, you can create the additional CDT with all the filed on the GRID and use of apply function to populate the data on the CDT variable,
    Example :
      local!AllDetails:
             apply(

                  rule!CreateDataFormat(
                      Index:_
                      MainData:local!MainData
               ), 
               1 + enumerate (count(local!MainData))

     and On the Expression : CreateDataFormat
         type!MyNewCDT(
             Id : ri!MainData[ri!Index].Id,
             date1: ri!MainData[ri!Index].date,
             date2: index(ri!MainData,ri!Index+1,null)
        )

    hope it helpful

Children