cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
domates
Level: Powered On

Editing a joined Collection throws error

Hello Community,

 

i have been trying to edit a Collection which has been joined and also added a column with rownumbers. Now i need to be able edit a selected record in a seperate screen, but every time i try to do that i get the error that the column "Cluster" doesn't exist which it does in the collection view. Right now i'm editing the base  collection and afterwards the whole process starts again. This is very timeconsuming in large datasets.

 

ClearCollect(
        tempCollection,
        AddColumns(
            NewReqs,
            "LevelOfInnovation",
            LookUp(
                eval,
                Title = NewReqs[@Title]
            )
        )
    );
    Clear(AllReqs);
    ForAll(
        tempCollection,
        Collect(
            AllReqs,
            Last(
                FirstN(
                    AddColumns(
                        tempCollection,
                        "RowNumber",
                        CountRows(AllReqs) + 1
                    ),
                    CountRows(AllReqs) + 1
                )
            )
        )
    );

 

help.pnghelp2.png

Any idea how to solve this problem?

 

Regards,

domates

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Level 10

Re: Editing a joined Collection throws error

Hi @domates ,

 

Where do you put the ClearCollect formula in ? It may not work.

If you put them into OnStart or OnVisible property, don't forget to active it. 

Also can you share the error information of the formula? I recommend first showing only a few columns to test.

I have test on my side, I only leave two columns and the formulas can work well.

Annotation 2019-11-18 175026.png

Best regards,

Sik

 

View solution in original post

5 REPLIES 5
v-siky-msft
Level 10

Re: Editing a joined Collection throws error

Hi @domates ,

 

Levelofinnovation is the column of AllReqs, if you want to modify this column of the selected item, it should be in the Changed record.

 

Patch(AllReqs, SelectedItem, { LevelOfInnovation:{column1:"",column2:"", column3:"", ...}})

 

Note: All columns of levelofinnovation(eval) must be list in the {} . If there are too many columns to list, you can use ShowColumns function to only store the required columns to collection.

 

ClearCollect(
        tempCollection,
        AddColumns(
            NewReqs,
            "LevelOfInnovation",
            LookUp(
                ShowColumns(eval,"Title","RequiredColumn",...)
                Title = NewReqs[@Title]
            )
        )
    );

 

Best regards,

Sik

domates
Level: Powered On

Re: Editing a joined Collection throws error

Hi @v-siky-msft ,

thank you for replying. I have taken your advice and used the showcolumn method, but now i have this error showing up with a missing author. I have tried to use the User() method but it didn't work.

PA.png

Regards,

domates

 

v-siky-msft
Level 10

Re: Editing a joined Collection throws error

Hi @domates ,

 

Do you just only store Title columns to the tempcollection?

Can you share the screenshots of levelofinnovation column in the collection? (click the grid icon, enter levelofinnovation) 

Snipaste_2019-11-18_16-10-16.png

Note: In this patch function, you have to list all columns in levelofinnovation.

Best regards,

Sik

domates
Level: Powered On

Re: Editing a joined Collection throws error

Hi @v-siky-msft ,

even tho i have used showcolumns with the columns i need the tempcollection still is containing the the columns that i didn't specify in showcolumns. 

PA4.png

PA3.png

At the end i have to specify each column in the patch function which is a lot... and i'm not even finished yet.

PA5.png

Regards,

domates

v-siky-msft
Level 10

Re: Editing a joined Collection throws error

Hi @domates ,

 

Where do you put the ClearCollect formula in ? It may not work.

If you put them into OnStart or OnVisible property, don't forget to active it. 

Also can you share the error information of the formula? I recommend first showing only a few columns to test.

I have test on my side, I only leave two columns and the formulas can work well.

Annotation 2019-11-18 175026.png

Best regards,

Sik

 

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,404)