Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Trying to compare 2 Galleries (Lists) and find missing data

Posted on by 353

I have 2 Sharepoint lists called MeterReadings and Auths and there is a common field called auth in both lists

I want to create a Gallery that will show records from MeterReadings where the auth is Not in the Auths list

 

Delegation is a problem as both lists have > 2000 records in them, also the auth field in Meter Readings sometimes has multiple auths like this: 01234K;23456L;45678P. so I will need to use the In function to compare I think

any help much appreciated as always...

Categories:
  • WarrenBelz Profile Picture
    WarrenBelz 143,246 on at
    Re: Trying to compare 2 Galleries (Lists) and find missing data

    @bobgodin ,

    Exactly - please check it gets the results as the alternative structure (effectively looking backwards) is even more complex.

  • bobgodin Profile Picture
    bobgodin 353 on at
    Re: Trying to compare 2 Galleries (Lists) and find missing data

    @WarrenBelz I tried changing my datarow limit to 500 and the query ran without crashing but came up with 500 missing records so not sure it has worked...tomorrow is another day?

  • bobgodin Profile Picture
    bobgodin 353 on at
    Re: Trying to compare 2 Galleries (Lists) and find missing data

    @WarrenBelz I made 2 collections which have given me the latest 2000 records from each List and took out the With statement and it still crashes - is there something else I can try?

  • WarrenBelz Profile Picture
    WarrenBelz 143,246 on at
    Re: Trying to compare 2 Galleries (Lists) and find missing data

    @bobgodin ,

    It works perfectly here with a couple of collections with the same names and fields, however this is a very complex filter, which is exacerbated by your delimited text column and the need to check each value in each field. I am not totally convinced you will get the right result now - you will have to test it when it gets working. Instead of the With() Statements, make a couple of collections with the same data and then filter them and see if that works.

  • bobgodin Profile Picture
    bobgodin 353 on at
    Re: Trying to compare 2 Galleries (Lists) and find missing data

    @WarrenBelz a new screen and Gallery didn't help - I get the racing ants at the top of the screen and thewn after a couple of minutes bam - it crashes my browser:

    bobgodin_0-1707194162947.png

     

  • bobgodin Profile Picture
    bobgodin 353 on at
    Re: Trying to compare 2 Galleries (Lists) and find missing data

    @WarrenBelz - the problem was the double quotes around Client were the wrong kind - I got an error unexpected character U+201c but when I replaced the double quotes and the red line went away it crashed my session and it keeps doing this....I'll try a new screen..

  • WarrenBelz Profile Picture
    WarrenBelz 143,246 on at
    Re: Trying to compare 2 Galleries (Lists) and find missing data

    @bobgodin ,

    Are you sure clientname is the correct name for the field you are adding and that was the original field name ? Nothing else makes sense presently.

  • bobgodin Profile Picture
    bobgodin 353 on at
    Re: Trying to compare 2 Galleries (Lists) and find missing data

    Hi @WarrenBelz - it's on "Client" - it says AddColumns has some invalid arguments, expected operator......

     

    the word Client redline is heavier than the rest of the code...

  • WarrenBelz Profile Picture
    WarrenBelz 143,246 on at
    Re: Trying to compare 2 Galleries (Lists) and find missing data

    @bobgodin ,

    What is the error ? I made a couple of collections here with the same names as your lists (out of some test lists) and renamed some fields the same as yours - it ran as below with no errors and produced the expected result. I am assuming that both auth fields are Single Lines of Text

    WarrenBelz_0-1707190825427.png

     

  • bobgodin Profile Picture
    bobgodin 353 on at
    Re: Trying to compare 2 Galleries (Lists) and find missing data

    Hi @WarrenBelz thank you for the prompt response

    I copied and pasted your code (with a minor change to Auth - it's auth lowercase) and half of the code looks good but the 2nd half there is an error - see attached screenshot

    thanks

     

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,246

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,884

Leaderboard