Skip to main content
October 30, 2023
Solved

Data issue with nested CDT

  • October 30, 2023
  • 4 replies
  • 0 views

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.

    Best answer by stefanhelzle0001

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

    4 replies

    stefanhelzle0001
    Brainy
    October 30, 2023

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

    October 30, 2023

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

    stefanhelzle0001
    Brainy
    October 30, 2023

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