web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Show some records in g...
Power Apps
Answered

Show some records in gallery

(0) ShareShare
ReportReport
Posted on by 189

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:
I have the same question (0)
  • proxyprochy Profile Picture
    92 on at

    The easiest way is:

     

    If(license_name = "-", "")

     

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

     

    Hope it works!

  • proxyprochy Profile Picture
    92 on at

    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] != "-")

  • infinitepp Profile Picture
    189 on at

    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
    92 on at

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

     

    for example:

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

  • Verified answer
    praeclarus Profile Picture
    34 on at

    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 = "-"
     )
     )
    );

     

  • infinitepp Profile Picture
    189 on at

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

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard