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
Solved! Go to Solution.
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)
}
);
);
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
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?
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)
}
)
)
);
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).
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)
}
);
);
Now Did it great.
Thank you!!
User | Count |
---|---|
256 | |
126 | |
104 | |
49 | |
49 |