cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hnguy71
Helper V
Helper V

Drop Columns from single record

Hi All.

 

I have an icon and on it's OnSelect property I create a variable called _ParentItem that collects entire record of that item inside a gallery:

Set(_ParentItem, ThisItem);


I then have an icon that patches to a collection but there are a few columns that I don't have and I want to drop the columns but it's not allowing me:
donthave.png

How can I drop columns / fields from a record?

1 ACCEPTED SOLUTION

Accepted Solutions
Drrickryp
Super User
Super User

Hi @hnguy71 

You would use the DropColumns() function to do that when you create the variable.  Please see https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-table-shaping

View solution in original post

4 REPLIES 4
Drrickryp
Super User
Super User

Hi @hnguy71 

You would use the DropColumns() function to do that when you create the variable.  Please see https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-table-shaping

View solution in original post

Ahh drop them while I create the variable. Got it! I'll try that!

pwagma
Helper I
Helper I

I am stuck with this issue. When I  create the variable, I take it from a selected item of a gallery, so it doesn't let me drop the column at this moment

Any idea? I need to keep the variable as a single record

erfernandes
Regular Visitor

I had a similar case right now... I added a column to a datasource to show in my gallery and then I should send the selected gallery register to another screen where I have a SharePoint form to edit the selected item.

 

I solved this way (I put the bellow code in a button in the gallery item):

 

UpdateContext({ 
    varMyVariable: 
    First(
        DropColumns(
            Table(
                ThisItem
            );
            "myAddedColumnName"
        )
    )
});;
Navigate('My Destination Screen'; Fade; { varSelectedGalleryItem: varMyVariable })

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (994)