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 / icon should be visible...
Power Apps
Unanswered

icon should be visible when the user email is listed

(1) ShareShare
ReportReport
Posted on by 822 Super User 2025 Season 2
I am just trying to find out whats my mistake in my formula 

I have a gallery where there is an icon that is supposed to be visible if the current user is listed in that specific column named isDownloadedBy

my varCurrent user definition: 
Set(varCurrentUser, User().Email);

here is the button that downloads the file which patches the user's email to the column. I have checked the list and what email was patched and it is all in lowercase.
 
ForAll(
    Filter(galDownloadNDAFiles.AllItems, cbSelectFile_ADFS.Value = true), 

    //for each selected record, download the file
    Download(
        "https://xyz.sharepoint.com/sites/xyz/_layouts/15/download.aspx?" & "SourceUrl=https://xyz.sharepoint.com/sites/xyz/" & ThisRecord.'Full Path'
    ); 


    //put the email of the user who downloads the file
    Patch(
        'Uploads', 
        ThisRecord,
        {
            isDownloadedBy: 
                If(
                    IsBlank(ThisRecord.isDownloadedBy), 
                    varCurrentUser,
                    ThisRecord.isDownloadedBy & ", "& varCurrentUser
                )
        }
    );
)



heres my visible property formula for the icon inside the gallery. 
 
With(
    {
        splitAdmins: Split(ThisItem.isDownloadedBy, ",")
    }, 
    varCurrentUser in ForAll(splitAdmins, Lower(Trim(Value)))
)

doesn't seem to work even though my email is listed in the column.
Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at
    Hi!
     
    Can you please share an example values for both the var and isDownloadedBy? Without that it's a guessing game.
     
    Perhaps the issue is that there are calitals in the variable value. This can be fixed by using the Lower fuction:
     
    Set(varCurrentUser, Lower(User().Email));
     
    If this reply helped you in any way, please give it a Like 💜 and in case it resolved your issue, please mark it as the Verified Answer ✅.
  • Suggested answer
    stampcoin Profile Picture
    5,058 Super User 2025 Season 2 on at
     
    This totally depends on your 'isDownloadedBy' value,
    If it has values like full name, it will absolutely not work.
    and the code you have , it's better to use :
    With(
        {
            splitAdmins: Split(Gallery1.Selected.Value ,",")
        }, 
        !IsEmpty(
            Filter(
                splitAdmins,
                Lower(Trim(Value)) = Lower(Trim(varCurrentUser))
            )
        )
    )
    Also, you have to consider the empty value.
    So, please check what is the value in isDownloadedBy, if it contains full name, the varCurrentUser should have User().Fullname
     
     
  • KevinGador Profile Picture
    822 Super User 2025 Season 2 on at
    Apologies for posting a question with incomplete codes.

    I have updated the post with the download button functionality which puts the user's email in the isDownloadedBy column.
  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at
    Hi!
     
    Still it's hard to give feedback without seeing sample values.
     
    What is clear from the additional formula is the delimeter that is used. Based on this, the formula for the visible propert of the icon can be simplified to:
     
    Lower(varCurrentUser) in Split(
        ThisItem.isDownloadedBy, 
        ", "
    )
     
     
    If this reply helped you in any way, please give it a Like 💜 and in case it resolved your issue, please mark it as the Verified Answer ✅.
  • Verified answer
    stampcoin Profile Picture
    5,058 Super User 2025 Season 2 on at
    I think your with (......) won't reflect the updated record immediately after the patch. At least I didn't see it from your description.
    After For All, add :
    Refresh('Uploads')  // assume this is your gallery data source, otherwise change it to your gallery data source.
    Then you will get the patched result.
     
     
     
  • KevinGador Profile Picture
    822 Super User 2025 Season 2 on at
    @stampcoin ahh yess! This is the case! I can now see the check. I ddn't realize that it needs refreshing.

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard