Thank you, it works
The question of guidelines of how to use JS in such cases, still remains
–l.
( for example, when I try to do this:
Lost=var rescurrin = widget.getRoot().getWidgetById(’#ResCurrIn’); rescurrin.set_value(‘Lost’); # this part works but
var currentTime = new Date(); var month = currentTime.getMonth()+1; var day = currentTime.getDate(); var year = currentTime.getFullYear(); widget.getRoot().getWidgetById(’#ResHistory’).value = ‘Lost ‘+ day + ‘/’ + month + ‘/’ + year + ‘\n’ + widget.getRoot().getWidgetById(’#ResHistory’).value; # this part does not
(even if I use extra variables for storing the #ResHistory (being a textarea) value and compose it; like this
Timestamp = var currentTime = new Date(); var month = currentTime.getMonth()+1; var day = currentTime.getDate(); var year = currentTime.getFullYear(); reshistory = widget.getRoot().getWidgetById(’#ResHistory’); reshistory.value = 'Lost '+ day + ‘/’ + month + ‘/’ + year + ‘\n’ + reshistory.value;
(it can set_value() but trying to var savehistory = reshistory.value;
does not bring it back)
And yes, I want to add the newest event in history to the top of the field, this is intentional;
What I see is, I can set value (if I just set and replace the value of the field to the date composed, it does appear there, clearing the rest of history lines; but if I try to compose it of the new line AND past value, it doesn’t;)
(unless it’s something related to Resources app only?)