Skip to main content
December 1, 2023
Question

Writing Null to nested CDT

  • December 1, 2023
  • 5 replies
  • 0 views

Hi Team,

I have a CDT named PSC test which contains a  nested CDT called PSC test1(nested cdt column name :idf). In a process model script task I'm trying to make the PSC test1 as null and write into DSE. In a script task I'm mapping NULL to it, but while writing it getting error.


I tried using cast(cdttype,null), null, emptycdttype. But no  improvement. Is there any solution for this?

Thanks in advance!

 [mention:126a676c85024855948336691b0a7b92:e9ed411860ed4f2ba0265705b8793d05]  

    5 replies

    prakhars0731
    December 1, 2023

    I don't think we can do that in appian we cannot define CDT of type null.

    stefanhelzle0001
    Brainy
    December 1, 2023

    Is that field "idf" a multiple? If yes, try to assign a empty list "{}". If you assign a NULL value, Appian thinks that you want to assign a list with a single NULL value item.

    December 1, 2023

    No Stefan it's the nested CDT

    at one point I don't need the relationship to idf. So I'm trying to change idf to null. In this case I'm getting an error!

    stefanhelzle0001
    Brainy
    December 1, 2023

    Are you aware that nested CDTs are not recommended? Why not use Records?

    You said "I don't need the relationship to idf.". I understand, but you cannot just set the field to NULL. You will have to actively delete that element and set up the CDT field correctly to make this work.