Skip to Content

UDF to create Multiple Nodes in the Target

Hi Team,

Need to create the Target node based on the input . If the Source node "Employee " occurance is 1 then in the target 3 nodes to be create.

If Source is having 2 "Employee" nodes then in the target 6nodes to be populate.

Source Target

Employee EmployeeDetails

EmployeeDetails

Employee Details

Thanks,

Ravi

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Aug 17, 2017 at 08:48 PM

    Thanks Tanu,

    The Lineitem structure is not repeating in the target structure, only the "item" name is repeating.

    if the sequenence number is "1" in the source then it should be populate in the target structure 3 times as Lineitems.

    Example:

    Sequence Number 1 item

    RetailSequenceNumber 1

    item

    RetailSequenceNumber 1

    item

    RetailSequenceNumber 1

    Sequence Number 2 item

    RetailSequenceNumber 2

    item

    RetailSequenceNumber 2

    item

    RetailSequenceNumber 2

    lineitemstructure-is-not-repating-in-the-targetstr.jpg

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 17, 2017 at 03:26 PM

    Hi Ravi,

    Try below UDF . Execution type = all values of queue and input= var1

    int a= var1.length;

    int b=3*a;

    for(int i=0;i<b;i++)

    {

    result.addValue("");

    }

    Add comment
    10|10000 characters needed characters exceeded