How to show field message info for each of select box in a sub category .

Sadashiva Das1
Tera Contributor

How to show field message info for each of select box in a sub category .We have 40 select box .

if sub category = A then message "test a"

B = Message is "test b"

c = "Test  c"

like 40 selection is there .

 

Regards, Please suggest 

12 REPLIES 12

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you will have to write onchange on every checkbox variable.

Can you explain the business use-case/requirement around this

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

find_real_file.png

 

For each option  message will come like

 

Data Quality & Integrity

Inaccuracy – data that is not reliable or trustworthy to support business objectives and decision making. Incompleteness – data required for business processes is missing.

Corruption - data becomes physically or logically damaged due to errors in writing, reading, storage, transmission or processing.

Data Rot - the tendency for data quality to decline over time. Integration processes fail affecting customer processes and reporting

Data Access

Data Breach - an incident which results in personally identifiable or confidential data potentially being viewed, used or downloaded by an unauthorised entity.

Re-identification – the potential of identifying people in data which has been anonymised. Complete anonymisation is quite difficult and it can be possible to use other data sets to match and identify individuals.

Security - the integrity and privacy of data must be protected.

Sovereignty – Data is subject to regulation / law within the jurisdiction that it is collected or retained.

Data Use

Governance - Failing to govern data appropriately, or in accordance with industry laws and regulations will result in fines and legal ramifications. Unused Data which is collected, processed and stored but not used. Storing unused data can unnecessarily open up security risks, compliance issues and storage/cost concerns.

 

 

please suggest

 

Hi,

So you would require onChange on that field/variable

sample script below; using json object you can avoid multiple if else statements

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (isLoading || newValue === '') {
        return;
    }

if(oldValue != newValue){

// give the choice value as json key and the message as the json value

var jsonStr = '{"Governance":"Message1","Corruption":"Message2"}';

var parser = JSON.parse(jsonStr);

var message = parser[newValue];

g_form.showFieldMsg('fieldName', messgae, 'info');

}

}

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Sadashiva Das 

Hope you are doing good.

Let me know if I have answered your question.

If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.

Regards
Ankur

 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Sadashiva Das 

Hope you are doing good.

Did my reply answer your question?

If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.

Thanks!
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader