Previous Next JavaScript must be enabled to correctly display this content

## 5.4 In-Scope DS

This topic provides the systematic instructions to the overview of IN-Scope DS fields.

Following is the sequence to be followed:

- Additional of fields at any desired location in an existing data-segment is supported now.
- Data will be stored in separate custom schema.
- In-scope Data segment can be used for addition of new fields. (using jquery, at any position, we can add the field).

Example of In-Scope DS (Additional fields):

- Include the hooks required in js and html of base components accordingly.
- Run the command “obx ui --af” for adding fields in extended components.
- Include the additional field in “self.data”.

      self.data = {
            "newField": ko.observable("")
        };

- Subscribe it to change handler.

      self.data.newField.subscribe(self.changeHandler);

- Use jquery to insert it in the location you want to add the fields.

      var element = context.properties.data.payload.homeBranch; $
      ('#homeBranch').parent().parent().parent().append($('#ui-ex-div-
      newField').parent());

  .

Parent topic: Modification of Base Web Component