Sure, here is an example of how that can be done, based on this post:
// Create two collections: My version.
ClearCollect(
colQuestions,
{
QuestionID: 1,
Question: "What is the capital of France?"
},
{
QuestionID: 2,
Question: "What colour is the sky?"
}
);
ClearCollect(
colAnswers,
{
QuestionID: 1,
Answer: "Paris"
},
{
QuestionID: 2,
Answer: "Blue"
}
);
// Add all columns from another table code.
ClearCollect(
colQuestionsAndAnswers,
Ungroup(
DropColumns(
AddColumns(
colAnswers,
"groupColumn",
Filter(
colQuestions,
QuestionID = colAnswers[@QuestionID]
)
),
"QuestionID"
),
"groupColumn"
)
);
Feel free to change the code to handle your SP lists.
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.