Hello, everyone,
I have a question about merging two tables from Dataverse.
I create two collections based on certain values:
ClearCollect(mySCH;
ShowColumns(tbl_SCHSCHImport;
"kol__guid";
"kol__Surname";
"kol__class";
"kol__password"
));;
ClearCollect(myTEACHER;
ShowColumns(tbl_SCHTeacher;
"kol__subject";
"kol__teacher";
"kol__class"
));;
now i would like to merge both collections into one, and this based on the column kol__class
My attempt:
ClearCollect(myTable;
Ungroup(
DropColumns(
AddColumns(
myTEACHER;
"myGroupedColumn";
Filter(
mySCH;
kol__class=myTEACHER[@kol__class]
)
);
"kol__class"
);
"myGroupedColumn"
)
);;
Unfortunately I have the problem that my
values are not displayed in the new collection (myTable) with this formula
greetings
Solved! Go to Solution.
Sorry, i have one more question.
There are about 200 users in my mySCH Collection, but only one user is displayed in myTable
But the assignment of one user is completely correct, so thanks again
Of course, this is also the case when I load the collection in a gallery
Are you trying it like this?
//pseudocode - not tested
//Create two collections
ClearCollect(mySCH;
ShowColumns(tbl_SCHSchuelerImport;
"kol__guid";
"kol__nachname";
"kol__vorname";
"kol__klasse";
"kol__anmeldename";
"kol__passwort"
));;
ClearCollect(myTEACHER;
ShowColumns(tbl_SCHZuordnungLehrer;
"kol__fach";
"kol__lehrer";
"kol__klasse"
));;
Clear(myTable);;
ForAll
(
mySCH As TCH
;ForAll
(
myTEACHER As SCH
;If(SCH.kol__klasse = TCH.kol__klasse;Collect(myTable;{kol__guid:SCH.kol__guid;kol__nachname:SCH.kol__nachname;kol__vorname:SCH.kol__vorname;kol__klasse:SCH.kol__klasse;kol__anmeldename:SCH.kol__anmeldename;kol__passwort:SCH.kol__passwort;kol__fach:TCH.kol__fach;kol__lehrer:TCH.kol__lehrer}))
)
);
If the above is still giving the same value for kol__vorname, let me know.
Also, are you checking all the items of the Collection in a Gallery and scrolling through all of them? Maybe you have a lot of records with the student "Desire...." and the other records are much farther down.
Check if it helps @memphis11