How to send via formOutput the automatically set date(today)


Hey guys,
I'm new to bonity and have trouble with a date picker. I have a form with a date picker, which is set to read-only because I want to just set the date automatically.

So at this time my value of the date picker is set to "formInput.bvar_ManuskriptEinsendenInput.eingereichtAm", which is of course wrong, because I dont want the client to choose the date. "eingereichtAm" is my date-variable:

So I tried to set this variable in my formOutput, but its of course wrong:

Is there a way to set and pass the variable "eingereichtAm" through formOutput?

Can sb. help me, dont know how to set it automatically :/


Submitted by Dibyajit.Roy on Tue, 05/22/2018 - 19:49

I may have misunderstood your question ,
But here is a solution that I would use.
In your UI designer, Select create Variable.
the type should be java script expression.
use "return new Date(); to get current date and time.
Now you can do formInput.variable = javascriptVariable
and in your widget, set value as javascriptVariable

This would assign Current Date to your widget.


Submitted by Silkroad_Online... on Tue, 05/22/2018 - 21:20

This is totally embarrassing.... I assumed that this would not work.
Thanks alot! It works now.
I had two mistakes. 1. I tried something like: formInput.variable = $javascriptVariable. But its like u said, without the $ and 2. I wrote return; and this also didnt work, only return new Date();
Thank you very much!

No answers yet.