web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Avoiding Nested Collec...
Power Apps
Answered

Avoiding Nested Collections

(0) ShareShare
ReportReport
Posted on by 84

I am creating a simple collection, but it is nesting one of the fields into another table.  I need to just pull in the text value into that field.

 

CollResponses

      Q1             Q2

   Agree        Disagree

 

ClearCollect(CollResponsesTransposed,
{Q_Num: "Q1", Response:CollResponses.Q1},

{Q_Num: "Q2", Response:CollResponses.Q2} );

 

The Response column is showing the values as in a nested table when I just want it to show either "Agree" or "Disagree" as text.

Categories:
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Pegger,

    Have you solved your problem?

    Do you want to display a text string using the CollResponses.Q1 in the CollResponsesTransposed?

    Actually, if you refer to the Qi or Q2 using the "CollResponses.", it does create nested collection and an empty useless Q1 or Q2 column.

    Add a new button and set the OnSelect property as below:

    ClearCollect(
     NewCol,
     ShowColumns(
     AddColumns(
     CollResponsesTransposed,
     "ResponseNew",
     If(
     Q_Num = "Q1",
     First(
     Split(
     Concatenate(
     First(CollResponses).Q1,
     ",",
     First(CollResponses).Q2
     ),
     ","
     )
     ).Result,
     Last(
     Split(
     Concatenate(
     First(CollResponses).Q1,
     ",",
     First(CollResponses).Q2
     ),
     ","
     )
     ).Result
     )
     ),
     "Q_Num",
     "ResponseNew"
     )
    )

    vqiaqimsft_0-1632213754353.png

     

     

     

  • Verified answer
    Ethan_009 Profile Picture
    4,840 Moderator on at

    Hi @Pegger ,

     

    I have created similar condition and this works,

    For colResponse,

    ClearCollect(colResponse,
     {
     Q1: "Agree",
     Q2: "Disagree"
     }
    );

     

    For colResponseTranpose,

    ClearCollect(colResponseTranspose,
     {
     Q_Num: "Q1",
     Response: First(colResponse).Q1
     },
     {
     Q_Num: "Q2",
     Response: First(colResponse).Q2
     }
    );

     

    Output

     

    Ethan_R_0-1632225707481.png

     

     

    Hope this helps.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard