Hi, I am trying to make a view start in “show unread documents only” state.
I have made a button in a view where the users can select to view “all” or “unread” documents only.
It has gotten so popular, that they would like the view to remember if the setting was enabled or disabled in last session, and start in the last selected state.
If you want to know how the button can be made see this: Read/Unread documents in Inbox | eknori.de
So I now have an environment-string set to “True”, when the view should start up in a “only show unread documents” state, and I have the following code in the “PostOpen” on the view:
@If(@Environment(“ShowUnreadNewsOnly”) = “True”; @Command([ViewShowOnlyUnread]);@True)
This executes, and I have checked that the right part of the @If is evaluated, but it does exactly nothing.
Does anyone have a good suggestion to get a view to start in a “show only unread documents” state?
Thanks in advance,
Jesper