<?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 Re: Creating per-value-colors for master dimensions using the engine API in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Creating-per-value-colors-for-master-dimensions-using-the-engine/m-p/2539927#M22697</link>
    <description>&lt;P&gt;The Ctrl-Q tool (which is open source) has code for retrieving dimensions.&amp;nbsp;&lt;BR /&gt;You have to use the engine API, Enigma.js works well for this. Or create your own.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/ptarmiganlabs/ctrl-q/blob/main/src/lib/cmd/qseow/getdim.js" target="_blank" rel="noopener"&gt;https://github.com/ptarmiganlabs/ctrl-q/blob/main/src/lib/cmd/qseow/getdim.js&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 27 Dec 2025 14:02:07 GMT</pubDate>
    <dc:creator>mountaindude</dc:creator>
    <dc:date>2025-12-27T14:02:07Z</dc:date>
    <item>
      <title>Creating per-value-colors for master dimensions using the engine API</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Creating-per-value-colors-for-master-dimensions-using-the-engine/m-p/2068185#M18522</link>
      <description>&lt;P&gt;I am trying to create master dimensions with associated per-value-colors&amp;nbsp;using the &lt;A href="https://help.qlik.com/en-US/sense-developer/February2023/Subsystems/EngineJSONAPI/Content/introduction.htm" target="_self"&gt;engine API&lt;/A&gt;.&amp;nbsp;&lt;BR /&gt;The use case is for client-managed Qlik Sense (for now).&lt;/P&gt;
&lt;P&gt;Creating the master dimension works, but I fail finding any info on how to create the needed ColorMap object using the engine API. I can read those color maps for existing master dimensions, but just not figure out how to create new or update existing color maps.&lt;/P&gt;
&lt;P&gt;I guess it would be a two-step process...?&lt;/P&gt;
&lt;P&gt;First &amp;nbsp;create the color map and get a ID for it, then create/update the master dimension, including a reference to that color map ID.&lt;/P&gt;
&lt;P&gt;Any wizzes or Qlik employees who can share how this works?&lt;/P&gt;
&lt;P&gt;Thx!&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 13:00:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Creating-per-value-colors-for-master-dimensions-using-the-engine/m-p/2068185#M18522</guid>
      <dc:creator>mountaindude</dc:creator>
      <dc:date>2023-05-05T13:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: Creating per-value-colors for master dimensions using the engine API</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Creating-per-value-colors-for-master-dimensions-using-the-engine/m-p/2069544#M18539</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28783"&gt;@mountaindude&lt;/a&gt;&amp;nbsp;I tried to reproduce what's native UI does. Basically, when you create your dimension, colors are assigned automatically. Then, you can change them calling a couple of engine API methods.&lt;/P&gt;
&lt;P&gt;First create create a dimension as below&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
	"handle": 1,
	"method": "CreateDimension",
	"params": {
		"qProp": {
			"qInfo": {
				"qType": "dimension"
			},
			"qDim": {
				"qGrouping": "N",
				"qFieldDefs": [
					"Dim1"
				],
				"title": "Dim1",
				"qFieldLabels": [
					"Dim1"
				]
			},
			"qMetaDef": {
				"title": "Dim1",
				"description": "",
				"tags": []
			}
		}
	},
	"outKey": -1,
	"id": 3
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From above response you have to get the created dimension ID, we need it in next calls.&lt;/P&gt;
&lt;P&gt;Then create a ColorMap object where you will set your custom colors for your dimension values. Here you need to set dimension ID for qId attribute.&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
	"handle": 1,
	"method": "CreateObject",
	"params": {
		"qProp": {
			"qInfo": {
				"qType": "ColorMap",
				"qId": "ColorMapModel_yourDimensionID"
			},
			"colorMap": {}
		}
	},
	"outKey": -1,
	"id": 4
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As final step, from ColorMap object created in previous step, you have to use SetProperties method where you can define your custom colors in colors array&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
	"handle": 3,
	"method": "SetProperties",
	"params": {
		"qProp": {
			"qInfo": {
				"qId": "ColorMapModel_yourDimensionID",
				"qType": "ColorMap"
			},
			"qExtendsId": "",
			"qMetaDef": {},
			"qStateName": "",
			"colorMap": {
				"colors": [
					{
						"value": "A",
						"baseColor": {
							"color": "#85ac6b",
							"index": -1
						}
					}
				],
				"nul": null,
				"oth": null,
				"pal": null,
				"single": null,
				"usePal": true,
				"autoFill": true
			}
		}
	},
	"outKey": -1,
	"id": 5
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 08:38:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Creating-per-value-colors-for-master-dimensions-using-the-engine/m-p/2069544#M18539</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2023-05-10T08:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Creating per-value-colors for master dimensions using the engine API</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Creating-per-value-colors-for-master-dimensions-using-the-engine/m-p/2070612#M18547</link>
      <description>&lt;P&gt;Yeah I got it working too by looking at the traffic in the websocket between the Sense UI and backend server.&lt;BR /&gt;Works well once you decode all those messages flowing back and forth.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All good thus!&lt;/P&gt;
