<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://kb.phenomportal.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dmitry</id>
	<title>PHENOM Portal Knowledgebase - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://kb.phenomportal.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dmitry"/>
	<link rel="alternate" type="text/html" href="https://kb.phenomportal.com/index.php?title=Special:Contributions/Dmitry"/>
	<updated>2026-04-27T17:22:25Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://kb.phenomportal.com/index.php?title=Formatting_a_CSV_for_View_Import&amp;diff=1170</id>
		<title>Formatting a CSV for View Import</title>
		<link rel="alternate" type="text/html" href="https://kb.phenomportal.com/index.php?title=Formatting_a_CSV_for_View_Import&amp;diff=1170"/>
		<updated>2024-05-02T18:19:51Z</updated>

		<summary type="html">&lt;p&gt;Dmitry: /* Nested Views */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To bulk import view characteristics, the CSV file should be formatted as described in this article.&lt;br /&gt;
&lt;br /&gt;
== General Column/Data Requirements ==&lt;br /&gt;
The following column headers must exist and contain data in each row:&lt;br /&gt;
* View_Name&lt;br /&gt;
* Characteristic_Name&lt;br /&gt;
* Primitive&lt;br /&gt;
* Source&lt;br /&gt;
* Path&lt;br /&gt;
* Measurement&lt;br /&gt;
&lt;br /&gt;
The following columns are optional (for example, the Package columns are only there to specify destination if desired): &lt;br /&gt;
* Package_Name&lt;br /&gt;
* Package_Description&lt;br /&gt;
* Package_Tags&lt;br /&gt;
* View_Description&lt;br /&gt;
* View_Tags&lt;br /&gt;
* Characteristic_Description&lt;br /&gt;
* Characteristic_Tags&lt;br /&gt;
* Lower_Bound&lt;br /&gt;
* Upper_Bound&lt;br /&gt;
* Nested_View&lt;br /&gt;
&lt;br /&gt;
The order of the columns is not enforced, it does not have to be in the same order as the suggested format above.&lt;br /&gt;
&lt;br /&gt;
Any additional user-made columns will be ignored and will not interfere with import.&lt;br /&gt;
&lt;br /&gt;
Bulk import can currently import Package, View, and Characteristic elements.&lt;br /&gt;
&lt;br /&gt;
== Column-specific Requirements ==&lt;br /&gt;
=== Package Name ===&lt;br /&gt;
* Leaving this column blank will default Package to the &amp;quot;Phenom&amp;quot; package.&lt;br /&gt;
* Setting this column to an existing Package will default to the first matching Platform Package within the model.&lt;br /&gt;
* If there is no matching Package, a new Package will be created within the &amp;quot;Phenom&amp;quot; Package.&lt;br /&gt;
&lt;br /&gt;
=== Package Description ===&lt;br /&gt;
Package Description will be imported for new Packages only. Only the first Description for new Packages will be imported.&lt;br /&gt;
&lt;br /&gt;
=== View Name ===&lt;br /&gt;
The data in this column for an existing View will be matched to the first View of that name within the model (there should only be one match). If there isn&#039;t a matching View, a new View will be created within the &amp;quot;Phenom&amp;quot; Package.&lt;br /&gt;
&lt;br /&gt;
=== View Description ===&lt;br /&gt;
View Description will be imported for new Views only. Only the first Description for new Views will be imported.&lt;br /&gt;
&lt;br /&gt;
=== Characteristic Name, Characteristic Description ===&lt;br /&gt;
* Characteristic Names must be unique to the View they are imported under.&lt;br /&gt;
* The Characteristic must not already exist in the desired View&lt;br /&gt;
* Characteristics belonging to different Views may have the same name.&lt;br /&gt;
&lt;br /&gt;
=== Primitive ===&lt;br /&gt;
This column isn&#039;t case sensitive. Acceptable values: &amp;quot;Char&amp;quot;, &amp;quot;Double&amp;quot;, &amp;quot;Float&amp;quot;, &amp;quot;Long&amp;quot;, &amp;quot;Short&amp;quot;, &amp;quot;String&amp;quot;, &amp;quot;ULong&amp;quot;, &amp;quot;UShort&amp;quot;, &amp;quot;Octet&amp;quot;, &amp;quot;Enumeration&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Source, Path, Measurement ===&lt;br /&gt;
* Source must exist in the model and must be the Entity/Association projected from the last element in the Path column.&lt;br /&gt;
* Path must have valid elements leading up to/ending with the Observable realized by the Measurement.&lt;br /&gt;
* Measurement must in the model and realize the Observable at the end of the Path.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;For example: &#039;&#039;&#039;AirSystemType&#039;&#039;&#039; is projected (through payload) from &#039;&#039;&#039;elementID&#039;&#039;&#039; which is realized by &#039;&#039;UniqueID_Unbounded_Integer&#039;&lt;br /&gt;
&lt;br /&gt;
=== Lower Bound and Upper Bound ===&lt;br /&gt;
&lt;br /&gt;
* This row must have both a Source and a Path for these values to be valid&lt;br /&gt;
&lt;br /&gt;
=== Nested View ===&lt;br /&gt;
&lt;br /&gt;
* The Nested View must exist in the model and must be the name of a View. &lt;br /&gt;
* See Nested Views for changes to other columns&lt;br /&gt;
&lt;br /&gt;
== Tagging New Elements (Optional) ==&lt;br /&gt;
Package_Tags, View_Tags, and Characteristic_Tags optional columns can be used to tag new Packages, Views, or Characteristics. Each field can have multiple comma-delimited tags.&lt;br /&gt;
&lt;br /&gt;
The raw CSV must have quotes around fields with commas (Excel normally handles this).&lt;br /&gt;
&lt;br /&gt;
Package_Tags will tag whichever package is chosen - this includes the Phenom package when a package isn&#039;t specified in the Package_Name column.&lt;br /&gt;
&lt;br /&gt;
== Nested Views ==&lt;br /&gt;
By referencing the name of another view, whether already existing in the model or being added by the same CSV file, in the &#039;&#039;&#039;Nested_View&#039;&#039;&#039; column, the import can create view sub-structuring or nesting. &lt;br /&gt;
&lt;br /&gt;
In view field rows representing nested views, the &#039;&#039;&#039;Source&#039;&#039;&#039; and &#039;&#039;&#039;Path&#039;&#039;&#039; columns represent the perspective path under which the view sub-structure is nested. At the same time, the &#039;&#039;&#039;Primitive&#039;&#039;&#039;, &#039;&#039;&#039;Platform_Type&#039;&#039;&#039;, and &#039;&#039;&#039;Measurement&#039;&#039;&#039; are not applicable. &lt;br /&gt;
&lt;br /&gt;
By default, all sub-structure nesting view field rows will be inferred to be representing a &amp;quot;private&amp;quot; nesting. This can be made explicit, or toggled off to accomplish a sub-structure import, by using the &#039;&#039;&#039;Characteristic_Foreign&#039;&#039;&#039; column: if set to &amp;quot;false&amp;quot;, the view sub-structure will be private to its nesting view, and an independent import if set to &amp;quot;true&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Additional Requirements ==&lt;br /&gt;
* Data within Package_Name, View_Name, and Characteristic_Name must all begin with a letter, and only contain numbers, letters, or underscores. The data must also not match any of the following reserved words:&lt;br /&gt;
** &#039;&#039;&#039;IDL Reserved words:&#039;&#039;&#039;&amp;lt;p&amp;gt;&amp;quot;and&amp;quot;, &amp;quot;begin&amp;quot;, &amp;quot;break&amp;quot;, &amp;quot;case&amp;quot;, &amp;quot;common&amp;quot;, &amp;quot;compile_opt&amp;quot;, &amp;quot;continue&amp;quot;, &amp;quot;do&amp;quot;, &amp;quot;else&amp;quot;, &amp;quot;end&amp;quot;, &amp;quot;endcase&amp;quot;, &amp;quot;endelse&amp;quot;, &amp;quot;endfor&amp;quot;, &amp;quot;endforeach&amp;quot;, &amp;quot;endif&amp;quot;, &amp;quot;endrep&amp;quot;, &amp;quot;endswitch&amp;quot;, &amp;quot;endwhile&amp;quot;, &amp;quot;eq&amp;quot;, &amp;quot;for&amp;quot;, &amp;quot;foreach&amp;quot;, &amp;quot;forward_function&amp;quot;, &amp;quot;function&amp;quot;, &amp;quot;ge&amp;quot;, &amp;quot;goto&amp;quot;, &amp;quot;gt&amp;quot;, &amp;quot;if&amp;quot;, &amp;quot;inherits&amp;quot;, &amp;quot;le&amp;quot;, &amp;quot;lt&amp;quot;, &amp;quot;mod&amp;quot;, &amp;quot;ne&amp;quot;, &amp;quot;not&amp;quot;, &amp;quot;of&amp;quot;, &amp;quot;on_ioerror&amp;quot;, &amp;quot;or&amp;quot;, &amp;quot;pro&amp;quot;, &amp;quot;repeat&amp;quot;, &amp;quot;switch&amp;quot;, &amp;quot;then&amp;quot;, &amp;quot;until&amp;quot;, &amp;quot;while&amp;quot;, &amp;quot;xor&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
** &#039;&#039;&#039;OCL Reserved words:&#039;&#039;&#039;&amp;lt;p&amp;gt; &amp;quot;abstract&amp;quot;, &amp;quot;any&amp;quot;, &amp;quot;attribute&amp;quot;, &amp;quot;boolean&amp;quot;, &amp;quot;case&amp;quot;, &amp;quot;char&amp;quot;, &amp;quot;component&amp;quot;, &amp;quot;const&amp;quot;, &amp;quot;consumes&amp;quot;, &amp;quot;context&amp;quot;, &amp;quot;custom&amp;quot;, &amp;quot;default&amp;quot;, &amp;quot;double&amp;quot;, &amp;quot;emits&amp;quot;, &amp;quot;enum&amp;quot;, &amp;quot;eventtype&amp;quot;, &amp;quot;exception&amp;quot;, &amp;quot;factory&amp;quot;, &amp;quot;false&amp;quot;, &amp;quot;finder&amp;quot;, &amp;quot;fixed&amp;quot;, &amp;quot;float&amp;quot;, &amp;quot;getraises&amp;quot;, &amp;quot;home&amp;quot;, &amp;quot;import&amp;quot;, &amp;quot;in&amp;quot;, &amp;quot;inout&amp;quot;, &amp;quot;interface&amp;quot;, &amp;quot;local&amp;quot;, &amp;quot;long&amp;quot;, &amp;quot;manages&amp;quot;, &amp;quot;module&amp;quot;, &amp;quot;multiple&amp;quot;, &amp;quot;native&amp;quot;, &amp;quot;object&amp;quot;, &amp;quot;octet&amp;quot;, &amp;quot;oneway&amp;quot;, &amp;quot;out&amp;quot;, &amp;quot;primarykey&amp;quot;, &amp;quot;private&amp;quot;, &amp;quot;provides&amp;quot;, &amp;quot;public&amp;quot;, &amp;quot;publishes&amp;quot;, &amp;quot;raises&amp;quot;, &amp;quot;readonly&amp;quot;, &amp;quot;sequence&amp;quot;, &amp;quot;setraises&amp;quot;, &amp;quot;short&amp;quot;, &amp;quot;string&amp;quot;, &amp;quot;struct&amp;quot;, &amp;quot;supports&amp;quot;, &amp;quot;switch&amp;quot;, &amp;quot;true&amp;quot;, &amp;quot;truncatable&amp;quot;, &amp;quot;typedef&amp;quot;, &amp;quot;typeid&amp;quot;, &amp;quot;typeprefix&amp;quot;, &amp;quot;union&amp;quot;, &amp;quot;unsigned&amp;quot;, &amp;quot;uses&amp;quot;, &amp;quot;valuebase&amp;quot;, &amp;quot;valuetype&amp;quot;, &amp;quot;void&amp;quot;, &amp;quot;wchar&amp;quot;, &amp;quot;wstring&amp;quot;&amp;lt;/p&amp;gt;&lt;br /&gt;
* New Views not already within the model must be unique among elements of type IDLStruct and Enumeration.&lt;br /&gt;
* Multidimensional Measurements are supported, however each axis will default to the primitive found within the primitive column (these can be corrected within Phenom later if desired).&lt;br /&gt;
* If there are any errors during validation of the CSV file, the model import will not be initiated and a list of errors will be returned. They will be labeled by the row they occur on for convenience.&lt;br /&gt;
* There is a 2MB limit in place - if a larger file needs to be imported, it needs to be split up into smaller files.&lt;br /&gt;
* In the raw CSV (i.e., as observed from notepad), any field with commas must have surrounding quotes (Excel normally handles this).&lt;/div&gt;</summary>
		<author><name>Dmitry</name></author>
	</entry>
	<entry>
		<id>https://kb.phenomportal.com/index.php?title=Union&amp;diff=1066</id>
		<title>Union</title>
		<link rel="alternate" type="text/html" href="https://kb.phenomportal.com/index.php?title=Union&amp;diff=1066"/>
		<updated>2024-02-07T15:30:55Z</updated>

		<summary type="html">&lt;p&gt;Dmitry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FACE 3 Technical Standard introduced the ability to document union templates – in PHENOM, these are represented by union [[View|Views]].&lt;br /&gt;
