cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
shdfbasfgagfkay
Frequent Visitor

Ungroup Collection - Column Already Exists

In my code, Ungroup keeps showing error that a column already exists (I know that it will error to avoid duplicate columns). But I didn't see that particular column in collection structure (under View>Collections). So I thought of dropping the column first just to check, but then DropCoulmns says it can't find that column!

Screen-shots below showing the two errors:

(The variable 'xc2' is just for testing.) I want to ungroup 'Choices' but it shows error saying one of the columns - 'ChoiceCond1' - in 'Choices' group already exists. I was sure it doesn't but to verify I added DropColumns to see if it really does. In second screen-shot, the DropColumns complains that the 'ChoiceCond1' doesn't exists.

I'm at loss here, what am I missing?

 

Here the Upgroup says 'ChoiceCond1' already exists so it can't ungroupHere the Upgroup says 'ChoiceCond1' already exists so it can't ungroup

 

Here DropColumns says the 'ChoiceCond1' column doesn't existHere DropColumns says the 'ChoiceCond1' column doesn't exist

 

Any help would be appreciated.

4 REPLIES 4
RandyHayes
Super User
Super User

@shdfbasfgagfkay 

What is the structure of your collection?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
shdfbasfgagfkay
Frequent Visitor

Collection has lots of columns, but out of those two are grouped - Choices and Answers. Partial structure below (unless you need to see a complete one):

ColumnsSubcolumns
TagNo 
TaskNo 
SubSys 
StepSeq 
StepNo 
StepText 
ChoicesChoiceID
 ChoiceRN
 ChoiceLabel
 ChoiceSuffix
 ChoiceResponse
 ChoiceUpdated
 ChoiceCond1
 hChoiceResponse
ChoiceReqdMin 
ChoiceReqdMax 
AnswersAnswerID
 AnswerRN
 AnswerLabel
 AnswerSuffix
 AnswerResponse
 AnswerUpdated
 AnswerCond1
 hChoiceResponse
AnswerReqdMin 
AnswerReqdMax 
StepComment 
StepUserID 
StepUserInitials 
StepTimestamp 
RandyHayes
Super User
Super User

@shdfbasfgagfkay 

Okay, but in your formula you are trying to ungroup by ChoiceCond1 - which is a column of a Choices table.  That is not going to work.

What is it that you are trying to achieve?  What is the structure of the data that you want from your Ungroup?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

If you look closely it's 'Choices' column that I'm ungrouping. ('ChoiceCond1' is argument in the DropColumns).

I'm bringing data from SQL (has comma separated choices in columns), splitting those into nested table, user modifies the data thru the app, concatenating back, and sending to SQL. 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,676)