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 / Colection from sharepo...
Power Apps
Answered

Colection from sharepoint Lists

(0) ShareShare
ReportReport
Posted on by 308

Hi

 

I have a collection that gets all RefIDProj from an user.

It's showwing RefIDProj, Busca (email from user) and it's showing all other columns from user. Is that possible to show only email?

 

Collect(MyPeople; AddColumns(Filter(ProjEquipe;Integrante = Lower(ThisItem.Mail)).RefIDProj;"Busca";Lower(ThisItem.Mail))

 

where: ProjEquipe - sharepoint list with RefIDProj and user of project

RefIDProj       Integrante

1                   alessandramacedo@xxxx.com

2                   raphael@xxxx.com

3                   mario@xxx.com

 

 

 

And I need to then collect from another list all data form projects that has same RefIDProj from this collection.

Is that possible?

 

Sharepoint list = ProjProjetos

IDProj(same as RefIDProj)           ProjectName              Description

1                                                  Project1                      DProject1                      

2                                                  Project1                      DProject2                      

3                                                  Project3                      DProject3                     

 

Collection MyPeople

RefIDProj             Integrante                                         ProjectName           Description

1                          alessandramacedo@xxxx.com          Project1                   DProject1                      

2                          raphael@xxxx.com                            Project2                      DProject2                      

3                         mario@xxx.com                                  Project3                      DProject3 

 

 

 

Thanks in advance

 

 

 

Categories:
I have the same question (0)
  • BCLS776 Profile Picture
    8,994 Moderator on at

    If I understand correctly, you want to combine selected columns from the ProjEquipe and ProjProjetos lists into a single collection named MyPeople. If so, try this:

    ClearCollect(MyPeople,
     ForAll(ProjProjetos as aRecord,
     {
     ReflDProj: aRecord.IDProj,
     Integrante: LookUp(ProjEquipe, ReflDProj = aRecord.IDProj, Integrante),
     ProjectName: aRecord.ProjectName,
     Description: aRecord.Description
     }
     )
    )

    Hope this helps,

    Bryan

  • alessandramaced Profile Picture
    308 on at

    Hi Bryan almost this

     

    This collection is set up in on select of a textbox where I put a email for search.

    What I want to say is that the collection must filter all records from projects (sharepoint list ProjProjeto) where this user (textsearch) is part of team (team is in sharepoint list ProjEquipe). When I put an email in this textsearch than will collect all projects from the user.

    Is that possible to include this?

  • BCLS776 Profile Picture
    8,994 Moderator on at

    Yes, you can do this too - it's a step more complicated. Assuming you have a text box called "txt_Inp1", try this code:

    Clear(MyPeople);
    ForAll(Search(ProjEquipe, txt_Inp1.Text, "Integrante") As aSearch,
     ForAll(aSearch As aRecord,
     Collect(MyPeople,
     {
     ReflDProj: aRecord.RefIDProj,
     Integrante: aRecord.Integrante,
     ProjectName: LookUp(ProjProjectos, IDProj = aRecord.RefIDProj, ProjectName),
     Description: LookUp(ProjProjectos, IDProj = aRecord.RefIDProj, Description)
     }
     )
     )
    );

     

  • alessandramaced Profile Picture
    308 on at

    Didn't work. 

    Clear(MyPeople);;
    ForAll(Search(ProjEquipe;Title2_4.Text;"Integrante") As aSearch;
    ForAll(aSearch As aRecord;
    Collect(MyPeople;
    {RefIDProj: aRecord.RefIDProj;
    Integrante: aRecord.Integrante;
    NomeProjeto: LookUp(ProjProjeto; IDProj = aRecord.RefIDProj; NomeProjeto);
    UnidadeGestora: LookUp(ProjProjeto; IDProj = aRecord.RefIDProj; UnidadeGestora)
    }
    )))

     

    Says ForAll has invalid arguments, don't know why

    Here in Brazil we use ";" instead ",".  (i did the changes).

  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    OK, I tested this version on my side and it seems to work. I forgot nested ForAll statements don't like to operate on the same table:

    ClearCollect(MyPeople,
     ForAll(Search(ProjEquipe, txt_Inp1.Text, "Integrante") As aRecord,
     {
     ReflDProj: aRecord.RefIDProj,
     Integrante: aRecord.Integrante,
     ProjectName: LookUp(ProjProjetos, IDProj = aRecord.RefIDProj, ProjectName),
     Description: LookUp(ProjProjetos, IDProj = aRecord.RefIDProj, Description)
     }
     );
    );
  • alessandramaced Profile Picture
    308 on at

    Now Did it great.

    Thank you!!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 534

#2
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard