How to fetch the value of seen_by on my web page?

How to fetch the value of seen_by on my web page?

DATE_FORMAT(modified, ‘%%Y-%%m-%%d %%H:%%i:%%s’) as formatted_modified_time,
FROM tabAsset Request
WHERE employee = %s
ORDER BY STR_TO_DATE(transaction_date, ‘%%d-%%m-%%Y %%H:%%i:%%s’) DESC;“”",

what should I add here for fetch value from backend?

Thanks and Regards

  • “Track views” stores all views in “View Log” doctype.
  • “Track Seen” just stores who saw the current version of document in _seen column. It’s a JSON array of usernames.

Both of these only work on Desk i.e. /app/doctype/name pages. If you’re building custom pages you need create log manually for each view.

I already have tried to fetch the value from “seen” filed, but it’s throwing error

It’s _seen not seen and it’s only present if you’ve enabled “Track Seen”.

Mostly you’re looking for View Log which doesn’t reset after document is updated.

yes, I have tried both, seen/_seen, error throwing not defined, and I already have enabled.

error : {{ undefined value printed: access to attribute ‘_seen’ of ‘_dict’ object is unsafe. }}

I just want to fetch that value who’s opened last time


That’s because it’s not allowed to access attribute starting with underscore in server scripts, maybe select it with different alias _seen as seen_by?

ok, let me check.
I’ll confirm you