Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Highlighted
marcelinoa
New Contributor III

On Demand App Generation using the same app as selection and template

Hi,

Is it possible to, with the ODAG API, make a link in which the template app Id is the same as the selection app Id? 
Using the normal process through qlik it show all the apps but not the app were I'm creating the link.

I tried doing it with the following code but when I go to generate it it always returns 400 Bad Request.

var linkAddPayload = {
	name: 'ODAG API Test App ' + nowTime,
	selectionApp: '7b8286c1-5f5c-4759-998f-82185048b2c7',
	templateApp: '7b8286c1-5f5c-4759-998f-82185048b2c7',
	rowEstExpr: 'Sum(FLIGHT_COUNT)',
	properties: {
		rowEstRange: [{
			context: '*',
			highBound: 10000
		}],
		appRetentionTime: [{
			context: 'User_*',
			retentionTime: 'P0DT1H'
		}],
		genAppLimit: [{
			context: 'User_*',
			limit: 5
		}],
		genAppName: [{
			context: "*",
			formatString: "{0}_{1}-{2}",
			params: ["templateAppName","userDirectory","userId"]
		}]
	}
}
1 Reply
marcelinoa
New Contributor III

Re: On Demand App Generation using the same app as selection and template

I figured why I was getting the error. After creating a link using the ODAG API, if I want to use said link, this call needs to be made. It also needs to be called when the page loads or there is a page refresh, so the link can be utilized.