cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PytByt
Level 8

Re: search and filter from 2 different sites sharepoint list

Hi @leyburn19 

 

Where should i put those formula? 

I mean, i already try it OnStart property of the App and its gets blank collection.

 

Anyhow, can you make it more abovius for me for the Allrecords?  is that a variabel?

I'm a professionally noob with this.

 

I'm sorry, and thank you.

regards,

pytbyt

PytByt
Level 8

Re: search and filter from 2 different sites sharepoint list


@leyburn19 wrote:

Are the fields the same?  If So I would create a simple collection that does:

 

Collect(Allrecords,Source1);Collect(Allrecords,Source2)

 

The second collect would just append to the first but all fields need to match.  If the dont then do a Forall process:

 

EG:

Clear(Allrecords)

ForAll(Source1,Collect(Allrecords,{Fd1:Source1Field,Fd2:Source1Field});

ForAll(Source2,Collect(Allrecords,{Fd1:Source2Field,Fd2:Source2Field})

 

This second process may run into delegation issues depending on number of records in list.  You can also filter the source first toi get the status you want in bothe cases


Hi @leyburn19 

 

thank you for your reply.

 i just hit a road bump here with your question:

 

Are the fields the same?

unfortunately, the fields are not the same.

 

please enlight me for what exact formula should i use?

 

regards,

pytbyt

Super User
Super User

Re: search and filter from 2 different sites sharepoint list

Can you give me your source List names and your Field names from each source

 

Basically

Clear(Allrecords) - where Allrecords is your collection

ForAll(Source1,Collect(Allrecords,{Fd1Smiley Frustratedource1Field,Fd2Smiley Frustratedource1Field});  Source1 - yout list 1 name  Fd1 = a variable name for the date you want to capture from the list seperated by ":" (the icon is something that seems to replace a colon) and the the column name from your list.  this then replicates

ForAll(Source2,Collect(Allrecords,{Fd1Smiley Frustratedource2Field,Fd2Smiley Frustratedource2Field}) Source2 = your list2 name

PytByt
Level 8

Re: search and filter from 2 different sites sharepoint list

Hi @leyburn19 

 

This is i use on the OnSelect property of a button:

Collect(TesCol, '_Onboarding List'); Collect(TesCol, 'Candidate List');
ForAll('_Onboarding List', Collect(TesCol, {Name1: 'Candidate Name', Site1: 'Site Destination', Speciality1: Specialization}));
ForAll('Candidate List', Collect(TesCol, {Name2: 'Candidate Name', Site2: 'Site Name', Speciality2: Specialist, Status: Status3}))

 

it doesnt seems to working.

 

what went wrong? please help.

 

thanks,

pytbyt

Super User
Super User

Re: search and filter from 2 different sites sharepoint list

The Collect Statement may need all the names in each list. Unless they can be used as one

 

You will see I have renames the field to match but also added an extra column in the first for status and set contents to ""

 

In theory this will give a simple list to search on.  If you want seperate columns you would need to have every column names in both collections as teh collections must match.  

 

EG:

 

ForAll('_Onboarding List', Collect(TesCol, {Name1: 'Candidate Name', Site1: 'Site Destination', Speciality1: Specialization, Status:""}));

ForAll('Candidate List', Collect(TesCol, {Name1: 'Candidate Name', Site1: 'Site Name', Speciality1: Specialist, Status: Status3}))

View solution in original post

PytByt
Level 8

Re: search and filter from 2 different sites sharepoint list

@leyburn19 

 

i got this error instead:

coll error 1.png

 

i tried to make the status part empty, also give me the same error.

 

 

Super User
Super User

Re: search and filter from 2 different sites sharepoint list

You get that error as it is assuming you are looking for a column called Status.  If you want the word status put it in "Status"  or not just put ""

Super User
Super User

Re: search and filter from 2 different sites sharepoint list

You also do not need the first two collects as they will not work based on your columns not matching

PytByt
Level 8

Re: search and filter from 2 different sites sharepoint list

@leyburn19 

 

Thank you mate!

 

anyhow, how am i to show it in a gallery with only name and status = "converted"?

 

i already use working formula below to collect the data:

ForAll('_Onboarding List', Collect(TesCol, {Name1: 'Candidate Name', Site1: 'Site Destination', Speciality1: Specialization, Status1: ""}));
ForAll('Candidate List', Collect(TesCol, {Name1: 'Candidate Name', Site1: 'Site Name', Speciality1: Specialist, Status: Status3.Value = "Converted"}))

 

regards,

pytbyt

 

Super User
Super User

Re: search and filter from 2 different sites sharepoint list

Can you explain your status3.value?  Seems redundant to me.  All you need is Status: "Converted"

 

Your gallery would need a simple filter like Filter(TesCol,Status="coverted") 

 

but I dont know why you would want that at the moment because all the first collection records would be useless

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (7,093)