<?xml version="1.0" encoding="utf-8"?>
<ManualTopic ID="/baanerp/tt/onlinemanual/100105" xml:lang="en">
	<Header>
		<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">To implement dynamic index switching</Title>
		<Keyword ContextSensitive="No"><Level1>dynamic index switching</Level1>
			<Level2>implementation</Level2>
		</Keyword>
	</Header>
	<GeneralSection><Paragraph class="Default">If an overview session's standard command set has the <GUIRef href="" role="command">Sort by</GUIRef> option selected, users can select different indices by which the records in the grid are sorted. The user selects an index from the <GUIRef href="" role="manual">View</GUIRef> menu's <GUIRef href="" role="command">Sort by</GUIRef> submenu. When a user selects a new index, the view fields above an overview session's grid do not change, and the field order in the grid does not change.</Paragraph>
		<Paragraph class="Default">Dynamic index switching allows you to configure session indices, so that when a user selects a new index from the <GUIRef href="" role="command">Sort by</GUIRef> submenu, the view fields above the grid can change, and the field order in the grid can change.</Paragraph>
		<Paragraph class="Default">You can only implement dynamic index switching for sessions whose standard command set includes the <GUIRef href="" role="command">Sort by</GUIRef> option in the <GUIRef href="/baanerp/tt/adv/ttadv3120s000" role="session">Form Option Sets (ttadv3120s000)</GUIRef> session.</Paragraph>
		<ProcedureList><ListIntro>To implement dynamic index switching for an overview session:</ListIntro>
			<ListItem>select the session's dynamic index switching options in the <GUIRef href="/baanerp/tt/adv/ttadv2100s000" role="session">Sessions (ttadv2100s000)</GUIRef> details session.</ListItem>
			<ListItem>specify the session's index and view field settings in the <GUIRef href="/baanerp/tt/adv/ttadv2101s000" role="session">Available Indices by Session (ttadv2101s000)</GUIRef> session.</ListItem>
		</ProcedureList>
		<Paragraph class="Default">Refer to the following sections for details.</Paragraph>
		<GeneralSection><SectionTitle>Select dynamic index switching options</SectionTitle>
			<Paragraph class="Default">You can start the <GUIRef href="/baanerp/tt/adv/ttadv2100s000" role="session">Sessions (ttadv2100s000)</GUIRef> details session via the <GUIRef href="/baanerp/tt/adv/ttadv2500m000" role="session">Sessions (ttadv2500m000)</GUIRef> overview session.</Paragraph>
			<List><ListItem>On the <GUIRef href="ttttadv201.tfrm" role="manual">Form</GUIRef> tab of the details session, in the <GUIRef href="/baanerp/tt/adv/ttadv2100s000#ttadv300.zj_dis" role="manual">Dynamic index switching</GUIRef> box, select either of the following radio buttons: <List><ListItem><GUIRef href="/baanerp/tt/domains/adv.dis#yes" role="option">Restart when view fields differ</GUIRef>. If switching indices results in the view fields above the grid changing, ERP LN Tools restarts the session.</ListItem>
						<ListItem><GUIRef href="/baanerp/tt/domains/adv.dis#restart" role="option">Always restart</GUIRef>. Users can switch indices in the Overview session, which always restarts the session.</ListItem>
					</List>
				</ListItem>
			</List>
			<Paragraph class="Default">You can select the <GUIRef href="/baanerp/tt/adv/ttadv2100s000#ttadv300.zj_shix" role="manual">Show name of index</GUIRef> check box, so that the current index displays in the overview session's title bar.</Paragraph>
			<Note><SectionTitle>
                                    Note
                                 </SectionTitle>
				<List><ListIntro>You can only select the radio buttons if your session is <Link href="/baanerp/tt/glossary/glossary#100200" role="glossary">integrated</Link>. For non-integrated sessions, you must use the predefined "dynamic.index.switching" variable in the before.program section of the session's program script:</ListIntro>
					<ListItem>"dynamic.index.switching = -1" has the same effect as selecting the <GUIRef href="/baanerp/tt/domains/adv.dis#yes" role="option">Restart when view-fields differ</GUIRef> radio button</ListItem>
					<ListItem>"dynamic.index.switching = -2" has the same effect as selecting the <GUIRef href="/baanerp/tt/domains/adv.dis#restart" role="option">Always restart</GUIRef> radio button.</ListItem>
				</List>
			</Note>
		</GeneralSection>
		<GeneralSection><SectionTitle>Specify index and view field settings</SectionTitle>
			<Paragraph class="Default">To start the <GUIRef href="/baanerp/tt/adv/ttadv2101s000" role="session">Available Indices by Session (ttadv2101s000)</GUIRef> session, click <GUIRef href="" role="manual">Indices</GUIRef> on the <GUIRef href="" role="manual">Specific</GUIRef> menu in the <GUIRef href="/baanerp/tt/adv/ttadv2500m000" role="session">Sessions (ttadv2500m000)</GUIRef> session.</Paragraph>
			<List><ListItem>Select the check boxes of the session's indices for which you want to implement dynamic index switching.</ListItem>
				<ListItem><List><ListIntro>For every index whose check box you select:</ListIntro>
						<ListItem>in the field of the <GUIRef href="/baanerp/tt/adv/ttadv2101s000#ttadv200.indx" role="manual">Sort</GUIRef> column, enter the order the indices display on the session's <GUIRef href="ttttaad200.sort" role="manual">Sort by</GUIRef> submenu. The index with the value 1 (one) will be the session's default index.</ListItem>
						<ListItem>in the field of the <GUIRef href="/baanerp/tt/adv/ttadv2101s000#ttadv200.zd_indv" role="manual">View</GUIRef> column, enter the number of the index's parts (in ascending order) to be displayed as view fields above the overview session's grid. The remaining values of the <GUIRef href="ttttadv421.parts" role="manual">Index Parts</GUIRef> box make up the first columns of the overview session's grid.</ListItem>
					</List>
				</ListItem>
			</List>
			<Paragraph class="Default">The index part values are listed in the <GUIRef href="ttttadv421.parts" role="manual">Index Parts</GUIRef> box of the <GUIRef href="/baanerp/tt/adv/ttadv4121s000" role="session">Table Indices (ttadv4121s000)</GUIRef> details session. To start this session, double-click your session's table in the <GUIRef href="/baanerp/tt/adv/ttadv4520m000" role="session">Table Definitions (ttadv4520m000)</GUIRef> session, and subsequently select the <GUIRef href="" role="manual">Indices</GUIRef> tab. Double-click an index to view the index's parts.</Paragraph>
			<ExampleSection><SectionTitle>
                                    Example
                                 </SectionTitle>
				<List><ListIntro>An index consists of the following index parts:</ListIntro>
					<ListItem>item (item code)</ListItem>
					<ListItem>wght (weight)</ListItem>
					<ListItem>hght (height)</ListItem>
					<ListItem>lnth (length)</ListItem>
					<ListItem>wdth (width)</ListItem>
				</List>
				<Paragraph class="Default">If you select 2 in the index's <GUIRef href="/baanerp/tt/adv/ttadv2101s000#ttadv200.zd_indv" role="manual">View</GUIRef> field, in the <GUIRef href="/baanerp/tt/adv/ttadv2101s000" role="session">Available Indices by Session (ttadv2101s000)</GUIRef> session, the item code, and weight fields display as view fields above the grid. Height, length, and width make up the first columns of the grid.</Paragraph>
			</ExampleSection>
			<Note><SectionTitle>
                                    Note
                                 </SectionTitle>
				<Paragraph class="Default">If a field has the <GUIRef href="" role="manual">View</GUIRef> check box on the <GUIRef href="" role="manual">Properties</GUIRef> tab of the Dynamic Form Editor 's <GUIRef href="" role="manual">Field Properties</GUIRef> dialog box selected, the field is always shown as a view field in the overview session regardless of your Dynamic Index Switching settings. If you want a field to be excluded as a view field for certain indices, you must clear the <GUIRef href="" role="manual">View</GUIRef> check box for that field on the <GUIRef href="" role="manual">Properties</GUIRef> tab of the Dynamic Form Editor 's <GUIRef href="" role="manual">Fields Properties</GUIRef> dialog box.</Paragraph>
			</Note>
		</GeneralSection>
	</GeneralSection>
</ManualTopic>
