cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate IV
Advocate IV

ClearCollect output table header sometimes coming as Result and sometimes coming as Value. How to make it uniform?

I am using Collect/ClearCollect function to create collection like below

 

ForAll(OptionsMasterColl, Collect(CollOptions,Options.Title));

 

Above CollOptions collection displayed table under Title column. 

Below function is displaying table under Results column

 

ClearCollect(CollOptions,Split(PrevQuestion.AvailableOptions,";"));

 

 

How to make only one uniform column for same collection

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: ClearCollect output table header sometimes coming as Result and sometimes coming as Value. How to make it uniform?

Hi @MihirY :

I suggest you use RenameColumns() to modify the column names of the table obtained after the operation.

For example:

Through this formula, a column named Result can be obtained.

 

ClearCollect(CollOptions,Split(PrevQuestion.AvailableOptions,";"));

 

But after using RenameColumns(), a column named Value can be obtained.

 

ClearCollect(CollOptions,RenameColumns(Split(PrevQuestion.AvailableOptions,";"),"Result","Value"))

 

Best Regards,

Bof

 

View solution in original post

4 REPLIES 4
Highlighted
Responsive Resident
Responsive Resident

Re: ClearCollect output table header sometimes coming as Result and sometimes coming as Value. How to make it uniform?

what if you try this:

 

ForAll(OptionsMasterColl, Collect(CollOptions, {AnyColumnNameYouWant: Options.Title}));

 

Clear(CollOptions);
ForAll(Split(PrevQuestion.AvailableOptions, ";"), Collect(CollOptions, {AnyColumnNameYouWant: Result}));


Highlighted
Advocate IV
Advocate IV

Re: ClearCollect output table header sometimes coming as Result and sometimes coming as Value. How to make it uniform?

If I use above formula, it is displaying like below. So not helpful

MihirY_0-1596805748534.png

 

Highlighted
Responsive Resident
Responsive Resident

Re: ClearCollect output table header sometimes coming as Result and sometimes coming as Value. How to make it uniform?

I thought your question was on how to collect data into a single column.

Your Options.Title data comes from a SharePoint list and it is a multiselect column?

Highlighted
Community Support
Community Support

Re: ClearCollect output table header sometimes coming as Result and sometimes coming as Value. How to make it uniform?

Hi @MihirY :

I suggest you use RenameColumns() to modify the column names of the table obtained after the operation.

For example:

Through this formula, a column named Result can be obtained.

 

ClearCollect(CollOptions,Split(PrevQuestion.AvailableOptions,";"));

 

But after using RenameColumns(), a column named Value can be obtained.

 

ClearCollect(CollOptions,RenameColumns(Split(PrevQuestion.AvailableOptions,";"),"Result","Value"))

 

Best Regards,

Bof

 

View solution in original post

Helpful resources

Announcements
secondImage

New Return to Workplace

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

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,330)