Skip to main content
Known Participant
Dec 1, 2023 7:17 AM UTC
Question

Writing Null to nested CDT

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
    Inspiring
    Dec 1, 2023 7:20 AM UTC

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

    stefanhelzle0001
    Brainy
    Dec 1, 2023 7:26 AM UTC

    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.

    Known Participant
    Dec 1, 2023 8:07 AM UTC

    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
    Dec 1, 2023 9:58 AM UTC

    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.