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

Notifications

Announcements

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:
I have the same question (0)
  • v-qiaqi@microsoft.com Profile Picture
    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,838 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard