Current Date Time to Value of Entity

Hi,

I have to create Logging for Login my Web Application.

I have create few inputs object in Form Object, for example UserName.

Then UserName from Form Object has been add to entity successfully, but how to grab CurrDateTime() to column in entity. So the point is i want to grab this below example record in entity.

ID     UserName       LoginDateTime

1       XYZ                 2019-12-26   15:00:00

Hi Yoga,

It seems that you haven't go through the tutorials available here.

Please go there and follow the Become a Traditional Web Developer path, I'm sure that after that you will be able to perform what you want.

Hi Yoga,

You can create a local variable on the screen and set its type of your entity. Then on login button action you just have to set username and assign CurrDateTime() to LoginDateTime. Now you can call create method of your entity and pass this object.

Hello Yoga, 

Please use the built-in CurrDateTime() as the default value for your column in your entity. 

Would recommend you to do the training modules in OutSystems. 

Hope this helps !!! 


Hi All,

Thanks for advice, after that i have tried to using logic Assign, so the CurrDate can pass to entry date in entity.





Thanks

Yoga HK wrote:

Hi All,

Thanks for advice, after that i have tried to using logic Assign, so the CurrDate can pass to entry date in entity.





Thanks


Hello Yogesh

You do not need the assignment. You can set the default value of the entity attribute to CurrDataTime() and it will work and it is efficient too.