Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!

Logical Model was not copied over when duplicating or exporting a published app

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
RashmiRH
Support
Support

Logical Model was not copied over when duplicating or exporting a published app

Last Update:

Feb 24, 2022 9:50:12 AM

Updated By:

Sonja_Bauernfeind

Created date:

Nov 10, 2021 4:57:09 AM

By default, the logical model is always copied over when a Qlik Sense App is being copied, exported, or duplicated.

However, if you bypass the publishing step by allowing users to modify published apps (by means of modifying security rules for a stream), then the logical model might not be copied over. In that instance, review the below steps. 

 

Environment

 

Resolution

 

To solve the problem, they can use Repository API to publish & Approve these objects (see instructions).

How to publish & approve objects (QRS API) App object: Publish
POST /qrs/app/object/{id}/approve
POST /qrs/app/object/{id}/unapprove

Publish scenario

When you publish the App for the first time following objects are published & approved:

 

IEnumerable<AppObject> appObjects = _appObjectRepository.GetAll(o => o.App != null && o.App.ID == app.ID && o.Owner != null && o.Owner.ID == app.Owner.ID && o.ObjectType != ModelConstants.AppObject.TYPE_USERSTATE);

 


Export scenario

  • Only AppObjects that are marked as Published & Approved are exported
  • Data will be exported if the user have read access on.
  • AppInternals (in Repo database) == User variables

    This is the list of objects that Repository tells Engine that it's OK to export:

    srcObjIDs = _appObjectRepository.GetAll(x => x.App != null && x.App.ID == id).ToList().Where(x => x.Published && x.Approved || x.ObjectType == "variable").Select(x => x.ID);
    IEnumerable<Guid> segmentIds = _appDataSegmentRepository.GetAll(x => x.App != null && x.App.ID == id).Select(x => x.ID);
    IEnumerable<Guid> internalIds = _appInternalRepository.GetAll(x => x.App != null && x.App.ID == id).Select(x => x.ID);​

 

Duplicate scenario

Following AppObjects will be included into duplicated App

 

_appObjectRepository.GetAll(x => x.App != null && x.App.ID == srcApp.ID && x.Published && x.Approved).Select(x => x.ID)
srcObjIDs = srcObjIDs.Union(_appInternalRepository.GetAll(x => x.App != null && x.App.ID == id).Select(x => x.ID));

 

 

 

 

Internal Investigation ID:

QB-5519

Labels (1)
Version history
Last update:
‎2022-02-24 09:50 AM
Updated by: