You can just use 'g_form.setValue'. You just need to take each line of the script and add it to a string variable, then set the field with the variable value.


jquinonez
Tera Contributor

Thanks!


Pastupe
Mega Guru

Hi, I had a same question from manager if it is possible to schedule report only for workdays.


My thinking without developing anything is , that report could be scheduled not one time, but 5 times for each work day separatelly as on the below image you can see that if you select to run report WEEKly, then you can select exact day.


If you do it once per work day = 5x scheduled report, finally this is the solution that you get reports only in work days.



But the question I do have, is how this could be done to send report only in defined schedule (business hours) ?



Petr


1a.jpg


FIKRI BENBRAHIM
Kilo Guru

Hello guys,

 

   Please refer to that link that speaks about schedules and how to use them in order to get the working days of a Domain:  https://www.servicenowguru.com/system-definition/weekdaysonly-scheduled-job/.

 

   For your case the scheduled job should be conditional (Conditional check box) and in that condition put the GlideRecord over the schedule's table record relative to your domain (if your instance is domain separated).

 

Best regards

FIKRI BENBRAHIM Mohamed Jawad

Has this been written up as an idea for ServiceNow to put into place without scripts?  Writing scripts and not using what's out of the box, causes issues.  From what I'm reading, the issue is minimum but it's enough to cause more work and time from an individual.