The CreatorCon Call for Content is officially open! Get started here.

Hide 'minutes' and 'seconds' of duration variable on record producer

JJG
Kilo Guru

Hello,

I have a duration field on a record producer. I need to hide the minutes and seconds part of the duration field. I tried using the standard method which is an on load client script:

g_form.getElement('Insert element name here').style.display = 'none';

However, I have been hitting a wall. I cannot find the name of the element (See Pic below) Any tips? What should I put for the element name?

find_real_file.png

 

5 REPLIES 5

Mark Roethof
Tera Patron
Tera Patron

Hi JJG,

Could just an integer which represents the number of days also work? Within the Record Producer script field you could adjust this value and map it accordingly to the table this record producer is on.

In the record producer script, you could add something like:

current.your_duration_field = producer.your_days_variable;

Obviously this might differ a bit if your days are not 24 hours though something different (I saw you had a different question on that, that has been answered). Though you get the idea 🙂

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn