Hello all,
I have the following challenge. I need to make two collections into one. But I need to keep the behavior of a n:m relationship.
Here is a mini-example creates two new collections group_m and group_n:
ButtonA:
ClearCollect(
group_m;
{
gm_nr: 1;
gm_atribut: "Hello"
};
{
gm_nr: 2;
gm_atribut: "Hallo"
};
{
gm_nr: 2;
gm_atribut: "Gutentag"
};
{
gm_nr: 3;
gm_atribut: "Moin"
}
);;
ClearCollect(
group_n;
{
gn_nr: 1;
gn_atribut: "Foo"
};
{
gn_nr: 1;
gn_atribut: "Bar"
};
{
gn_nr: 2;
gn_atribut: "Christian"
}
);;
ButtonB should merge them into a new collection like the following example:
Collect(
group_m_n;
{
gm_nr: 1;
gm_atribut: "Hello";
gn_nr: 1;
gn_atribut: "Foo"
};
{
gm_nr: 1;
gm_atribut: "Hello";
gn_nr: 1;
gn_atribut: "Bar"
};
{
gm_nr: 2;
gm_atribut: "Hallo";
gn_nr: 2;
gn_atribut: "Christian"
};
{
gm_nr: 2;
gm_atribut: "Gutentag";
gn_nr: 2;
gn_atribut: "Christian"
};
{// Blank or without this Dataset: gm_nr: 3
gm_nr: 3;
gm_atribut: "Moin";
gn_nr: Blank();
gn_atribut: Blank()
}
);;
Which is the easiest way?