cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

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
Highlighted
Community Support
Community Support

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
Highlighted
Community Support
Community Support

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

Highlighted
Helper I
Helper I

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

 

Highlighted
Community Support
Community Support

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

Highlighted
Helper I
Helper I

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

Highlighted
Community Support
Community Support

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,166)