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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / If you are an owner on...
Power Apps
Answered

If you are an owner on the list, you are able to see gallery items

(0) ShareShare
ReportReport
Posted on by 85

Dear PowerApp Experts,

 

I would like to ask you about one thing. I have a configuration list to my 'Suggestion Box app'.

 

Columns, which are important:

Mailbox (Single Line of Text)

Owners (People picker)

Allow public browsing (Yes/No)

 

What I want to achieve?

 

Basically, if you're an owner of Mailbox, you should be able to see all suggestions in the app (from your Mailbox only) even if Allow public browsing is "No". I implemented a variable named varIsProjectManager , which is checking, if you're an Owner and I don't know how to write a function SortByColumns to show Owner of the Mailbox all suggestions within Parameter "Mailbox" and it shouldn't be visible for another users.

 

Basically, I'm an owner of Mailbox Technical (picture below) and Allow public browsing is ticked as 'no' and I'm not able to see anything:

KarCz_1-1665437783751.png

 

 

Items in my gallery looks like below:

SortByColumns(
Filter([@'User Suggestions'],
(IsBlank(MailboxParam) || Mailbox = MailboxParam.Text) &&
MailboxChoice1.Selected.'Allow public browsing',
TextSearchBox1.Text in Title || TextSearchBox1.Text in Entry),
"Created",
If(SortDescending1, Descending, Ascending))

 

 

Now it's working for everyone - if Allow public browsing is No, my gallery is empty.

@RandyHayes please help

 

Thank you very much in advance,

Karol

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @KarCz 

    This is because you are comparing a control value only in your filter criteria.  You are not comparing that to any record value!

     

    This part of your formula has not context - MailboxChoice1.Selected.'Allow public browsing'

    What is this for and what is the purpose and what is compared?

     

  • KarCz Profile Picture
    85 on at

    @RandyHayes  that's true. Anyway I'm filtering a list with suggestions - Filter([@'User Suggestions'] (1)

    and the value is in configuration list, which is named "suggestion Mailboxes" (2). So basically I want to give in SortByColumns function one value from another list (while i'm filtering "User Suggestions" (1) list). That's why I used MailboxChoice1 from another screen, because Default value of that field is "MailboxParam", which is a parameter of Mailbox column from list "suggestion Mailboxes" (2)

  • Verified answer
    KarCz Profile Picture
    85 on at

    Okay I did it. Thanks for suggestion @RandyHayes !

    SortByColumns(
     Filter([@'User Suggestions'],
     (IsBlank(MailboxParam) || Mailbox = MailboxParam.Text) &&
     LookUp('suggestion Mailboxes', Mailbox = Param("Mailbox")).'Allow public browsing' = true || If(LookUp('suggestion Mailboxes', Mailbox = Param("Mailbox")).Owners.Email = User().Email, Mailbox = MailboxParam.Text),
     TextSearchBox1.Text in Title || TextSearchBox1.Text in Entry),
     "Created",
     If(SortDescending1, Descending, Ascending))

     

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard