Convert to a CDT

Hello Everyone,
I have an expression whose output is of type "Any Type (Dictionary)". I want to typecast it into the desired CDT type. Please let me know the method.

OriginalPostID-243301

  Discussion posts and replies are publicly visible

Parents
  • Usage of a!applyComponents() is redundant or I should say that it's not needed. The following should be enough as per my knowledge:

    fn!cast(
              fn!typeof({type!SSB_IAL_EmployeeDetails()}),
              a!queryEntity(
               entity: cons!SSB_IAL_EMP_DETAILS,
               query: a!query(
                        pagingInfo: a!pagingInfo(
                         1,
                         -1
                        )
               )
              ).data
    )

    On a side note, a!applyComponents() imposes burden as cast function is being invoked in an iterative manner over each record in the data subset. This isn't needed when fn!cast() is able to deal with arrays based on the data type inputted to it.
Reply
  • Usage of a!applyComponents() is redundant or I should say that it's not needed. The following should be enough as per my knowledge:

    fn!cast(
              fn!typeof({type!SSB_IAL_EmployeeDetails()}),
              a!queryEntity(
               entity: cons!SSB_IAL_EMP_DETAILS,
               query: a!query(
                        pagingInfo: a!pagingInfo(
                         1,
                         -1
                        )
               )
              ).data
    )

    On a side note, a!applyComponents() imposes burden as cast function is being invoked in an iterative manner over each record in the data subset. This isn't needed when fn!cast() is able to deal with arrays based on the data type inputted to it.
Children
No Data