Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Display record number in in field message

polodre2
Tera Contributor

Hello,

for each record, I would like to display the current record number in the field message. Is there a way to achieve this? Right now the circled number is hard coded:

g_form.showFieldMsg('u_art_4_2_1_dp1_fin_obl', 'ARL CRADA (CRADA-24-003) Article 5.2.1, "No Cost Option" has been chosen for technical efforts under this JWS','info');

polodre2_0-1705933078397.png

 

1 ACCEPTED SOLUTION

Vishal Birajdar
Giga Sage

Hi @polodre2 ,

 

In your script do like this.

/*1.Get the value of name field or which ever field you require*/
var getNameValue= g_form.getValue('your_field_name');

/*2.Add message*/
g_form.showFieldMsg('your_field_name','Your custom message ' + getNameValue +' continue your message');

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates

View solution in original post

1 REPLY 1

Vishal Birajdar
Giga Sage

Hi @polodre2 ,

 

In your script do like this.

/*1.Get the value of name field or which ever field you require*/
var getNameValue= g_form.getValue('your_field_name');

/*2.Add message*/
g_form.showFieldMsg('your_field_name','Your custom message ' + getNameValue +' continue your message');

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates