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 / Create a Collection
Power Apps
Unanswered

Create a Collection

(0) ShareShare
ReportReport
Posted on by 105

Hi,

 

I need to show two SharePoint list data in one gallery with the selected column. Would you please advise me on how to do it?

List1 Selected Columns: RMA No., Created, Client, Remark

List2 Selected Columns: NC No., Created, Client, Remark

 

Gallery Column: RMA No., NC No., Created, Client, Remark

Thank you in advance

 

 

Categories:
  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @Setayesh2 so I expect the link between both lists to be 'Client'.
    In that case you could use the AddColumns() function to combine the 2 lists:

     

     

    AddColumns(List1 As Main,"NC No",LookUp(List2,Client = Main.Client).'NC No')

     

     


    If Client is a record/LookUp you might need to use Client.ID = Main.Client.ID. (or another unique field of the client record)

    If this solves your question, would you be so kind as to accept it as a solution.
    Thanks!

  • Setayesh2 Profile Picture
    105 on at

    Thank you @LaurensM 

    No there is no link between the lists. The gallery is for getting a report to print.

    So the main part of the report is 'remarks' which is a multiline text.

    The result records may have RMA No. or NC No.

    RMA creates by an external application, but NC is written manually or can be SharePoint ID 

    means if we don't have RMA no. then we add the data in the second list with NC no.

  • LaurensM Profile Picture
    12,516 Moderator on at

    @Setayesh2 if no fields are linked between the lists or have overlap.
    If RMA No is empty, what NC No value / record should be added to that list item via AddColumns()?

    Do the SharePoint IDs match, meaning ID 1 in the RMA list will be linked to the ID 1 of the NC No list?
    (Should the remarks be the same, you could swap the client in the code above with remarks.)

  • Setayesh2 Profile Picture
    105 on at

    @LaurensM 

    yes, the gallery records may have RMA no. or NC no., but they will have created, Remarks and Client.

    and there is no link between SharePoint lists.

    Setayesh2_0-1671016958943.png

     

  • Setayesh2 Profile Picture
    105 on at

    I could get the records by

    ClearCollect(colPrints,ShowColumns('List1',"RMA_x0020_No_x002e_","Created","Remarks","ClientName","Status"),ShowColumns('List2',"NC_x0020_No_x002e_","Created","Remarks","ClientName","Status"));

     

    But I have a problem with Filter function that I already used in Gallery Item,

    it was working:

    Filter('List1',StartsWith('RMA No.',txtrRMA.Text) && Created >= dprStart.SelectedDate && Created <= DateAdd(dprEnd.SelectedDate,1) && StartsWith('Client Name',txtrClientName.Text) && Status.Value =ddrStatus.Selected.Value)

    But not working with the collection I made. The collection is correct if I use it without Filter.

    Filter(colPrints,StartsWith(RMA_x0020_No_x002e_,txtrRMA.Text) && Created >= dprStart.SelectedDate , Created <= DateAdd(dprEnd.SelectedDate,1) , StartsWith(ClientName,txtrClientName.Text) , Status.Value =ddrStatus.Selected.Value)

    Any idea?

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard