Hi,
I have a collection that I want to add a column to. For each record I need to return the Question by looking up the idQuestion from the collection to a different table. The problem is that the collection results in repeating the first result (Question) through each record.
For example:
Here is what I'm getting in my collection:
| idQuestion | Question |
| 1 | Question 1 |
| 2 | Question 1 |
| 3 | Question 1 |
| 4 | Question 1 |
This is what I want:
| idQuestion | Question |
| 1 | Question 1 |
| 2 | Question 2 |
| 3 | Question 3 |
| 4 | Question 4 |
Here is my code:
ClearCollect(
colSurvey,
AddColumns(
'[dbo].[Surveys]',
"Question",
LookUp('[dbo].[SurveyQuestions]',idQuestion = idQuestion,Question)
)
)
Thank you