<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.limesurvey.org/index.php?action=history&amp;feed=atom&amp;title=Group_Codes_Proposal</id>
	<title>Group Codes Proposal - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.limesurvey.org/index.php?action=history&amp;feed=atom&amp;title=Group_Codes_Proposal"/>
	<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Group_Codes_Proposal&amp;action=history"/>
	<updated>2026-08-12T01:00:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Group_Codes_Proposal&amp;diff=146399&amp;oldid=prev</id>
		<title>C schmitz: Text replacement - &quot;Expression Manager&quot; to &quot;ExpressionScript&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Group_Codes_Proposal&amp;diff=146399&amp;oldid=prev"/>
		<updated>2020-02-11T13:50:09Z</updated>

		<summary type="html">&lt;p&gt;Text replacement - &amp;quot;Expression Manager&amp;quot; to &amp;quot;ExpressionScript&amp;quot;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:50, 11 February 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I&#039;d like to propose that we add a group code (or &quot;slug&quot;) to the group table, and that it be used when creating variable names an in the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Expression Manager&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I&#039;d like to propose that we add a group code (or &quot;slug&quot;) to the group table, and that it be used when creating variable names an in the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ExpressionScript&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== The Problem==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== The Problem==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l18&quot;&gt;Line 18:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 18:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;With a unique group code, you&amp;#039;d simply have &amp;#039;name&amp;#039; and &amp;#039;age&amp;#039; as qcodes, and a group_code of &amp;#039;child1&amp;#039;.  Internally this would map to &amp;#039;child1_name&amp;#039;.  Now when you import the &amp;#039;child&amp;#039; group, you simply need to change one thing, the group_code, to child2.  Now you have unique qcodes.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;With a unique group code, you&amp;#039;d simply have &amp;#039;name&amp;#039; and &amp;#039;age&amp;#039; as qcodes, and a group_code of &amp;#039;child1&amp;#039;.  Internally this would map to &amp;#039;child1_name&amp;#039;.  Now when you import the &amp;#039;child&amp;#039; group, you simply need to change one thing, the group_code, to child2.  Now you have unique qcodes.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Expression Manager&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ExpressionScript&lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Expression Manager &lt;/del&gt;would need to change to reflect that some expressions, especially conditions, are within-group only.  For example, if you only want to ask the &#039;school&#039; question if &#039;age&#039; &amp;gt; 3, you&#039;d need to indicate to EM that &#039;age&#039; means &quot;Age within this group&quot;.  If you wanted a specific access, you&#039;d need a format to say &quot;child1.age&quot;, when you mean &quot;the first one listed&quot;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ExpressionScript &lt;/ins&gt;would need to change to reflect that some expressions, especially conditions, are within-group only.  For example, if you only want to ask the &#039;school&#039; question if &#039;age&#039; &amp;gt; 3, you&#039;d need to indicate to EM that &#039;age&#039; means &quot;Age within this group&quot;.  If you wanted a specific access, you&#039;d need a format to say &quot;child1.age&quot;, when you mean &quot;the first one listed&quot;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Group codes will also make import and exporting surveys easiers, and I&amp;#039;d like to see group_id dropped from everything except very low-level group edit functions.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Group codes will also make import and exporting surveys easiers, and I&amp;#039;d like to see group_id dropped from everything except very low-level group edit functions.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>C schmitz</name></author>
	</entry>
	<entry>
		<id>https://www.limesurvey.org/manual/index.php?title=Group_Codes_Proposal&amp;diff=1403&amp;oldid=prev</id>
		<title>Tacman1123 at 15:22, 4 April 2012</title>
		<link rel="alternate" type="text/html" href="https://www.limesurvey.org/manual/index.php?title=Group_Codes_Proposal&amp;diff=1403&amp;oldid=prev"/>
		<updated>2012-04-04T15:22:17Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
I&amp;#039;d like to propose that we add a group code (or &amp;quot;slug&amp;quot;) to the group table, and that it be used when creating variable names an in the Expression Manager.&lt;br /&gt;
&lt;br /&gt;
== The Problem==&lt;br /&gt;
&lt;br /&gt;
Question groups are a great way to have survey building blocks, either for separate surveys or duplicating a block of questions.  But since we now require unique question codes for each question, it&amp;#039;s a lot of work to manage that.  I propose that question codes be unique within groups, and group codes be unique within surveys.&lt;br /&gt;
&lt;br /&gt;
Group codes could also be used in EM.&lt;br /&gt;
&lt;br /&gt;
== The Database==&lt;br /&gt;
&lt;br /&gt;
group_code (or slug) would be added to groups table, and make into a unique index (survey_id, group_code).  During upgrade, we&amp;#039;d need a method to create a group code, either from the current group id (unique), the current order that the group is in with the survey (also unique, and a bit easier to understand) or the group name (checking for duplicates, etc.).&lt;br /&gt;
&lt;br /&gt;
== How it Helps==&lt;br /&gt;
&lt;br /&gt;
Suppose your survey has to do with children&amp;#039;s names and ages.  Right now, you&amp;#039;d create a group &amp;#039;child1&amp;#039; with name and age questions, called child1_name, child1_age.  For child 2, you export child1, import it as a new group, then change all the values one at a time.  Then change all the conditions one at a time.  Then do it again.&lt;br /&gt;
&lt;br /&gt;
With a unique group code, you&amp;#039;d simply have &amp;#039;name&amp;#039; and &amp;#039;age&amp;#039; as qcodes, and a group_code of &amp;#039;child1&amp;#039;.  Internally this would map to &amp;#039;child1_name&amp;#039;.  Now when you import the &amp;#039;child&amp;#039; group, you simply need to change one thing, the group_code, to child2.  Now you have unique qcodes.&lt;br /&gt;
&lt;br /&gt;
== Expression Manager==&lt;br /&gt;
&lt;br /&gt;
Expression Manager would need to change to reflect that some expressions, especially conditions, are within-group only.  For example, if you only want to ask the &amp;#039;school&amp;#039; question if &amp;#039;age&amp;#039; &amp;gt; 3, you&amp;#039;d need to indicate to EM that &amp;#039;age&amp;#039; means &amp;quot;Age within this group&amp;quot;.  If you wanted a specific access, you&amp;#039;d need a format to say &amp;quot;child1.age&amp;quot;, when you mean &amp;quot;the first one listed&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Group codes will also make import and exporting surveys easiers, and I&amp;#039;d like to see group_id dropped from everything except very low-level group edit functions.&lt;/div&gt;</summary>
		<author><name>Tacman1123</name></author>
	</entry>
</feed>