Everytime I use "AddColumns" I get an error as I type in the name of the new column. The column gets added to the collection before the command is entered, and it says there is a duplicate column.
I have a ListBox whose OnSelect starts the whole process:
Set(lookupList,Split(LookUp(L3ProcessMain, ID =L3P.ID, Requirements),";"));
ClearCollect(RequirementsC,Filter(Requirements, ID inlookupList));
Then RequirementsC is used to populate another ListBox. I want the concatenated string to show up as text in the ListBox, but I don't just want the text, I need the entire RequirementsC record to transfer to another collection.
Here is what I have in my "Items" property of the second ListBox. This is where I'm getting the error "TitleTag already exists"
Before trying anything else, type the formula in NotePad and paste it all in at once rather than typing it.
It would also be very useful to have the current attempted code in Text (some of it is hidden in the screenshot) and also where it is being used. I also assume RequirementsC is showing all columns from Requirements and all the columns are being shown in the image above.
Hi @WarrenBelz, can you please have a look at this problem?
When @JK-25091409-0 tried to use AddColumns() function they got an error "The column named 'ClosedTag' already exists", but when they tried to use Patch() function to update this column fields they got an error "The specified column 'ClosedTag' does not exist".
I have no idea how it can be possible, so I decided to ask you if you can help.
It's still doing that, you can see the RequirementsC has a ClearCollect, and it pulls from the Requirements table which does not have a
"TitleTag" column. Actually if you look at the image of the collection above, the new columns are in fact showing up in RequirementsC. That must be the problem, AddColumns is adding the new column to the collection instead of returning a new table.
After some testing I think that's it, if you AddColumns to a Collection, they get added to the collection. If you AddColumns to a table, it returns a new table.
This works for me (Requirements is an actual table):
Oh, that is a good sign that the error disappeared and the column is expected not to show. The AddColumns() function does not create a column in the table you pass as a parameter to this function. You can read about it in the documentation
That is why you need to add the results of your AddColumns() function to a new collection:
Can you show how you create the original collection before you run AddColumns function? It is important to know if the column ClosedTag already exists (even though all the values in that column are empty). I suspect that instead of AddColumns you should try using:
Show the statement where you adding columns to OpenRequirements
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.