Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Show some records in gallery

(0) ShareShare
ReportReport
Posted on by 166

Hi, In this picture below is the collection that has column: license_number, and I do not want to show the record has "-" in the gallery. 

This is the code that I've tried.

 

I am looking forward to hearing your feedback and advice 

Thank you 

 

infinitepp_0-1619615580685.png

 

ForAll(
 tbl_hist_insurance,
 If(
 license_number = "-",
 Hidden
 );
 Collect(
 col_insuranceData,
 {
 SaleCode: SaleCode,
 license_number: license_number,
 sale_TName: LookUp(
 tbl_mas_saleagents,
 Title = tbl_hist_insurance[@SaleCode]
 ).sale_TName,
 sale_FName: LookUp(
 tbl_mas_saleagents,
 Title = tbl_hist_insurance[@SaleCode]
 ).sale_FName,
 sale_LName: LookUp(
 tbl_mas_saleagents,
 Title = tbl_hist_insurance[@SaleCode]
 ).sale_LName,
 license_name: LookUp(
 tbl_mas_license,
 licenseCode = tbl_hist_insurance[@licenseCode]
 ).license_name
 }
 )
);

 

 

Categories:
  • infinitepp Profile Picture
    infinitepp 166 on at
    Re: Show some records in gallery

    Thanks very much for your help! You are a magician.😘  messageImage_1619689168150.jpg

  • Verified answer
    praeclarus Profile Picture
    praeclarus 34 on at
    Re: Show some records in gallery

    if you mean you want to hide the record has "-" in column license_number. 

    Maybe you can try this before ForAll function.

     Remove(
     tbl_hist_insurance,
     First(
     Filter(
     tbl_hist_insurance,
     license_number = "-"
     )
     )
    );

     

  • proxyprochy Profile Picture
    proxyprochy 92 on at
    Re: Show some records in gallery

    you have to define what it doesn't equal to,

     

    for example:

    LookUp(MyColl, Column1.Value = stringA && Column1.Value != stringB)

  • infinitepp Profile Picture
    infinitepp 166 on at
    Re: Show some records in gallery

    Yes I'd like to hide the record completely and This is error: Expectation Operator, I'm not sure what's my mistake.

    infinitepp_1-1619617514677.png

     

     

  • proxyprochy Profile Picture
    proxyprochy 92 on at
    Re: Show some records in gallery

    Or if you want to hide the record completely from the gallery,

     

    just specify in the LookUp function that you don't want records that contains "-" in the column license_number..

     

    I'm not sure what your source looks like, but i guess you got the point:

     

    LookUp(
    tbl_mas_license,
    licenseCode = tbl_hist_insurance[@licenseCode] && tbl_hist_insurance[@licenseCode] != "-")

  • proxyprochy Profile Picture
    proxyprochy 92 on at
    Re: Show some records in gallery

    The easiest way is:

     

    If(license_name = "-", "")

     

    = if licence name = "-", then it's replaced by empty string.

     

    Hope it works!

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,304

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard