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.
sorted thanks
What is the error?
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)
still no luck :
If(IsBlank(LookUp('Login status','Record id'=ThisItem.ID, Icon.Lock),Icon.DetailList))
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)
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
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
)
WarrenBelz
146,651
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional