Customer Banners (Ads) - SpiceUp. AX and SpotfireX Disclaimer



If you find this site useful and you want to support, buy me a coffee   to keep this site alive and without ads.

Current user in webplayer

The System.Environment shows the actual logged in user in client but not in webplayer.  A work around is to use bookmarks

from Spotfire.Dxp.Application import BookmarkComponentFlags  
from Spotfire.Dxp.Application.AnalyticItems import BookmarkManager

#define name of temp bookmark (make sure is unique)
bookmarkName = "$_tmp_bookmark_$"

#create the bookmark. Second argument specifies what to capture
myBookmark = Document.Bookmarks.AddNew(bookmarkName ,BookmarkComponentFlags.FilterSettings)

#extract data from myBookmark 
print myBookmark.CreatedBy

#delete temp bookmark
Document.Bookmarks.Remove(myBookmark)


No comments: