The “Mock” data source contains a dummy code. You can use this dummy code for the testing purpose. When you test the dummy code, you ensure that the dummy code is invoked correctly. In multiple scenarios, the application developer uses the dummy code to test the component and observe how the component will look after the data is added to it.

Note:- In the dummy code, the data must be in string format.

To use the Mock data source:

  1. On the vFlow 2.0 module’s dashboard, see the left navigation panel.
  2. On the left navigation panel, click the Configurator icon (), and the middle panel displays the list of different pages.
  3. In the list of pages, find the page where you want to configure the data source.
  4. After you find the page, move to the right in the same row, and then find the Edit icon () to the left of the three-dots icon.
  5. Click the Edit icon (), and the middle panel displays the <<Page Name>> page (for example, the Data Submisssion page).
  6. On the Data Submission page, under Config, click Data, and the middle panel displays the Data Type list.
  7. Click the Data Type list and then select Mock, and the JSON box comes into view.
  1. In the JSON box, enter the dummy code, as shown in the following screen capture:

[{“name”: “Ashi”, “company”: “Decimal”, “designation”: “software engineer”}, {“name”: “Varsha”, “company”: “Decimal”, “designation”: “software engineer”}, {“name”: “Nikunj”, “company”: “Decimal”, “designation”: “Senior software engineer”}]

  1. After you enter the dummy code, click Save to configure the “Mock” data source.

Note:- You cannot add the data source to the FieldSet component. To add the data source to the FieldSet component, you need to add the data source to the Form component.

Was this article helpful?