I'm trying to add 2 columns to an existing 1-column collection. In case it matters, the 1-column collection (colVPOSCollectedSkills) is produced with Distinct() to grab an unduplicated list of skills that have been assessed for a selected student. Due to the use of Distinct(), the column name is Value.

I want to add another column (ViewProfics) to this existing collection with the value false. I have tried locating the code as:
- a second item within the initial ClearCollect
- an additional step immediately after the initial ClearCollect, and
- a separate button for testing purposes.
Here are the various code snippets I've tried (separately) in all the locations described above. Every time, though I get the error that the column name already exists, even though it doesn't.
Collect
Collect(
colVPOSCollectedSkills,
AddColumns(
colVPOSCollectedSkills,
"ViewProfics",
false
)
)
ClearCollect
ClearCollect(
colVPOSCollectedSkills,
AddColumns(
colVPOSCollectedSkills,
"ViewProfics",
false
)
)
Collect with the collection value only in the AddColumns function
Collect(
AddColumns(
colVPOSCollectedSkills,
"ViewProfics",
false
)
)
AddColumns without any Collect or ClearCollect function
AddColumns(
colVPOSCollectedSkills,
"ViewProfics",
false
)
There are some older posts on this error, but none of them got me to the finish line. Hoping one of you can! Thanks!