&lt;P&gt;Btw, the use case was to add color support for bulk import of master dimensions/measure to the open source&amp;nbsp;&lt;A href="https://github.com/ptarmiganlabs/ctrl-q" target="_blank" rel="noopener"&gt;Ctrl-Q&lt;/A&gt; tool.&lt;BR /&gt;&lt;A href="https://github.com/ptarmiganlabs/ctrl-q/releases" target="_blank" rel="noopener"&gt;Latest release&lt;/A&gt; (yesterday, 3.9) includes such color support, which makes it a breeze to define master items textually in an Excel file, then import them with a single command to one (or more) apps.&lt;/P&gt;
&lt;P&gt;Master-items-as-code, kind of. &lt;BR /&gt;Blog post describing the whole thing &lt;A href="https://ptarmiganlabs.com/ctrl-q-3-9-brings-colors-to-master-items/" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 11:53:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Creating-per-value-colors-for-master-dimensions-using-the-engine/m-p/2070612#M18547</guid>
      <dc:creator>mountaindude</dc:creator>
      <dc:date>2023-05-12T11:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Creating per-value-colors for master dimensions using the engine API</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Creating-per-value-colors-for-master-dimensions-using-the-engine/m-p/2539886#M22696</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28783"&gt;@mountaindude&lt;/a&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/145804"&gt;@alex_colombo&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;I'm looking for the Qlik API to retrieve the master dimension/measure color, but I couldn't be able to find it even by tracking the socket connections in the network. Please share or guide me to how to get the master dimension/measure color using API.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Manoj Prabu,&lt;/P&gt;</description>
      <pubDate>Fri, 26 Dec 2025 05:02:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Creating-per-value-colors-for-master-dimensions-using-the-engine/m-p/2539886#M22696</guid>
      <dc:creator>Manoj_Prabu</dc:creator>
      <dc:date>2025-12-26T05:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: Creating per-value-colors for master dimensions using the engine API</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Creating-per-value-colors-for-master-dimensions-using-the-engine/m-p/2539927#M22697</link>
      <description>&lt;P&gt;The Ctrl-Q tool (which is open source) has code for retrieving dimensions.&amp;nbsp;&lt;BR /&gt;You have to use the engine API, Enigma.js works well for this. Or create your own.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/ptarmiganlabs/ctrl-q/blob/main/src/lib/cmd/qseow/getdim.js" target="_blank" rel="noopener"&gt;https://github.com/ptarmiganlabs/ctrl-q/blob/main/src/lib/cmd/qseow/getdim.js&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Dec 2025 14:02:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Creating-per-value-colors-for-master-dimensions-using-the-engine/m-p/2539927#M22697</guid>
      <dc:creator>mountaindude</dc:creator>
      <dc:date>2025-12-27T14:02:07Z</dc:date>
    </item>
  </channel>
</rss>

