Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Sudhee_Maximus
Creator
Creator

tWriteJson not working as expected

Hi Team,

I getting below result where my expected was as pasted below that , not sure why tWriteJson appends the [] for each element and how to eliminate that and get nulls printed where necessary.

used tWriteJson properties as attached and removed root element.

Result :-

{

 "eligibility": [

  {

   "coreEligibility": [],

   "categoryCode": [],

   "consumerDeprivationCode": [],

   "consumerId": [],

   "consumerMaintenanceCode": [],

   "coreEligibilitySegmentsId": [],

   "correlationId": [],

   "coverageCode": [],

   "createdBy": [],

   "createdOn": [],

   "eligibilityEndReason": [],

   "eligibilityStatusCode": "MANDATORY",

   "endDate": [],

   "exemptionCode": [],

   "fileHandle": [],

   "genericFieldDate1": [],

   "genericFieldDate2": [],

   "genericFieldDate3": [],

   "genericFieldDate4": [],

   "genericFieldText1": [],

   "genericFieldText2": [],

   "genericFieldText3": [],

   "genericFieldText4": [],

   "programCode": "HIP",

   "programTypeCode": [],

   "referralCountyCode": [],

   "startDate": [],

   "subProgramTypeCode": [],

   "uiid": [],

   "updatedBy": [],

   "updatedOn": []

  }

 ]

}

Expected result as below if no value present :-

{

 "eligibility": [

  {

   "coreEligibility": null,

   "categoryCode": null,

   "consumerDeprivationCode": null,

   "consumerId": null,

   "consumerMaintenanceCode": null,

   "coreEligibilitySegmentsId": null,

   "correlationId": null,

   "coverageCode": null,

   "createdBy": null,

   "createdOn": null,

   "eligibilityEndReason": null,

   "eligibilityStatusCode": "MANDATORY",

   "endDate": null,

   "exemptionCode": null,

   "fileHandle": null,

   "genericFieldDate1": null,

   "genericFieldDate2": null,

   "genericFieldDate3": null,

   "genericFieldDate4": null,

   "genericFieldText1": null,

   "genericFieldText2": null,

   "genericFieldText3": null,

   "genericFieldText4": null,

   "programCode": "HIP",

   "programTypeCode": null,

   "referralCountyCode": null,

   "startDate": null,

   "subProgramTypeCode": null,

   "uiid": null,

   "updatedBy": null,

   "updatedOn": null

   }

 ]

}

Labels (4)
1 Solution

Accepted Solutions
gjeremy1617088143

Hi,

maybe in Advanced settings of tWriteJSONField you can check Pass null values and empty string explicitly.

Send me Love and Kudos

View solution in original post

1 Reply
gjeremy1617088143

Hi,

maybe in Advanced settings of tWriteJSONField you can check Pass null values and empty string explicitly.

Send me Love and Kudos