Hi Community,
I'm looking for some bright minds to solve the following problem.
I´m looking for a soluction to check if new items where uploaded to the app since last user login to highlight them. After next login the "highlight" icon, for example "new" should be invisible for this user.
What is the starting point:
I have created the follwoing formula for the OnStart field of the App:
Set(lookupRecord; LookUp('App Logins'; Title = User().Email));; If(IsBlank(lookupRecord.Title); Patch('App Logins'; {Title: User().Email});Patch('App Logins';First(Filter('App Logins'; Title = User().Email)); {'Last Login': Now()}))
App Logins is a separated sharepoint list which is connected to the App and stores the logged in users without producing duplicates. When the user opens the app for the first time, then it is saved in the list. If the user already exist in the list, the "Last Login" field will be updated with the actual date and time.
In my gallery i have inserted a icon with the following "visible" code:
If(LookUp('App Logins'; Title = User().Email).'Last Login' >= ThisItem.Modified;false;true)
So far so good. My problem is that the icon is only visible for a short time (time between the update of the "Last Login" field which automatially changes the Modified field in this list.
That´s why I´m looking for ideas to solve the problem. One solution could be, to wait with the patch function for the App logins until user leaves the App.
Do you have an idea how to?