Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Drop Columns not working?

(1) ShareShare
ReportReport
Posted on by 97

What is wrong with this formula? The error I'm getting is on the rename columns step stating that "a column named field_6 already exists". But I'm literally dropping the field_6 column in the previous step. Does drop columns simply not work? This should be taking the email addresses in field_6, making them insensitive by running them through the Lower function and saving them to a new field, then drop the original field_6 and rename the new field to field_6. When I view the collects created at these various steps, those columns do not appear in the collections. This code worked fine six months ago.

 

ClearCollect(formattedcolSecurityAll,
                    RenameColumns(
                        DropColumns(
                            AddColumns(
                                colSecurityAll
                            ,insensitivefield_6,Lower(field_6))
                        ,field_6)
                    ,insensitivefield_6,field_6));
  • MV-30041934-0 Profile Picture
    97 on at
    Re: Drop Columns not working?

    Thank you. That is useful advice that I haven't heard yet. I will start learning how to read that file. That sounds like an excellent way to find stuff the editor is hiding.

  • rzuber Profile Picture
    545 Super User 2025 Season 1 on at
    Re: Drop Columns not working?

    @dsagfhjj There are many things that happen in Power Apps that we can't easily see when looking at it in the Power Apps editor. For instance, every container control has a DisplayMode property, but you can't access it directly without first selecting another item (checkbox/label/textbox/etc) that also has a DisplayMode property. Then you can edit the DisplayMode of all of them together..

     

    But another thing I found is that the MSAPP file that gets downloaded when you save your app to your computer is an archive file.. (You can open it with 7-Zip) and inside are many text files.. What you can't find easily in the Power Apps editor can be investigated using a text editor.. Though I wouldn't suggest modifying this file unless you know what you're doing. (There are tools out in the wild for that..) but it can be useful when you're trying to find specific keywords in your app, and you can't remember where you used them and the Power Apps editor won't let you search your custom component properties.

     

    I lost count of the times I have used this to find some formula I forgot about that was affecting one thing or another.. but I couldn't do a find/replace in the editor because Find/Replace in Power Apps is ridiculously bugged... so definitely familiarize yourself with the MSAPP file.

     

    </MyTwoBits>

  • MV-30041934-0 Profile Picture
    97 on at
    Re: Drop Columns not working?

    It worked, but I wish I understood why my code became broken. I don't use the with() function very often.

  • rzuber Profile Picture
    545 Super User 2025 Season 1 on at
    Re: Drop Columns not working?

    @dsagfhjj see my last reply on first page. Let me know if that one works.

  • MV-30041934-0 Profile Picture
    97 on at
    Re: Drop Columns not working?

    dsagfhjj_0-1720448176057.png

     

  • Verified answer
    rzuber Profile Picture
    545 Super User 2025 Season 1 on at
    Re: Drop Columns not working?

    @dsagfhjj What if you change it to

     

    ClearCollect(
     formattedcolSecurityAll,
     ForAll(
     colSecurityAll As _record,
     Patch(_record, {field_6: Lower(_record.field_6)})
     )
    );

     

  • rzuber Profile Picture
    545 Super User 2025 Season 1 on at
    Re: Drop Columns not working?

    @dsagfhjj Can you show me a screenshot showing where all the squiggly lines are in your formula?

  • MV-30041934-0 Profile Picture
    97 on at
    Re: Drop Columns not working?

    Maybe I have the collection being used somewhere else? I'll have to look around.

  • MV-30041934-0 Profile Picture
    97 on at
    Re: Drop Columns not working?

    Same error.

  • rzuber Profile Picture
    545 Super User 2025 Season 1 on at
    Re: Drop Columns not working?

    @dsagfhjj I have tried both of my suggestions on a temporary table, and received no errors.. There is another element to this puzzle we are missing.

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.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,658 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard