Editing the File form-name .data.json

The .data.json file is a generated file. Do not edit the original file. If you edit it, your customizations are overwritten when the file is regenerated.

Also, be sure to maintain the file extension, .data.json. Otherwise, your customized preview data file is not accessible to the form.

Procedure

  1. In the Project Explorer, find the file that contains the preview data.

    The default location of this file is: [project-name] > Forms > ProcessPackage > [business-process-name] > [user-task-name] > [form-name].data.json

  2. Right-click the .data.json file and click Copy. Then, in the same location in the Project Explorer, right-click and click Paste.

    The Name Conflict dialog appears asking you to type a new name for the file. Rename the file keeping the extension .data.json. Do not delete the original preview data file.

  3. Right-click your newly-named custom preview data file, and click Open With > Text Editor.
  4. Edit the file, providing your desired values for the preview data in place of the default values in the file.

Result

Example of Default Preview Data File

{ items: [
   { $param:'AnotherDemo', $value:					{$type:'com.example.demo.Demo',			   normalText:		"normalText"	,list:[
   "list"
   ],duration:		""	,attribute1:[
   "2010-05-16"
   ]}
   },
   { $param:'Demo', $value:					{$type:'com.example.demo.Demo',			   normalText:		"normalText"	,list:[
   "list"
   ],duration:		""	,attribute1:[
   "2010-05-16"
   ]}
   }
   ]}

Example of Customized Preview Data File

{ items: [
   { $param:'AnotherDemo', $value: {$type:'com.example.demo.Demo',
   normalText: "My Sample Data"	,
   list:["list", "John", "George", "Ringo"],
   duration: "P4Y"	,
   attribute1:["2010-05-07", "2010-02-11"]}
   },
   { $param:'Demo', $value: {$type:'com.example.demo.Demo',
      normalText: "normalText", list:["list"],duration: "",
      attribute1:["2010-05-07"]}
   }
]}