cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KRider
Resolver II
Resolver II

Collect from 1 list detailed reports, collect from 2nd list missing reports

Hey guys,

I'm back with another tough one! 

Ok, so I am building an audit app. I want to make it super user friendly and instead of 2 galleries for Audit complete/audit incomplete I want to have 1 gallery.

 

The gallery will either show the audit report OR have an add audit button.

My best thought for this so far is to

ClearCollect(auditcollection, Filter(auditdatabase, Line = var_managerline));

Collect(auditcollection, Filter(employeedatabase, Line = var_managerline))

 

My issue is I am having a brain block here. Can't figure out how to compare and only bring Employees who haven't been audited into the collection.

 

Thanks again!

1 ACCEPTED SOLUTION

Accepted Solutions

So, I actually didn't really combine them and should have mentioned that. I am filtering the galleries based on conditions. When you use Distinct that produces a .Result and that just made it easier that combining both. 

One list was processes(jobs for building) and the other list was people(sorted by area of work).

Working with the result I could control what lists were showing based on the the last dropdown(Team Member or Process).

The problem with result is that is the only information you get from that gallery. So I had to add the Team Member or Process cert + the time stamp it was created.

Then when I set the variable to load the certificate in my view screen I had to Trim out the name of the certification.

View solution in original post

5 REPLIES 5
KRider
Resolver II
Resolver II

Just an update. I changed my code to reflect a smaller search. Still can't get the collection to add only the missing members. I might end up having to create the missing users...

 

Here is my current collect code:

ClearCollect(
    col_Audits,
    Filter(
        GLD_TM_behavior,
        Line = varGLLine,
        Date >= DateValue(Year(Today())),
        Shift = varGLShift
    )
);
Collect(
    col_Audits,
    Filter(
        WestAssemblyEmployeeList,
        Line = varGLLine,
        Shift = varGLShift
    )
)

 

The problem with this, is it just adds all TM's into the collection on top of the ones already audited. I will keep working away and post when I figure it out.

Hi @KRider ,

 

Could you please share more details about your scenario? Would you like to combine two data bases based on some conditions?

 

We usually use AddColumns to combine data sources together, however, without knowing structure of the two lists, I'm not able to provide an "accurate" suggestion of formula. You may provide some demonstration data in screen shots or text, so that we can understand easily.

 

Best regards,

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

So, I actually didn't really combine them and should have mentioned that. I am filtering the galleries based on conditions. When you use Distinct that produces a .Result and that just made it easier that combining both. 

One list was processes(jobs for building) and the other list was people(sorted by area of work).

Working with the result I could control what lists were showing based on the the last dropdown(Team Member or Process).

The problem with result is that is the only information you get from that gallery. So I had to add the Team Member or Process cert + the time stamp it was created.

Then when I set the variable to load the certificate in my view screen I had to Trim out the name of the certification.

Hi @KRider ,

 

Maybe you can use GroupBy instead of Distinct, it will bring all the other columns data along with the unique values. And you will be able to reference the values in another Gallery.

 

Best regards,

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

KRider
Resolver II
Resolver II

ooo, I like it. I will try it out. Thank you for the suggestion! 😄 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,926)