Reusable grid

Certified Senior Developer

Hi.

I am attempting to make a reusable grid using a passed ri! of type Any with a cdt type being passed into it.

Optionally I am thinking about passing in a list of column names so I can specify the order the grid displays columns in.

From there I wanted to do a foreach generating the N grid columns using field names and types grabbed from the passed cdt..

1.I don't know if there is a way to get a list of all the fields a cdt type has.

2. I am unsure if there is a way to get their types.

Any tips?  

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Senior Developer
    in reply to Mike Schmitt

    Sorry. yes the a!keys function on a datasubset.

    Example is a!keys(value:ri!mydatasubset.data[1])

    value being of the format

     [isActive:true,modifiedBy:fin.financeadmin,createdOn:6/21/2021 3:19 PM GMT-05:00,createdBy:finley.financeadmin,purchaseOrderCategory:Haste,clientPoId:To,purchaseOrderId:105]

    Returns error for the above line as "The passed parameter(s) are of the wrong type. Received the type Any Type"

Children