Fetch Foreign Key values in Child Table

Certified Associate Developer

Hi Community Team,

Here, I'm using two Cdt's One parent table (Emoloyee Details) and one child table (Comments).

I'm calling primary key in the parent table into the child table to fetch the values in the Child table.  I'm getting NULL instead of primary key of parent Cdt. Please help me out how to configure this error?

Child PK                    Parent FK

Comments_ID     Employee_ID

 1                           NULL

 2                            NULL

 3                            NULL

 4                             NULL

 5                              NULL

  Discussion posts and replies are publicly visible

Parents Reply
  • +1
    Certified Associate Developer
    in reply to Sanchit Gupta (Xebia)

    One of the possible correct way to get the results  to match my scenario. Here we can able to achieve this.. by updating the expression of script task:

    repeat(count(pv!childCdt), pv!ParentCdt.PrimaryKey)

    Target: childCdt.ForeignKey

    Here, it counts the values of childCdt Field like how many inputs passed.. Same  Primary key will be generated for the values in single submission. It will be repeat as how many times the childCdt Values passed.

    For the reference : Comment Id is the PK of childCdt, Request Id is FK of child Cdt and PK of ParentCdt

Children
No Data