I have a record type that's based on a data type which has a nested CDT as o

I have a record type that's based on a data type which has a nested CDT as one of its fields, and I'd like to allow users to search this record list based on a field of the nested CDT. For example, let's say that my entity-backed record type is based on a CDT called Car, and one of the fields of the Car CDT is "owner", which is of the type Person. The CDT Person has a text field called "name".

How can I configure the list view item for the Car record type so that the user is able to use the search box to search based on the field rf!owner.name? Is this even possible?

OriginalPostID-206205

OriginalPostID-206205

  Discussion posts and replies are publicly visible

  • Yes it is possible, if you're willing to be creative. I was told Appian unofficially support my working solution below which enables searching a Records View by CDT fields. Technically Appian only allows searching for Records based on Fields that are part of the Title. But as you see below by including a 'if(
    false,fn!concat(rf!request.description,...', it always evaluates to False so don't display in the Records View yet the Records are searchable by the CDT fields (ex. request.decscription) as the If(false) function is part of the Title field.

    The end result is the user can search the Records view by CDT fields as desired. Problem solved?


    = a!listViewItem(
    title: fn!concat("Contract Request Record: " & rf!request.legalComments,

    if(
    false,
    fn!concat(
    rf!request.description,
    rf!request.requestId,
    rf!request.vendor
    ),
    ""
    )

    ),
    details: if(rf!request.requestId="",{},"Request ID: " & rf!request.requestId & char(10)) &
    "Vendor: " & rf!request.vendor & char(10) & "Value: " & dollar(rf!request.cost)

    & char(10) & "Requestor: " & rule!APN_displayUser(rf!request.requestor)
    & char(10) & "Request Status: " & rf!request.requestStatus,
    image:cons!CM_contractRequestListImage
    )
  • We have used Views to back our Entity-based records, that way all the logic can be handled on the DB end, and the CDT can be fairly clean. This is also much better for performance, and we've created a column in the view that concatenates the various possible search terms (which we've added to the title using the method that Greggl shows above)
  • FYI - I think in 16.1 all columns of the grid layout for the record listing are now searchable!
  • Thanks, Gregg and Jason. I've managed to achieve a similar outcome with other record types using left(rf!fieldName,0), but for some reason this particular record is not behaving. Maybe this is a bug.
  • I think I've found the issue. The title parameter of my listViewItem currently reads as follows:

    title: "#" & rf!ID & " " & char(10148) & " " & rf!incidentType & if(isnull(rf!Project),""," " & char(10148) & " ") & rf!Project.projectName & if(isnull(trim(rf!incidentTitle)),"",": ") & rf!incidentTitle

    Any fields that are referenced AFTER if(isnull(rf!Project)...) are not searchable. If I write left(rf!Project.projectName,0) BEFORE the isnull() call, then Project.projectName becomes searchable. How strange.