Skip to main content
Known Participant
Oct 30, 2023 12:30 PM UTC
Solved

Data issue with nested CDT

Hi All,

I have two CDTs A and B. B is nested to A. I am creating the data for cdt A using expression rule, for each record in A there may be multiple record of B. Can someone please help me how can I create using expression rules which will further then inserted to database.

    stefanhelzle0001
    Brainy
    Oct 30, 2023 1:08 PM UTC

    Then use a!foreach() to create as many items as you need.

    4 replies

    stefanhelzle0001
    Brainy
    Oct 30, 2023 12:48 PM UTC

    type!A(
      field: "value",
      nested: {
        type!B(
          field: "value"
        ),
        type!B(
          field: "value"
        ),
      }
    )

    Known Participant
    Oct 30, 2023 12:50 PM UTC

    Thanks Stefan, But it is not known how many records will be in nested CDT B.

    stefanhelzle0001
    Brainy
    Oct 30, 2023 1:08 PM UTC

    Then use a!foreach() to create as many items as you need.