How to create dictionary overides

devservicenow k
Tera Contributor

My requirement is 

how to do description autofill and not override  in incident .

how to do this ? any one has idea?

1 ACCEPTED SOLUTION

Nootan Bhat
Kilo Sage

Hi @devservicenow k ,

You can use the After business rule, Filter condition is : Description Changes.

NootanBhat_0-1671527239444.png

 

in Script write:

(function executeRule(current, previous /*null when async*/ ) {

    if (previous.description && current.description !='') {
        current.description = previous.description + " and " + current.description;
        current.update();
    }
	if(current.description == ''){
		current.description ='';
		current.update();
	}
	
})(current, previous);

 Let me know if it helped.

 

Thanks

Nootan

 

View solution in original post

6 REPLIES 6

Community Alums
Not applicable

Hi @devservicenow k ,

  1. Navigate to All > System Definition > Dictionary.
  2. Open the record for the field.
  3. In the Dictionary Overrides related list, click New.
  4. Fill in the fields on the form, as appropriate (see table).
    Field Description
    Application The application scope to which the record belongs.
    Base table The parent table containing the field to override.
    Table

    Select the extended table to which the dictionary override applies.

    Note:

    The list shows only tables and database views that are in the same scope as the dictionary override.

    Override reference qualifier Select the check box to display the Reference qualifier field, which overrides the reference qualifier for the field on the extended table.
    Override dependent

    Select the check box to display the Dependent field, which overrides the field on which the current field depends.

    Override attributes

    Select the check box to display the Attributes field, which overrides the dictionary attributes for the field on the extended table.

    Note: Any attributes defined on the base table are ignored. If there are attributes on the base table that should still apply to the extended table, make sure to include them in this field.
    Override default value

    Select the check box to display the Default Value field, which overrides the default value for the field on the extended table.

    Override calculation

    Select the check box to display the Calculation field, which overrides the calculation of the value for the field on the extended table.

    Override mandatory

    Select the check box to display the Mandatory field, which overrides whether the field on the extended table must contain a value to save a record.

    Override read only

    Select the check box to display the Read only field, which overrides whether a user can change the field value on the extended table.

    Override display value

    Select the check box to use this field as the display value on the extended table.

    For example, the Story [rm_story] table uses the short description as the display value in reference fields instead of the number, as defined in the Task [task] table.

    Note: Only fields that exist at the task table can be used as display value overrides.
  5. Click Submit.

 

 

for me i need to do this

description autofill and not override.

how to do this can you help me with screenshot

Nootan Bhat
Kilo Sage

Hi @devservicenow k ,

You can use the After business rule, Filter condition is : Description Changes.

NootanBhat_0-1671527239444.png

 

in Script write:

(function executeRule(current, previous /*null when async*/ ) {

    if (previous.description && current.description !='') {
        current.description = previous.description + " and " + current.description;
        current.update();
    }
	if(current.description == ''){
		current.description ='';
		current.update();
	}
	
})(current, previous);

 Let me know if it helped.

 

Thanks

Nootan

 

Sebas Di Loreto
Kilo Sage
Kilo Sage

@devservicenow k 

So you are saying that you are already autofilling the description field (which belongs to the TASK table) and of course is autofilling it for an incident and you want to avoid that?

The first place I would look is to put a condition on that autofiller not to do it on task_type incident.

What is autofilling the description field?


If I helped you with your case, please click the Thumb Icon and mark as Correct.