Expression evaluation error at function 'wherecontains': can only be indexed into using square brackets or the index function

Hi,

I want to get local!notes.createdDateTime value out of local.notes by matching the note Id with local!caseNote.noteId, where local!notes was created by querying from a record type, and local!caseNote is a CDT type. Not sure why I got the error above, as I already use square brackets for local.notes

local!result: index(
    local!notes['recordType!{0b920cc5-462c-4191-981c-afe3a33f9ce4} Reference Data - Notes.fields.{a447478e-53ee-40e5-80dc-6588861432fb}createdDateTime'],
    wherecontains(
      local!caseNote.noteId,
      local!notes.id
    ),
    null
  ),

Could anyone help?

Thank you!

  Discussion posts and replies are publicly visible