1. Yuri Denshchik
  2. PowerBuilder
  3. Wednesday, 29 August 2018 21:45 PM UTC

Hello community, 
I am exited with new option to export Datawindow to Json format. Could you please help me to figure out how to achieve the following:

1. Exported field names are different from column names. How to specify/map the Json field names with column names?

2. I need to export some fields in boolean true/false. The logic is simple, for example, { if "current_status" is "Y" then true else false }

Please advise.

Thank you,

Yuri

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 30 August 2018 02:03 AM UTC
  2. PowerBuilder
  3. # 1

Hi Yuri;

  My suggestion would be to use another DWO that is configured for the correct names & data types you need. Then transfer the data from DWO to DWO transposing the required data as required. Then usr the ExportJSON() command.

  The other approach would be to use the SQL "Select" clause to name the data and transpose the data types as required into the DWO, which would now be immediately ready to export to JSON.

HTH

Regards ... Chris

Comment
  1. Yuri Denshchik
  2. Thursday, 30 August 2018 16:29 PM UTC
... it exports all columns :(

I'd think Json import/export would be implemented using template similar to XML
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.