Joining two or more tables at Interface level

Is it possible to combine two tables at interface level without using a view?Can we fetch the data with rules and join them thereafter?

Thanks is advance.

  Discussion posts and replies are publicly visible

Parents
  • I sorted out this by a logic ,But I am not sure is an efficient one.
    Here is the logic with an example
    load(
    local!a: {
    {
    ID: 1,
    Test1: "test11"
    },
    {
    ID: 2,
    Test1: "test14"
    }
    },
    local!b: {
    {
    ID: 2,
    Test2: "test12"
    },
    {
    ID: 3,
    Test2: "test13"
    }
    },
    local!c: intersection(
    local!a.ID,
    local!b.ID
    ),
    local!d: index(
    local!a,
    apply(
    wherecontains(
    _,
    tointeger(
    local!a.ID
    )
    ),
    local!c
    ),
    {}
    ),
    local!e: index(
    local!b,
    apply(
    wherecontains(
    _,
    tointeger(
    local!b.ID
    )
    ),
    local!c
    ),
    {}
    ),
    local!f: a!applyComponents(
    rule!tempCDT(
    testA: local!d,
    TestB: local!e,
    index:_
    ),
    1+enumerate(
    length(
    tointeger(
    local!c
    )
    )
    )
    ),
    local!f
    )

    rule!tempCDT :
    {
    ID:ri!testA.ID[ri!index],
    TestA:ri!testA[ri!index].Test1,
    TestB:ri!TestB[ri!index].Test2
    }
Reply
  • I sorted out this by a logic ,But I am not sure is an efficient one.
    Here is the logic with an example
    load(
    local!a: {
    {
    ID: 1,
    Test1: "test11"
    },
    {
    ID: 2,
    Test1: "test14"
    }
    },
    local!b: {
    {
    ID: 2,
    Test2: "test12"
    },
    {
    ID: 3,
    Test2: "test13"
    }
    },
    local!c: intersection(
    local!a.ID,
    local!b.ID
    ),
    local!d: index(
    local!a,
    apply(
    wherecontains(
    _,
    tointeger(
    local!a.ID
    )
    ),
    local!c
    ),
    {}
    ),
    local!e: index(
    local!b,
    apply(
    wherecontains(
    _,
    tointeger(
    local!b.ID
    )
    ),
    local!c
    ),
    {}
    ),
    local!f: a!applyComponents(
    rule!tempCDT(
    testA: local!d,
    TestB: local!e,
    index:_
    ),
    1+enumerate(
    length(
    tointeger(
    local!c
    )
    )
    )
    ),
    local!f
    )

    rule!tempCDT :
    {
    ID:ri!testA.ID[ri!index],
    TestA:ri!testA[ri!index].Test1,
    TestB:ri!TestB[ri!index].Test2
    }
Children
No Data