<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Create sheet in App from json file in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Create-sheet-in-App-from-json-file/m-p/1407846#M32963</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using Qlik Sense with .NET SDK (C#) and also REST API requests to read a json file with definition of a qlik sheet object and then create a new sheet in a App.&lt;/P&gt;&lt;P&gt;After creating the sheet, I then approve the sheet and then publish it &lt;SPAN style="font-size: 13.3333px;"&gt;(using REST calls).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Some of the sheets that I create are getting approved and published succesfully, but some are failing to be approved or published.&lt;/P&gt;&lt;P&gt;I supect that it has something to do with duplicated object ids in the sheets (if the json sheet file imported was extracted from the same app and imported again).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For publishing sheets I used:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ISheet sheet.PublishAsync();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then tried a REST request (we implemented a class to make this requests):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put($"qrs/app/object/{objectId}/publish")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But sometime it succeeds to publish, other times it fails, without an apparent pattern.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After publishing I then approve sheets, moving them into the base sheet of the App (again using REST):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put($"qrs/selection/{selectionId}/app/object/synthetic", requestBody... -&amp;gt; where the request body is json list of objects with the ids of the sheets&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But again sometimes this requests fail to approve the sheets (altough in the result doen't show that if failed).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody has used this type of operations and have clue to what the problem can be?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Miguel Dias&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Dec 2017 20:46:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-12-14T20:46:38Z</dc:date>
    <item>
      <title>Create sheet in App from json file</title>
      <link>https://community.qlik.com/t5/App-Development/Create-sheet-in-App-from-json-file/m-p/1407846#M32963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using Qlik Sense with .NET SDK (C#) and also REST API requests to read a json file with definition of a qlik sheet object and then create a new sheet in a App.&lt;/P&gt;&lt;P&gt;After creating the sheet, I then approve the sheet and then publish it &lt;SPAN style="font-size: 13.3333px;"&gt;(using REST calls).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Some of the sheets that I create are getting approved and published succesfully, but some are failing to be approved or published.&lt;/P&gt;&lt;P&gt;I supect that it has something to do with duplicated object ids in the sheets (if the json sheet file imported was extracted from the same app and imported again).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For publishing sheets I used:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ISheet sheet.PublishAsync();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then tried a REST request (we implemented a class to make this requests):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put($"qrs/app/object/{objectId}/publish")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But sometime it succeeds to publish, other times it fails, without an apparent pattern.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After publishing I then approve sheets, moving them into the base sheet of the App (again using REST):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put($"qrs/selection/{selectionId}/app/object/synthetic", requestBody... -&amp;gt; where the request body is json list of objects with the ids of the sheets&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But again sometimes this requests fail to approve the sheets (altough in the result doen't show that if failed).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody has used this type of operations and have clue to what the problem can be?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Miguel Dias&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2017 20:46:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-sheet-in-App-from-json-file/m-p/1407846#M32963</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-14T20:46:38Z</dc:date>
    </item>
  </channel>
</rss>

