Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Show in App multiple columns from single SP list row based on values in other columns in same row

(1) ShareShare
ReportReport
Posted on by 4
The scenario is before someone uses a tool they either complete a checklist for that tool or if a checklist has been submitted previously for that tool, they get to review the defects noted from the previous submission. i.e. the problem is Displaying Defect Answers only from an earlier submission.
When a checklist is submitted it patches to a Sharepoint list.
When the next person comes along, and selects the tool, I create a collection of the latest submission "LatestSubmissions" for that tool. The collection is a single line table with the questions, answers and any comments for defects where a defect is A = "N". There can be multiple questions in the checklist, field_4 = Q01, field_5 is A01, field_6 is C01, field_7 = Q02, field_8 is A02, field_9 is C02. etc.
I am looking to be able to show to create another Collection "NResponses" of all the Questions and Comments where the Answer is N, so I can display them on a Gallery with Items "NResponses". However I can not work out how to create that NResponses collection - I can create it for the first N answer, or the last N answer, but not more than 1.
For example, this only captures one answer.
ClearCollect(
NResponses,
ForAll(
LatestSubmissions,
If(
field_5 = "N",
Collect(NResponses, {Question: field_4, Comment: field_6})
);
If(
field_8 = "N",
Collect(NResponses, {Question: field_7, Comment: field_9})
)
)
)
Any suggestions appreciated.
  • PMAM Profile Picture
    4 on at
    Show in App multiple columns from single SP list row based on values in other columns in same row
    Thanks @mmbr1606, for your help. However, my App doesn't seem to like ConcatenateCollections. I have also tried replacing ConcatenateCollections in your code with Concat or Concatenate, but neither seem to work.
     
  • mmbr1606 Profile Picture
    11,950 Super User 2025 Season 1 on at
    Show in App multiple columns from single SP list row based on values in other columns in same row
    hey
     
    can u try this:
    Clear(NResponses);
    
    ForAll(
        LatestSubmissions,
        With(
            {
                tempNResponses: ConcatenateCollections(
                    If(field_5 = "N", [{Question: field_4, Comment: field_6}], []),
                    If(field_8 = "N", [{Question: field_7, Comment: field_9}], [])
                    // Add more lines here for additional questions as needed
                )
            },
            Collect(NResponses, tempNResponses)
        )
    );
    
    If the Post help you solve your issue, please mark it as verified answer and give it a like so we can help other in the community with similar issues 

    Greetings
     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,522 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,890 Most Valuable Professional

Leaderboard