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 / if(lookup hekp please
Power Apps
Answered

if(lookup hekp please

(0) ShareShare
ReportReport
Posted on by

Hi all,

ive read all the articles i can find to no avail, its a simple one but i cant get it working. 

i have a table called 'loginstatus' when somebody logs in to a record it records the record id and their name , when they come out it removes them from the list , i want to set an icon to icon.lock if the record id is in that list. 

 

If(LookUp('Login status', 'Record id') = ThisItem.ID),icon.lock,icon.details)

 

If(LookUp('Login status', 'Record id' = ThisItem.ID),icon.lock,icon.details)

 

tried lots cant sus it out help please, this will work with just the look up but i need a true false scenario.

Categories:
I have the same question (0)
  • WiZey Profile Picture
    3,023 Moderator on at

    Hello @hstep ,

     

    With "IsBlank()", you can check if "LookUp()" has returned a result or not.

     

    If(
     IsBlank(LookUp(...)),
     Icon.Details, //A record doesn't exist
     Icon.Lock //A record exists
    )
    
  • mmollet Profile Picture
    3,187 on at

    If(IsBlank(LookUp('Login status', 'Record id' = ThisItem.ID)), do this if doesnt exist in list, do this if does exist in list)

     

    for icon.lock use Displaymode.Disabled

    for icon.details use Displaymode.Edit

     

    The formula will have to be in the DisplayMode property for the icons you want to use it on

  • Verified answer
    iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at
    If(!IsBlank(LookUp('Login status', 'Record id' = ThisItem.ID)),icon.lock,icon.details)

     

    Assuming when you said it removes them from the list it is actually deleting the row, then you can use the above.

     

    However if you are not deleting the row and instead setting the name to blank when they leave the records, then the following:

    If(!IsBlank(LookUp('Login status', 'Record id' = ThisItem.ID).YourNameFieldGoesHere), icon.lock, icon.details)
  • hstep Profile Picture
    on at

    still no luck :

    If(IsBlank(LookUp('Login status','Record id'=ThisItem.ID, Icon.Lock),Icon.DetailList))

  • hstep Profile Picture
    on at

    hi , i am setting the record id to blank but the name field stays populated with our emails until we fully log out , i still get an error on both 

    If(!IsBlank(LookUp('Login status', 'Record id' = ThisItem.ID).'Record id'), icon.lock, icon.details)

    If(!IsBlank(LookUp('Login status', 'Record id' = ThisItem.ID).Name), icon.lock, icon.details)

  • mmollet Profile Picture
    3,187 on at

    What is the error?

  • hstep Profile Picture
    on at

    sorted 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 181 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 112 Super User 2026 Season 2

Last 30 days Overall leaderboard