Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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.

  • hstep Profile Picture
    on at
    Re: if(lookup hekp please

    sorted thanks

  • mmollet Profile Picture
    3,187 on at
    Re: if(lookup hekp please

    What is the error?

  • hstep Profile Picture
    on at
    Re: if(lookup hekp please

    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)

  • hstep Profile Picture
    on at
    Re: if(lookup hekp please

    still no luck :

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

  • Verified answer
    iAm_ManCat Profile Picture
    18,206 Most Valuable Professional on at
    Re: if(lookup hekp please
    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)
  • mmollet Profile Picture
    3,187 on at
    Re: if(lookup hekp please

    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

  • WiZey Profile Picture
    3,023 Super User 2025 Season 1 on at
    Re: if(lookup hekp please

    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
    )
    

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,651 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard