Skip to main content
Nintex Community Menu Bar

Parse Json and create table format nintex workflow

  • August 7, 2019
  • 1 reply
  • 160 views

Forum|alt.badge.img+4

Hi ,

 

I am getting the below JSON response from the web method action NIntex workflow . Need to parse the JSON and create a table format for the values

{
  "result": [
    {
      "parent": "",
      "reason": "",
      "made_sla": "false",
      "backout_plan": "Current prod environment to be snapshotted with VmWare             prior to change.         ",
      "watch_list": "",
      "upon_reject": "",
      "sys_updated_on": "2017-04-13 12:42:23",
      "type": "normal",
      "conflict_status": "",
      "approval_history": "",
      "skills": "",
      "number": "CHG0000001",
      "test_plan": "Multi-User testing on Sunday night",
      "cab_delegate": "",
      "sys_updated_by": "admin",
      "opened_by": {
        "link": "https://myinstance/api/now/table/sys_user/6816f79cc0a8016401c5a33be04be441",
        "value": "6816f79cc0a8016401c5a33be04be441"
      },
      "user_input": "",
      "requested_by_date": "2016-10-14 00:00:00",
      "sys_created_on": "2016-10-07 22:12:50",
      "sys_domain": {
        "link": "https://myinstance/api/now/table/sys_user_group/global",
        "value": "global"
      },
      "state": "-5",
      "sys_created_by": "admin",
      "knowledge": "false",
      "order": "",
      "phase": "requested",
      "closed_at": "2017-04-08 09:46:25",
      "cmdb_ci": {
        "link": "https://myinstance/api/now/table/cmdb_ci/a9c0c8d2c6112276018f7705562f9cb0",
        "value": "a9c0c8d2c6112276018f7705562f9cb0"
      },
      "delivery_plan": "",
      "impact": "3",
      "active": "true",
      "review_comments": "",
      "work_notes_list": "",
      "business_service": "",
      "priority": "3",
      "sys_domain_path": "/",
      "time_worked": "",
      "cab_recommendation": "",
      "expected_start": "",
      "production_system": "false",
      "opened_at": "2016-10-07 22:12:50",
      "review_date": "",
      "business_duration": "",
      "group_list": "",
      "requested_by": {
        "link": "https://myinstance/api/now/table/sys_user/5137153cc611227222222bbd1bd8cd2007",
        "value": "5137153cc611227c000bbd1bd8cd2007"
      },
      "work_end": "",
      "change_plan": "Backup dataset, image current system, reinstall previous             release, test         ",
      "phase_state": "open",
      "approval_set": "",
      "cab_date": "",
      "work_notes": "",
      "implementation_plan": "",
      "end_date": "2017-04-01 01:00:00",
      "short_description": "Rollback Oracle Version",
      "close_code": "",
      "correlation_display": "",
      "delivery_task": "",
      "work_start": "",
      "assignment_group": "",
      "additional_assignee_list": "",
      "outside_maintenance_schedule": "false",
      "description": "Performance of the Siebel SFA software has been severely             degraded since the upgrade performed this weekend.             We moved to an unsupported Oracle DB version. Need to rollback the             Oracle Instance to a supported version.         ",
      "on_hold_reason": "",
      "calendar_duration": "",
      "std_change_producer_version": "",
      "close_notes": "",
      "sys_class_name": "change_request",
      "closed_by": {
        "link": "https://myinstance/api/now/table/sys_user/6816f79c11111be04be441",
        "value": "6816f79cc0a8016401c5a33be04be441"
      },
      "follow_up": "",  
      "sys_id": "a9e9c33dc61122762272455df62663d2",
      "contact_type": "phone",
      "cab_required": "false",
      "urgency": "3",
      "scope": "3",
      "company": "",
      "justification": "",
      "reassignment_count": "",
      "review_status": "3",
      "activity_due": "",
      "assigned_to": {
        "link": "myinstance/api/now/table/sys_user/681b365ec0a8011111fb0b05854a0cd",
        "value": "681b365ec0a80164000fb0b05854a0cd"
      },
      "  ": "2017-03-31 23:00:00",
      "comments": "",
      "approval": "requested",
      "sla_due": "",
      "comments_and_work_notes": "",
      "due_date": "",
      "sys_mod_count": "21",
      "on_hold": "false",
      "sys_tags": "",
      "conflict_last_run": "",
      "escalation": "0",
      "upon_approval": "",
      "correlation_id": "",
      "location": "",
      "risk": "2",
      "category": "Software",
      "risk_impact_analysis": ""
    }
  ]
}

 

How to acheive this ?

1 reply

Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • August 9, 2019
Hi,
In the end this probably could be done with a lot of regular expression actions and Build string actions but I think this woud be far easier to do with a custom action that takes in the JSON and outputs the HTML table.
https://help.nintex.com/en-US/sdks/sdk2013/#Walkthroughs/WK_Prc_NW2013_CustomAction_Top.htm%3FTocPath%3DNintex%2520Software%2520Development%2520Kit%7CModifying%2520and%2520Extending%2520Nintex%2520Workflow%2520and%2520Forms%7CCreate%2520a%2520custom%2520action%7C_____0