&lt;br /&gt;
== Union Creation ==&lt;br /&gt;
Unions cannot be created independently, but rather existing View elements can be converted to be unions. On its [[Data Model Details|Details]] page, a toggle labeled &#039;Union&#039; is used to change the view element between a union and non-union structure.&lt;br /&gt;
&lt;br /&gt;
Not all views can be changed to be a union type, and so the toggle may be disabled for some view elements in the model. Which views may be transformed into unions is governed by FACE standard rules.&lt;br /&gt;
&lt;br /&gt;
[[File:View_Page_Union_Toggle.png|800px|border|PHENOM views can be converted to unions via a toggle on the Details page.]]&lt;br /&gt;
&lt;br /&gt;
=== Non-Composite (Nesting) Views as Unions ===&lt;br /&gt;
For a non-composite view to be converted to a union, three FACE structural requirements must be fulfilled.&lt;br /&gt;
&lt;br /&gt;
First: a union cannot be a “top level” type, but must rather be defined as a sub-type, nested inside the definition of another structure. In a FACE model, this will appear as a template structure that is not housed in its own template node, but is rather defined as a sub-structure in the specification of another template node. In PHENOM, this is represented as a view that is referenced as the type of another view&#039;s field - this is what is referred to as &amp;quot;nested attribute&amp;quot;. In this case, the field in question should also be marked as &amp;quot;Private&amp;quot;, indicating that the nested view is defined in a scope internal to the view in which it is nested.&lt;br /&gt;
&lt;br /&gt;
[[File:Private Union Nesting.png|800px|border|The private nesting of a union view within a top level view.]]&lt;br /&gt;
&lt;br /&gt;
Second: to become a union, a view must have at least one [[View Attribute|attribute]] or field that references an [[Enumerations|enumeration]] as its platform type. In a FACE model, this enumerated field will be selected by the query related to the union template to serve as the discriminant over which the union is switched. In PHENOM, when a user toggles a view to be a union, a drop-down appears next to the switch allowing the selection of the discriminant. This drop-down lists all of the current view&#039;s enumeration attributes.&lt;br /&gt;
&lt;br /&gt;
[[File:View Switch Selection.png|800px|border|Selection of an enumeration-based view attribute as a union discriminant.]]&lt;br /&gt;
&lt;br /&gt;
Third: to be eligible for conversion to a union, all of the projections in the view must project the same element. In a FACE model, this is the same rule that applies to all non-composite templates. In PHENOM, this requirement can be satisfied by ensuring that the first element of each attribute&#039;s projection path is the same for the selected view.&lt;br /&gt;
&lt;br /&gt;
[[File:Union Projection Uniformity.png|800px|The projected characteristic uniformity among view attributes required of union types.]]&lt;br /&gt;
&lt;br /&gt;
If the union toggle on a given view&#039;s page is disabled, it is likely because one of the above requirements is not fulfilled.&lt;br /&gt;
&lt;br /&gt;
=== Assigning Case Literals to Union Fields ===&lt;br /&gt;
Once the discriminant of a view has been selected, the attributes of the view can be assigned to the different union cases. Each case is represented by at least one of the literals associated with the discriminant attribute&#039;s platform type enumeration. While more than one of the literals can indicate a single case, a given literal can only be associated with at most one case. Only one attribute is allowed to occupy any given case. The view attribute acting as the union&#039;s discriminant can also occupy one of the cases.&lt;br /&gt;
&lt;br /&gt;
By expanding a view attribute, a drop-down listing the discriminant enumeration&#039;s literals can be used to add literals to that attribute&#039;s case. Once selected, the literals of a given attribute&#039;s case are shown above the attribute rolename.&lt;br /&gt;
&lt;br /&gt;
[[File:Union Case Selection.png|800px|border|The drop-down listing the discriminant field&#039;s enumeration type&#039;s literals can be used to select case literals applied to a given field&#039;s case. Once selected, they will appear above the relevant field&#039;s rolename.]]&lt;br /&gt;
&lt;br /&gt;
=== Composite Views as Unions ===&lt;br /&gt;
Composite FACE templates can also be indicated as unions. Mirroring that, in PHENOM, composite views can also be switched to be unions.&lt;br /&gt;
&lt;br /&gt;
Composite unions don&#039;t require any additional specifications, such as the indication of an enumeration-based discriminant. Instead, each composition is considered a member of a single case labeled with an integer value corresponding to the compositions index in the composite.&lt;br /&gt;
&lt;br /&gt;
== Union View Export to FACE 3 Queries and Templates ==&lt;br /&gt;
Upon exporting a model to the FACE 3 format, PHENOM automatically converts any union views to their appropriate FACE query and template representations. &lt;br /&gt;
&lt;br /&gt;
The template representing any union view is prefixed with the `union` FACE keyword. The discriminant field selected for the view is used as the parameter of the union&#039;s switch statement. The view attributes&#039; case literal assignments are converted to case groups in the union template. The union template as a whole is related to a query that reflects the semantics indicated in the view attributes&#039; PHENOM path.&lt;br /&gt;
&lt;br /&gt;
The query and template generated for a given view can be previewed on the view&#039;s Details page by expanding the &#039;Query and Template Preview&#039; section under the attributes listing.&lt;br /&gt;
&lt;br /&gt;
[[File:Union Query Template Preview.png|800px|border|A view of PHENOM&#039;s query and template preview for a union view.]]&lt;br /&gt;
&lt;br /&gt;
== Union Structure Code Representation ==&lt;br /&gt;
Though interpreted as unions in IDL, the FACE standard dictates C struct and C++/Java class representations of these structures.&lt;br /&gt;
&lt;br /&gt;
Please refer to the [https://publications.opengroup.org/c207 FACE Technical Standard] documents for details on implementing union type structures in code.&lt;/div&gt;</summary>
		<author><name>Dmitry</name></author>
	</entry>
	<entry>
		<id>https://kb.phenomportal.com/index.php?title=Union&amp;diff=1059</id>
		<title>Union</title>
		<link rel="alternate" type="text/html" href="https://kb.phenomportal.com/index.php?title=Union&amp;diff=1059"/>
		<updated>2024-02-06T16:28:40Z</updated>

		<summary type="html">&lt;p&gt;Dmitry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:View_Page_Union_Toggle.png|alt=The toggle to switch a view to a union type on the view element&#039;s detail page.|thumb|481x481px|Phenom views can be converted to unions via a toggle on the Details page.]]&lt;br /&gt;
&lt;br /&gt;
The FACE 3 standard introduced the ability to document union templates – in Phenom, these are represented by union [[View|views]].&lt;br /&gt;
&lt;br /&gt;
== Union Creation In Phenom ==&lt;br /&gt;
Unions cannot be created independently, but rather existing Phenom view elements can be converted to be unions. On the view element&#039;s [[Data Model Details|Details]] page, a toggle labeled &#039;Union&#039; is used to change view element between a union and non-union structure.&lt;br /&gt;
&lt;br /&gt;
Not all views can be changed to be a union type, and so the toggle may appear disabled for some view elements in a model. Which views may be transformed into unions is governed by FACE standard rules.&lt;br /&gt;
&lt;br /&gt;
=== Non-Composite (Nesting) Views as Unions ===&lt;br /&gt;
For a non-composite view to be converted to a union, three FACE structural requirements must be fulfilled.&lt;br /&gt;
[[File:Private Union Nesting.png|left|thumb|480x480px|The private nesting of a union view within a top level view.]]&lt;br /&gt;
First: a union cannot be a “top level” type, but must rather be defined as a sub-type, nested inside the definition of another structure. In a FACE model, this will appear as a template structure that is not housed in its own template node, but is rather defined as a sub-structure in the specification of another template node. In Phenom, this is represented as a view that is referenced as the type of another view&#039;s field - this is what is referred to as &amp;quot;nested attribute&amp;quot;. In this case, the field in question should also be marked as &amp;quot;Private&amp;quot;, indicating that the nested view is defined in a scope internal to the view in which it is nested.&lt;br /&gt;
[[File:View Switch Selection.png|left|thumb|481x481px|Selection of an enumeration-based view attribute as a union discriminant.]]&lt;br /&gt;
Second: to become a union, a view must have at least one [[View Attribute|attribute]] or field that references an [[Enumerations|enumeration]] as its platform type. In a FACE model, this enumerated field will be selected by the query related to the union template to serve as the discriminant over which the union is switched. In Phenom, when a user toggles a view to be a union, a drop-down appears next to the switch allowing the selection of the discriminant. This drop-down lists all of the current view&#039;s attributes the Platform Type property of which references a platform enumeration element.&lt;br /&gt;
[[File:Union Projection Uniformity.png|left|thumb|480x480px|The projected characteristic uniformity among view attributes required of union types.]]&lt;br /&gt;
Third: to be eligible for conversion to a union, all of the projections in the view must project the same element. In a FACE model, this is the same rule that applies to all non-composite templates. In Phenom, this requirement can be satisfied by ensuring that the first element of each attribute&#039;s projection path is the same for the selected view.&lt;br /&gt;
&lt;br /&gt;
If the union toggle on a given view&#039;s page is disabled, is is likely because one of the above requirements is not fulfilled.&lt;br /&gt;
&lt;br /&gt;
==== Assigning Case Literals to Union Fields ====&lt;br /&gt;
[[File:Union Case Selection.png|left|thumb|482x482px|The drop-down listing the discriminant field&#039;s enumeration type&#039;s literals can be used to select case literals applied to a given field&#039;s case. Once selected, they will appear above the relevant field&#039;s rolename.]]&lt;br /&gt;
Once the discriminant of a view has been indicated, the attributes of the view can be assigned to the different union cases. Each case is represented by at least one of the literals associated with the discriminant attribute&#039;s platform type enumeration. While more than one of the literals can indicate a single case, only one attribute is allowed to occupy any given case. A given literal is also only allowed to be associated with a single case. The view attribute acting as the union&#039;s discriminant can also occupy one of the cases.&lt;br /&gt;
&lt;br /&gt;
The literal assignment UI can be found by expanding a view attribute in Phenom. A drop-down listing the discriminant enumeration&#039;s literals found in the view attribute&#039;s expanded view is used to add literals to that attribute&#039;s case. Once selected, the literals of a given attribute&#039;s case are shown above the attribute rolename.&lt;br /&gt;
&lt;br /&gt;
=== Composite Views as Unions ===&lt;br /&gt;
Composite FACE templates can also be indicated as unions. Mirroring that, in Phenom, composite views can also be switched to be unions.&lt;br /&gt;
&lt;br /&gt;
Composite unions don&#039;t require any additional specifications, such as the indication of an enumeration-based discriminant. Instead, each composition is considered a member of a single case labeled with an integer value corresponding to the compositions index in the composite.&lt;br /&gt;
&lt;br /&gt;
== Union View Export to FACE 3 Queries and Templates ==&lt;br /&gt;
[[File:Union Query Template Preview.png|thumb|507x507px|A view of Phenom&#039;s query and template preview for a union view.]]&lt;br /&gt;
Upon exporting a model to the FACE 3 format, Phenom automatically converts any union views to their appropriate FACE query and template representations. &lt;br /&gt;
&lt;br /&gt;
The template representing any union view is prefixed with the `union` FACE keyword. The discriminant field selected for the view is used as the parameter of the union&#039;s switch statement. The view attributes&#039; case literal assignments are converted to case groups in the union template. The union template as a whole is related to a query that reflects the semantics indicated in the view attributes&#039; Phenom paths.&lt;br /&gt;
&lt;br /&gt;
The query and template generated for a given view can be previewed on the view&#039;s Details page by expanding the &#039;Query and Template Preview&#039; section under the attributes listing.&lt;br /&gt;
&lt;br /&gt;
== Union Structure Code Representation ==&lt;br /&gt;
Though interpreted as unions in IDL, the FACE standard dictates C struct and C++/Java class representations of these structures.&lt;br /&gt;
&lt;br /&gt;
Please refer to the [https://publications.opengroup.org/c207 FACE Technical Standard] documents for details on implementing union type structures in code.&lt;/div&gt;</summary>
		<author><name>Dmitry</name></author>
	</entry>
	<entry>
		<id>https://kb.phenomportal.com/index.php?title=Union&amp;diff=1058</id>
		<title>Union</title>
		<link rel="alternate" type="text/html" href="https://kb.phenomportal.com/index.php?title=Union&amp;diff=1058"/>
		<updated>2024-02-06T16:27:39Z</updated>

		<summary type="html">&lt;p&gt;Dmitry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:View_Page_Union_Toggle.png|alt=The toggle to switch a view to a union type on the view element&#039;s detail page.|frameless|481x481px]]&lt;br /&gt;
&lt;br /&gt;
The FACE 3 standard introduced the ability to document union templates – in Phenom, these are represented by union [[View|views]].&lt;br /&gt;
&lt;br /&gt;
== Union Creation In Phenom ==&lt;br /&gt;
Unions cannot be created independently, but rather existing Phenom view elements can be converted to be unions. On the view element&#039;s [[Data Model Details|Details]] page, a toggle labeled &#039;Union&#039; is used to change view element between a union and non-union structure.&lt;br /&gt;
&lt;br /&gt;
Not all views can be changed to be a union type, and so the toggle may appear disabled for some view elements in a model. Which views may be transformed into unions is governed by FACE standard rules.&lt;br /&gt;
&lt;br /&gt;
=== Non-Composite (Nesting) Views as Unions ===&lt;br /&gt;
For a non-composite view to be converted to a union, three FACE structural requirements must be fulfilled.&lt;br /&gt;
[[File:Private Union Nesting.png|left|thumb|480x480px|The private nesting of a union view within a top level view.]]&lt;br /&gt;
First: a union cannot be a “top level” type, but must rather be defined as a sub-type, nested inside the definition of another structure. In a FACE model, this will appear as a template structure that is not housed in its own template node, but is rather defined as a sub-structure in the specification of another template node. In Phenom, this is represented as a view that is referenced as the type of another view&#039;s field - this is what is referred to as &amp;quot;nested attribute&amp;quot;. In this case, the field in question should also be marked as &amp;quot;Private&amp;quot;, indicating that the nested view is defined in a scope internal to the view in which it is nested.&lt;br /&gt;
[[File:View Switch Selection.png|left|thumb|481x481px|Selection of an enumeration-based view attribute as a union discriminant.]]&lt;br /&gt;
Second: to become a union, a view must have at least one [[View Attribute|attribute]] or field that references an [[Enumerations|enumeration]] as its platform type. In a FACE model, this enumerated field will be selected by the query related to the union template to serve as the discriminant over which the union is switched. In Phenom, when a user toggles a view to be a union, a drop-down appears next to the switch allowing the selection of the discriminant. This drop-down lists all of the current view&#039;s attributes the Platform Type property of which references a platform enumeration element.&lt;br /&gt;
[[File:Union Projection Uniformity.png|left|thumb|480x480px|The projected characteristic uniformity among view attributes required of union types.]]&lt;br /&gt;
Third: to be eligible for conversion to a union, all of the projections in the view must project the same element. In a FACE model, this is the same rule that applies to all non-composite templates. In Phenom, this requirement can be satisfied by ensuring that the first element of each attribute&#039;s projection path is the same for the selected view.&lt;br /&gt;
&lt;br /&gt;
If the union toggle on a given view&#039;s page is disabled, is is likely because one of the above requirements is not fulfilled.&lt;br /&gt;
&lt;br /&gt;
==== Assigning Case Literals to Union Fields ====&lt;br /&gt;
[[File:Union Case Selection.png|left|thumb|482x482px|The drop-down listing the discriminant field&#039;s enumeration type&#039;s literals can be used to select case literals applied to a given field&#039;s case. Once selected, they will appear above the relevant field&#039;s rolename.]]&lt;br /&gt;
Once the discriminant of a view has been indicated, the attributes of the view can be assigned to the different union cases. Each case is represented by at least one of the literals associated with the discriminant attribute&#039;s platform type enumeration. While more than one of the literals can indicate a single case, only one attribute is allowed to occupy any given case. A given literal is also only allowed to be associated with a single case. The view attribute acting as the union&#039;s discriminant can also occupy one of the cases.&lt;br /&gt;
&lt;br /&gt;
The literal assignment UI can be found by expanding a view attribute in Phenom. A drop-down listing the discriminant enumeration&#039;s literals found in the view attribute&#039;s expanded view is used to add literals to that attribute&#039;s case. Once selected, the literals of a given attribute&#039;s case are shown above the attribute rolename.&lt;br /&gt;
&lt;br /&gt;
=== Composite Views as Unions ===&lt;br /&gt;
Composite FACE templates can also be indicated as unions. Mirroring that, in Phenom, composite views can also be switched to be unions.&lt;br /&gt;
&lt;br /&gt;
Composite unions don&#039;t require any additional specifications, such as the indication of an enumeration-based discriminant. Instead, each composition is considered a member of a single case labeled with an integer value corresponding to the compositions index in the composite.&lt;br /&gt;
&lt;br /&gt;
== Union View Export to FACE 3 Queries and Templates ==&lt;br /&gt;
[[File:Union Query Template Preview.png|thumb|507x507px|A view of Phenom&#039;s query and template preview for a union view.]]&lt;br /&gt;
Upon exporting a model to the FACE 3 format, Phenom automatically converts any union views to their appropriate FACE query and template representations. &lt;br /&gt;
&lt;br /&gt;
The template representing any union view is prefixed with the `union` FACE keyword. The discriminant field selected for the view is used as the parameter of the union&#039;s switch statement. The view attributes&#039; case literal assignments are converted to case groups in the union template. The union template as a whole is related to a query that reflects the semantics indicated in the view attributes&#039; Phenom paths.&lt;br /&gt;
&lt;br /&gt;
The query and template generated for a given view can be previewed on the view&#039;s Details page by expanding the &#039;Query and Template Preview&#039; section under the attributes listing.&lt;br /&gt;
&lt;br /&gt;
== Union Structure Code Representation ==&lt;br /&gt;
Though interpreted as unions in IDL, the FACE standard dictates C struct and C++/Java class representations of these structures.&lt;br /&gt;
&lt;br /&gt;
Please refer to the [https://publications.opengroup.org/c207 FACE Technical Standard] documents for details on implementing union type structures in code.&lt;/div&gt;</summary>
		<author><name>Dmitry</name></author>
	</entry>
	<entry>
		<id>https://kb.phenomportal.com/index.php?title=Union&amp;diff=1057</id>
		<title>Union</title>
		<link rel="alternate" type="text/html" href="https://kb.phenomportal.com/index.php?title=Union&amp;diff=1057"/>
		<updated>2024-02-06T16:26:44Z</updated>

		<summary type="html">&lt;p&gt;Dmitry: /* Union Structure Representation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:View Page Union Toggle.png|alt=The toggle to switch a view to a union type on the view element&#039;s detail page.|thumb|481x481px|The toggle to switch a view to a union type on the view element&#039;s detail page.]]&lt;br /&gt;
The FACE 3 standard introduced the ability to document union templates – in Phenom, these are represented by union [[View|views]].&lt;br /&gt;
&lt;br /&gt;
== Union Creation In Phenom ==&lt;br /&gt;
Unions cannot be created independently, but rather existing Phenom view elements can be converted to be unions. On the view element&#039;s [[Data Model Details|Details]] page, a toggle labeled &#039;Union&#039; is used to change view element between a union and non-union structure.&lt;br /&gt;
&lt;br /&gt;
Not all views can be changed to be a union type, and so the toggle may appear disabled for some view elements in a model. Which views may be transformed into unions is governed by FACE standard rules.&lt;br /&gt;
&lt;br /&gt;
=== Non-Composite (Nesting) Views as Unions ===&lt;br /&gt;
For a non-composite view to be converted to a union, three FACE structural requirements must be fulfilled.&lt;br /&gt;
[[File:Private Union Nesting.png|left|thumb|480x480px|The private nesting of a union view within a top level view.]]&lt;br /&gt;
First: a union cannot be a “top level” type, but must rather be defined as a sub-type, nested inside the definition of another structure. In a FACE model, this will appear as a template structure that is not housed in its own template node, but is rather defined as a sub-structure in the specification of another template node. In Phenom, this is represented as a view that is referenced as the type of another view&#039;s field - this is what is referred to as &amp;quot;nested attribute&amp;quot;. In this case, the field in question should also be marked as &amp;quot;Private&amp;quot;, indicating that the nested view is defined in a scope internal to the view in which it is nested.&lt;br /&gt;
[[File:View Switch Selection.png|left|thumb|481x481px|Selection of an enumeration-based view attribute as a union discriminant.]]&lt;br /&gt;
Second: to become a union, a view must have at least one [[View Attribute|attribute]] or field that references an [[Enumerations|enumeration]] as its platform type. In a FACE model, this enumerated field will be selected by the query related to the union template to serve as the discriminant over which the union is switched. In Phenom, when a user toggles a view to be a union, a drop-down appears next to the switch allowing the selection of the discriminant. This drop-down lists all of the current view&#039;s attributes the Platform Type property of which references a platform enumeration element.&lt;br /&gt;
[[File:Union Projection Uniformity.png|left|thumb|480x480px|The projected characteristic uniformity among view attributes required of union types.]]&lt;br /&gt;
Third: to be eligible for conversion to a union, all of the projections in the view must project the same element. In a FACE model, this is the same rule that applies to all non-composite templates. In Phenom, this requirement can be satisfied by ensuring that the first element of each attribute&#039;s projection path is the same for the selected view.&lt;br /&gt;
&lt;br /&gt;
If the union toggle on a given view&#039;s page is disabled, is is likely because one of the above requirements is not fulfilled.&lt;br /&gt;
&lt;br /&gt;
==== Assigning Case Literals to Union Fields ====&lt;br /&gt;
[[File:Union Case Selection.png|left|thumb|482x482px|The drop-down listing the discriminant field&#039;s enumeration type&#039;s literals can be used to select case literals applied to a given field&#039;s case. Once selected, they will appear above the relevant field&#039;s rolename.]]&lt;br /&gt;
Once the discriminant of a view has been indicated, the attributes of the view can be assigned to the different union cases. Each case is represented by at least one of the literals associated with the discriminant attribute&#039;s platform type enumeration. While more than one of the literals can indicate a single case, only one attribute is allowed to occupy any given case. A given literal is also only allowed to be associated with a single case. The view attribute acting as the union&#039;s discriminant can also occupy one of the cases.&lt;br /&gt;
&lt;br /&gt;
The literal assignment UI can be found by expanding a view attribute in Phenom. A drop-down listing the discriminant enumeration&#039;s literals found in the view attribute&#039;s expanded view is used to add literals to that attribute&#039;s case. Once selected, the literals of a given attribute&#039;s case are shown above the attribute rolename.&lt;br /&gt;
&lt;br /&gt;
=== Composite Views as Unions ===&lt;br /&gt;
Composite FACE templates can also be indicated as unions. Mirroring that, in Phenom, composite views can also be switched to be unions.&lt;br /&gt;
&lt;br /&gt;
Composite unions don&#039;t require any additional specifications, such as the indication of an enumeration-based discriminant. Instead, each composition is considered a member of a single case labeled with an integer value corresponding to the compositions index in the composite.&lt;br /&gt;
&lt;br /&gt;
== Union View Export to FACE 3 Queries and Templates ==&lt;br /&gt;
[[File:Union Query Template Preview.png|thumb|507x507px|A view of Phenom&#039;s query and template preview for a union view.]]&lt;br /&gt;
Upon exporting a model to the FACE 3 format, Phenom automatically converts any union views to their appropriate FACE query and template representations. &lt;br /&gt;
&lt;br /&gt;
The template representing any union view is prefixed with the `union` FACE keyword. The discriminant field selected for the view is used as the parameter of the union&#039;s switch statement. The view attributes&#039; case literal assignments are converted to case groups in the union template. The union template as a whole is related to a query that reflects the semantics indicated in the view attributes&#039; Phenom paths.&lt;br /&gt;
&lt;br /&gt;
The query and template generated for a given view can be previewed on the view&#039;s Details page by expanding the &#039;Query and Template Preview&#039; section under the attributes listing.&lt;br /&gt;
&lt;br /&gt;
== Union Structure Code Representation ==&lt;br /&gt;
Though interpreted as unions in IDL, the FACE standard dictates C struct and C++/Java class representations of these structures.&lt;br /&gt;
&lt;br /&gt;
Please refer to the [https://publications.opengroup.org/c207 FACE Technical Standard] documents for details on implementing union type structures in code.&lt;/div&gt;</summary>
		<author><name>Dmitry</name></author>
	</entry>
	<entry>
		<id>https://kb.phenomportal.com/index.php?title=File:Union_Query_Template_Preview.png&amp;diff=1056</id>
		<title>File:Union Query Template Preview.png</title>
		<link rel="alternate" type="text/html" href="https://kb.phenomportal.com/index.php?title=File:Union_Query_Template_Preview.png&amp;diff=1056"/>
		<updated>2024-02-06T16:25:22Z</updated>

		<summary type="html">&lt;p&gt;Dmitry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A view of Phenom&#039;s query template preview for a union view.&lt;/div&gt;</summary>
		<author><name>Dmitry</name></author>
	</entry>
	<entry>
		<id>https://kb.phenomportal.com/index.php?title=Union&amp;diff=1055</id>
		<title>Union</title>
		<link rel="alternate" type="text/html" href="https://kb.phenomportal.com/index.php?title=Union&amp;diff=1055"/>
		<updated>2024-02-06T16:12:34Z</updated>

		<summary type="html">&lt;p&gt;Dmitry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:View Page Union Toggle.png|alt=The toggle to switch a view to a union type on the view element&#039;s detail page.|thumb|481x481px|The toggle to switch a view to a union type on the view element&#039;s detail page.]]&lt;br /&gt;
The FACE 3 standard introduced the ability to document union templates – in Phenom, these are represented by union [[View|views]]. Though interpreted as unions in IDL, the FACE standard dictates C struct and C++/Java class representations of these structures; please refer to the [https://publications.opengroup.org/c207 FACE Technical Standard] documents for details on implementing union type structures in code.&lt;br /&gt;
&lt;br /&gt;
== Union Creation In Phenom ==&lt;br /&gt;
Unions cannot be created independently, but rather existing Phenom view elements can be converted to be unions. On the view element&#039;s [[Data Model Details|Details]] page, a toggle labeled &#039;Union&#039; is used to change view element between a union and non-union structure.&lt;br /&gt;
&lt;br /&gt;
Not all views can be changed to be a union type, and so the toggle may appear disabled for some view elements in a model. Which views may be transformed into unions is governed by FACE standard rules.&lt;br /&gt;
&lt;br /&gt;
=== Non-Composite (Nesting) Views as Unions ===&lt;br /&gt;
For a non-composite view to be converted to a union, three FACE structural requirements must be fulfilled.&lt;br /&gt;
[[File:Private Union Nesting.png|left|thumb|480x480px|The private nesting of a union view within a top level view.]]&lt;br /&gt;
First: a union cannot be a “top level” type, but must rather be defined as a sub-type, nested inside the definition of another structure. In a FACE model, this will appear as a template structure that is not housed in its own template node, but is rather defined as a sub-structure in the specification of another template node. In Phenom, this is represented as a view that is referenced as the type of another view&#039;s field - this is what is referred to as &amp;quot;nested attribute&amp;quot;. In this case, the field in question should also be marked as &amp;quot;Private&amp;quot;, indicating that the nested view is defined in a scope internal to the view in which it is nested.&lt;br /&gt;
[[File:View Switch Selection.png|left|thumb|481x481px|Selection of an enumeration-based view attribute as a union discriminant.]]&lt;br /&gt;
Second: to become a union, a view must have at least one [[View Attribute|attribute]] or field that references an [[Enumerations|enumeration]] as its platform type. In a FACE model, this enumerated field will be selected by the query related to the union template to serve as the discriminant over which the union is switched. In Phenom, when a user toggles a view to be a union, a drop-down appears next to the switch allowing the selection of the discriminant. This drop-down lists all of the current view&#039;s attributes the Platform Type property of which references a platform enumeration element.&lt;br /&gt;
[[File:Union Projection Uniformity.png|left|thumb|480x480px|The projected characteristic uniformity among view attributes required of union types.]]&lt;br /&gt;
Third: to be eligible for conversion to a union, all of the projections in the view must project the same element. In a FACE model, this is the same rule that applies to all non-composite templates. In Phenom, this requirement can be satisfied by ensuring that the first element of each attribute&#039;s projection path is the same for the selected view.&lt;br /&gt;
&lt;br /&gt;
If the union toggle on a given view&#039;s page is disabled, is is likely because one of the above requirements is not fulfilled.&lt;br /&gt;
&lt;br /&gt;
==== Assigning Case Literals to Union Fields ====&lt;br /&gt;
[[File:Union Case Selection.png|left|thumb|482x482px|The drop-down listing the discriminant field&#039;s enumeration type&#039;s literals can be used to select case literals applied to a given field&#039;s case. Once selected, they will appear above the relevant field&#039;s rolename.]]&lt;br /&gt;
Once the discriminant of a view has been indicated, the attributes of the view can be assigned to the different union cases. Each case is represented by at least one of the literals associated with the discriminant attribute&#039;s platform type enumeration. While more than one of the literals can indicate a single case, only one attribute is allowed to occupy any given case. A given literal is also only allowed to be associated with a single case. The view attribute acting as the union&#039;s discriminant can also occupy one of the cases.&lt;br /&gt;
&lt;br /&gt;
The literal assignment UI can be found by expanding a view attribute in Phenom. A drop-down listing the discriminant enumeration&#039;s literals found in the view attribute&#039;s expanded view is used to add literals to that attribute&#039;s case. Once selected, the literals of a given attribute&#039;s case are shown above the attribute rolename.&lt;br /&gt;
&lt;br /&gt;
=== Composite Views as Unions ===&lt;br /&gt;
Composite FACE templates can also be indicated as unions. Mirroring that, in Phenom, composite views can also be switched to be unions.&lt;br /&gt;
&lt;br /&gt;
Composite unions don&#039;t require any additional specifications, such as the indication of an enumeration-based discriminant. Instead, each composition is considered a member of a single case labeled with an integer value corresponding to the compositions index in the composite.&lt;br /&gt;
&lt;br /&gt;
== Union Structure Representation ==&lt;/div&gt;</summary>
		<author><name>Dmitry</name></author>
	</entry>
	<entry>
		<id>https://kb.phenomportal.com/index.php?title=Union&amp;diff=1054</id>
		<title>Union</title>
		<link rel="alternate" type="text/html" href="https://kb.phenomportal.com/index.php?title=Union&amp;diff=1054"/>
		<updated>2024-02-06T16:11:36Z</updated>

		<summary type="html">&lt;p&gt;Dmitry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:View Page Union Toggle.png|alt=The toggle to switch a view to a union type on the view element&#039;s detail page.|thumb|481x481px|The toggle to switch a view to a union type on the view element&#039;s detail page.]]&lt;br /&gt;
The FACE 3 standard introduced the ability to document union templates – in Phenom, these are represented by union [[View|views]]. Though interpreted as unions in IDL, the FACE standard dictates C struct and C++/Java class representations of these structures; please refer to the [https://publications.opengroup.org/c207 FACE Technical Standard] documents for details on implementing union type structures in code.&lt;br /&gt;
&lt;br /&gt;
== Union Creation In Phenom ==&lt;br /&gt;
Unions cannot be created independently, but rather existing Phenom view elements can be converted to be unions. On the view element&#039;s [[Data Model Details|Details]] page, a toggle labeled &#039;Union&#039; is used to change view element between a union and non-union structure.&lt;br /&gt;
&lt;br /&gt;
Not all views can be changed to be a union type, and so the toggle may appear disabled for some view elements in a model. Which views may be transformed into unions is governed by FACE standard rules.&lt;br /&gt;
&lt;br /&gt;
=== Non-Composite (Nesting) Views as Unions ===&lt;br /&gt;
For a non-composite view to be converted to a union, three FACE structural requirements must be fulfilled.&lt;br /&gt;
[[File:Private Union Nesting.png|left|thumb|480x480px|The private nesting of a union view within a top level view.]]&lt;br /&gt;
First: a union cannot be a “top level” type, but must rather be defined as a sub-type, nested inside the definition of another structure. In a FACE model, this will appear as a template structure that is not housed in its own template node, but is rather defined as a sub-structure in the specification of another template node. In Phenom, this is represented as a view that is referenced as the type of another view&#039;s field - this is what is referred to as &amp;quot;nested attribute&amp;quot;. In this case, the field in question should also be marked as &amp;quot;Private&amp;quot;, indicating that the nested view is defined in a scope internal to the view in which it is nested.&lt;br /&gt;
[[File:View Switch Selection.png|left|thumb|481x481px|Selection of an enumeration-based view attribute as a union discriminant.]]&lt;br /&gt;
Second: to become a union, a view must have at least one [[View Attribute|attribute]] or field that references an [[Enumerations|enumeration]] as its platform type. In a FACE model, this enumerated field will be selected by the query related to the union template to serve as the discriminant over which the union is switched. In Phenom, when a user toggles a view to be a union, a drop-down appears next to the switch allowing the selection of the discriminant. This drop-down lists all of the current view&#039;s attributes the Platform Type property of which references a platform enumeration element.&lt;br /&gt;
[[File:Union Projection Uniformity.png|left|thumb|480x480px|The projected characteristic uniformity among view attributes required of union types.]]&lt;br /&gt;
Third: to be eligible for conversion to a union, all of the projections in the view must project the same element. In a FACE model, this is the same rule that applies to all non-composite templates. In Phenom, this requirement can be satisfied by ensuring that the first element of each attribute&#039;s projection path is the same for the selected view.&lt;br /&gt;
&lt;br /&gt;
If the union toggle on a given view&#039;s page is disabled, is is likely because one of the above requirements is not fulfilled.&lt;br /&gt;
&lt;br /&gt;
==== Assigning Case Literals to Union Fields ====&lt;br /&gt;
[[File:Union Case Selection.png|left|thumb|482x482px|The drop-down listing the discriminant field&#039;s enumeration type&#039;s literals can be used to select case literals applied to a given field&#039;s case. Once selected, they will appear above the relevant field&#039;s rolename.]]&lt;br /&gt;
Once the discriminant of a view has been indicated, the attributes of the view can be assigned to the different union cases. Each case is represented by at least one of the literals associated with the discriminant attribute&#039;s platform type enumeration. While more than one of the literals can indicate a single case, only one attribute is allowed to occupy any given case. A given literal is also only allowed to be associated with a single case. The view attribute acting as the union&#039;s discriminant can also occupy one of the cases.&lt;br /&gt;
&lt;br /&gt;
The literal assignment UI can be found by expanding a view attribute in Phenom. A drop-down listing the discriminant enumeration&#039;s literals found in the view attribute&#039;s expanded view is used to add literals to that attribute&#039;s case. Once selected, the literals of a given attribute&#039;s case are shown above the attribute rolename.&lt;br /&gt;
&lt;br /&gt;
=== Composite Views as Unions ===&lt;br /&gt;
Composite FACE templates can also be indicated as unions. Mirroring that, in Phenom, composite views can also be switched to be unions.&lt;br /&gt;
&lt;br /&gt;
Composite unions don&#039;t require any additional specifications, such as the indication of an enumeration-based discriminant. Instead, each composition is considered a member of a single case labeled with an integer value corresponding to the compositions index in the composite.&lt;/div&gt;</summary>
		<author><name>Dmitry</name></author>
	</entry>
	<entry>
		<id>https://kb.phenomportal.com/index.php?title=File:Union_Case_Selection.png&amp;diff=1053</id>
		<title>File:Union Case Selection.png</title>
		<link rel="alternate" type="text/html" href="https://kb.phenomportal.com/index.php?title=File:Union_Case_Selection.png&amp;diff=1053"/>
		<updated>2024-02-06T15:45:14Z</updated>

		<summary type="html">&lt;p&gt;Dmitry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A view of union case selection in Phenom.&lt;/div&gt;</summary>
		<author><name>Dmitry</name></author>
	</entry>
	<entry>
		<id>https://kb.phenomportal.com/index.php?title=Union&amp;diff=1052</id>
		<title>Union</title>
		<link rel="alternate" type="text/html" href="https://kb.phenomportal.com/index.php?title=Union&amp;diff=1052"/>
		<updated>2024-02-06T15:27:35Z</updated>

		<summary type="html">&lt;p&gt;Dmitry: Created page with &amp;quot;The toggle to switch a view to a union type on the view element&amp;#039;s detail page. The FACE 3 standard introduced the ability to document union templates – in Phenom, these are represented by union views. Though interpreted as unions in IDL, the FACE standard dictates C struct and C++/Java class representations of these structures;...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:View Page Union Toggle.png|alt=The toggle to switch a view to a union type on the view element&#039;s detail page.|thumb|564x564px|The toggle to switch a view to a union type on the view element&#039;s detail page.]]&lt;br /&gt;
The FACE 3 standard introduced the ability to document union templates – in Phenom, these are represented by union [[View|views]]. Though interpreted as unions in IDL, the FACE standard dictates C struct and C++/Java class representations of these structures; please refer to the [https://publications.opengroup.org/c207 FACE Technical Standard] documents for details on implementing union type structures in code.&lt;br /&gt;
&lt;br /&gt;
=== Creating a Union ===&lt;br /&gt;
Unions cannot be created independently, but rather existing Phenom view elements can be converted to be unions. On the view element&#039;s [[Data Model Details|Details]] page, a toggle labeled &#039;Union&#039; is used to change view element between a union and non-union structure.&lt;br /&gt;
&lt;br /&gt;
Not all views can be changed to be a union type, and so the toggle may appear disabled for some view elements in a model. Which views may be transformed into unions is governed by FACE standard rules.&lt;br /&gt;
&lt;br /&gt;
==== Non-Composite (Nesting) Views as Unions ====&lt;br /&gt;
For a non-composite view to be converted to a union, three FACE structural requirements must be fulfilled.&lt;br /&gt;
[[File:Private Union Nesting.png|left|thumb|480x480px|The private nesting of a union view within a top level view.]]&lt;br /&gt;
First: a union cannot be a “top level” type, but must rather be defined as a sub-type, nested inside the definition of another structure. In a FACE model, this will appear as a template structure that is not housed in its own template node, but is rather defined as a sub-structure in the specification of another template node. In Phenom, this is represented as a view that is referenced as the type of another view&#039;s field - this is what is referred to as &amp;quot;nested attribute&amp;quot;. In this case, the field in question should also be marked as &amp;quot;Private&amp;quot;, indicating that the nested view is defined in a scope internal to the view in which it is nested.&lt;br /&gt;
[[File:View Switch Selection.png|left|thumb|481x481px|Selection of an enumeration-based view attribute as a union discriminant.]]&lt;br /&gt;
Second: to become a union, a view must have at least one [[View Attribute|attribute]] or field that references an [[Enumerations|enumeration]] as its platform type. In a FACE model, this enumerated field will be selected by the query related to the union template to serve as the discriminant over which the union is switched. In Phenom, when a user toggles a view to be a union, a drop-down appears next to the switch allowing the selection of the discriminant. This drop-down lists all of the current view&#039;s attributes the Platform Type property of which references a platform enumeration element.&lt;br /&gt;
[[File:Union Projection Uniformity.png|left|thumb|480x480px|The projected characteristic uniformity among view attributes required of union types.]]&lt;br /&gt;
Third: to be eligible for conversion to a union, all of the projections in the view must project the same element. In a FACE model, this is the same rule that applies to all non-composite templates. In Phenom, this requirement can be satisfied by ensuring that the first element of each attribute&#039;s projection path is the same for the selected view.&lt;/div&gt;</summary>
		<author><name>Dmitry</name></author>
	</entry>
	<entry>
		<id>https://kb.phenomportal.com/index.php?title=File:Union_Projection_Uniformity.png&amp;diff=1051</id>
		<title>File:Union Projection Uniformity.png</title>
		<link rel="alternate" type="text/html" href="https://kb.phenomportal.com/index.php?title=File:Union_Projection_Uniformity.png&amp;diff=1051"/>
		<updated>2024-02-06T12:02:47Z</updated>

		<summary type="html">&lt;p&gt;Dmitry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The required projected characteristic uniformity in a union view.&lt;/div&gt;</summary>
		<author><name>Dmitry</name></author>
	</entry>
	<entry>
		<id>https://kb.phenomportal.com/index.php?title=File:Private_Union_Nesting.png&amp;diff=1050</id>
		<title>File:Private Union Nesting.png</title>
		<link rel="alternate" type="text/html" href="https://kb.phenomportal.com/index.php?title=File:Private_Union_Nesting.png&amp;diff=1050"/>
		<updated>2024-02-06T12:02:19Z</updated>

		<summary type="html">&lt;p&gt;Dmitry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The required nesting of a union view in another view.&lt;/div&gt;</summary>
		<author><name>Dmitry</name></author>
	</entry>
	<entry>
		<id>https://kb.phenomportal.com/index.php?title=File:View_Switch_Selection.png&amp;diff=1049</id>
		<title>File:View Switch Selection.png</title>
		<link rel="alternate" type="text/html" href="https://kb.phenomportal.com/index.php?title=File:View_Switch_Selection.png&amp;diff=1049"/>
		<updated>2024-02-06T12:01:48Z</updated>

		<summary type="html">&lt;p&gt;Dmitry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The selection of a view discriminant in Phenom.&lt;/div&gt;</summary>
		<author><name>Dmitry</name></author>
	</entry>
	<entry>
		<id>https://kb.phenomportal.com/index.php?title=File:View_Page_Union_Toggle.png&amp;diff=1048</id>
		<title>File:View Page Union Toggle.png</title>
		<link rel="alternate" type="text/html" href="https://kb.phenomportal.com/index.php?title=File:View_Page_Union_Toggle.png&amp;diff=1048"/>
		<updated>2024-02-06T11:42:39Z</updated>

		<summary type="html">&lt;p&gt;Dmitry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Location of the toggle which changes a view to a union.&lt;/div&gt;</summary>
		<author><name>Dmitry</name></author>
	</entry>
	<entry>
		<id>https://kb.phenomportal.com/index.php?title=File:Union_Type_Toggle.png&amp;diff=1047</id>
		<title>File:Union Type Toggle.png</title>
		<link rel="alternate" type="text/html" href="https://kb.phenomportal.com/index.php?title=File:Union_Type_Toggle.png&amp;diff=1047"/>
		<updated>2024-02-06T11:28:02Z</updated>

		<summary type="html">&lt;p&gt;Dmitry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The toggle switch which allows changing a view element to a union.&lt;/div&gt;</summary>
		<author><name>Dmitry</name></author>
	</entry>
</feed>