Hi,


I have create new web application using common/login as default for login page.

Then i need to create some logging for login info such as in new database/entity.

Is anyone has tried to do this? All i need just username and current datetime when they click LOGIN button in common/login.

Please kind to help me as a newbie in outsystems.

Thanks Guys.


Hi Yoga,

In common/login you can see there is an action created for login button.


Now in this method you can create log upon start of this login server action. You can add logs in two ways:

  • Use inbuild LogMessage server action to add log messages and see them in service center under Monitoring tab
  • Create your own entity for logging and add data you want in that entity

Hi Nikhil,


Thanks for your response,

i've create new entity with 3 columns : ID, UserNameLogin, and DateLoginTime.

But i'm still don't get it, how to enter value from Input Text Box in this below common\login to the entity.

Because i just have experienced with Form Object, but with this input text box, the value still show empty to the row in entity.


Nikhil Gaur wrote:

Hi Yoga,

In common/login you can see there is an action created for login button.


Now in this method you can create log upon start of this login server action. You can add logs in two ways:

  • Use inbuild LogMessage server action to add log messages and see them in service center under Monitoring tab
  • Create your own entity for logging and add data you want in that entity



Hi,


now i know how to enter the input box to record.

But still cannot grab current datetime for logging entity.

How to push CurrentDateTime to entity column when we click Login ?


You can use this inbuilt method to get current date & time of the server and assign it to you entity object

CurrDateTime()

I will recomend you to do this course first if you are developing with reactive web apps or this one if you are using treditional web apps.

Hi Nikhil,

Thanks for your recommendation, now i can pass the current date time to my entity.


Nikhil Gaur wrote:

You can use this inbuilt method to get current date & time of the server and assign it to you entity object

CurrDateTime()

I will recomend you to do this course first if you are developing with reactive web apps or this one if you are using treditional web apps.