LT

Hello,

Can anyone tell me how to get the current user and date who is executing some report in ARIS..?

 

Regards

by Martin Schröder
Badge for 'Contributor' achievement
Posted on Thu, 02/03/2011 - 13:11

ARIS Script Help ( [F1] in the Code Script Editor ) would have told you faster:

ArisData.getActiveUser().Name(nLocale) 

For the current date there are two possibilites:

OutputField(Constants.FIELD_DATE,... ) and OutputField(Constants.FIELD_TIME,...)

or the javascript (not ARIS Script) object 

var date = new Date()

Other inspiring sources are the off the shelf report script "output model information" and the common script libraries atsallen.js and commonUtils.js

0
by Edwin Verstraeten
Posted on Wed, 02/09/2011 - 13:54

In macro's it's quite different to retrieve the current user. Here you should use the following construction:

var oModels = Context.getSelectedModels(); // This can be any context of a macro

var oDB = Context.getLoginInfo(oModels[0]).getDatabase();  
var sUser= Context.getLoginInfo(oModels[0]).getUserName();

Cheers,

Edwin

0
by Łukasz Kowol
Posted on Mon, 04/18/2011 - 12:01

Hi,

Construction var date = new Date() works , but  format of date/ time is not properly for me.

Can anyone tell me how to get  current date/time in format YYYY-MM-DD / HH:MM.

I need to get raport execution date/time and put it into the header of output file.

 

0
by Łukasz Kowol
Posted on Mon, 04/18/2011 - 12:22

 

I try to solve the problem by use JavaScript methods, for example like that:

var current_date = new Date();

var current_date_str = current_date.getFullYear() + "-" + current_date.getMonth() + "-" + current_date.getDate();

But maybe exist easier wat to do it by use ARIS script methods...

0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock