<?xml version="1.0" encoding="utf-8"?>
<Application>
	<AppTitle>BGUK Create Table</AppTitle>
	<Author>Gaev Keeka</Author>
	<DesignDeviceName>Desktop</DesignDeviceName>
	<VariablesScanned>False</VariablesScanned>
	<PageWidth>800</PageWidth>
	<PageHeight>600</PageHeight>
	<AutoSizeWidth>False</AutoSizeWidth>
	<AutoSizeHeight>False</AutoSizeHeight>
	<HideScrollbars>False</HideScrollbars>
	<PublishPlatform>WebApp</PublishPlatform>
	<EmptyBuildFolder>False</EmptyBuildFolder>
	<LanguageCode>en</LanguageCode>
	<MobileOSTypes>[AndroidOS,iOS,WindowsPhoneOS]</MobileOSTypes>
	<WindowState>normal</WindowState>
	<TitleBar>True</TitleBar>
	<Sizeable>True</Sizeable>
	<MaximizeBtn>False</MaximizeBtn>
	<MinimizeBtn>True</MinimizeBtn>
	<SystemMenu>True</SystemMenu>
	<ContextMenu>False</ContextMenu>
	<AlwaysOnTop>False</AlwaysOnTop>
	<ShowInTaskbar>True</ShowInTaskbar>
	<SingleInstance>False</SingleInstance>
	<ChromeKioskMode>False</ChromeKioskMode>
	<startup>TopCenterApp</startup>
	<Components>
		<FunctionList name="Subroutines"/>
		<LibraryList name="Libraries"/>
		<PageList name="Main">
			<Components>
				<Page id="Page1">
					<Components>
						<Container id="Page1Container">
							<left>22px</left>
							<top>25px</top>
							<width>750px</width>
							<height>431px</height>
							<style>border-width:1px;border-style:solid;background-color:#fff;</style>
							<html>[loadedJSON]</html>
						</Container>
						<PushButton id="Page1LoadJSON">
							<left>22px</left>
							<top>468px</top>
							<width>153px</width>
							<height>35px</height>
							<caption>Load JSON</caption>
							<click>LoadJSON &quot;https://www.dovesoft.uk/visualneo/multirecord.json&quot; [loadedJSON]
</click>
						</PushButton>
						<PushButton id="GoToPage2">
							<left>622px</left>
							<top>466px</top>
							<width>149px</width>
							<height>40px</height>
							<caption>Go to Page2</caption>
							<click>GotoPage &quot;Page2&quot;</click>
						</PushButton>
					</Components>
				</Page>
				<Page id="Page2">
					<Components>
						<TextArea id="TextArea">
							<left>23px</left>
							<top>20px</top>
							<width>751px</width>
							<height>441px</height>
							<variable>[loadedJSON]</variable>
							<init_value>paste array here</init_value>
						</TextArea>
						<PushButton id="RemoveArrayWrapperCharacters">
							<left>30px</left>
							<top>471px</top>
							<width>241px</width>
							<height>35px</height>
							<caption>Remove Array Wrapper Characters</caption>
							<click>... remove [ and ] ; visualNEOWeb has bug, so do it with javascript
BeginJS
       var sourceString = $App.loadedJSON;
       var mydataString = sourceString.replace(&quot;[&quot;, &quot;&quot;);
       var mydataString = mydataString.replace(&quot;]&quot;, &quot;&quot;);
       $App.loadedJSON = mydataString;
EndJS
...AlertBox &quot;loadedJSON&quot; &quot;[loadedJSON]&quot; &quot;&quot;</click>
						</PushButton>
						<PushButton id="ShowJSONStrings">
							<left>278px</left>
							<top>472px</top>
							<width>144px</width>
							<height>36px</height>
							<caption>Show JSON Strings</caption>
							<click>... convert strings of data within { and } to an array
StrParse &quot;[loadedJSON]&quot; &quot;, &quot; [loadedStringArray]
... how many arrayitems ?
ArrayLen [loadedStringArray] [loadedStringArrayLen]
...AlertBox &quot;Array Length&quot; &quot;[loadedStringArrayLen]&quot; &quot;&quot;
... [lastItem] is length -1 (array item numbers are zero based)
SetVar [lastItem] [loadedStringArrayLen]-1
Loop 0 [lastItem] [thisItem]
     SetVar [thisArrayItemString] &quot;[loadedStringArray([thisItem])]&quot;
     AlertBox &quot;Item String [thisItem]&quot; &quot;[thisArrayItemString]&quot; &quot;&quot;
EndLoop</click>
						</PushButton>
						<PushButton id="GoToPage3">
							<left>621px</left>
							<top>466px</top>
							<width>149px</width>
							<height>40px</height>
							<caption>Go to Page3</caption>
							<click>GotoPage &quot;Page3&quot;</click>
						</PushButton>
					</Components>
				</Page>
				<Page id="Page3">
					<Components>
						<Container id="BasicTableContainer">
							<left>16px</left>
							<top>32px</top>
							<width>762px</width>
							<height>429px</height>
							<style>border-width:1px;border-style:solid;background-color:#fff;</style>
						</Container>
						<PushButton id="CreateTable">
							<left>150px</left>
							<top>469px</top>
							<width>128px</width>
							<height>34px</height>
							<caption>Create Table</caption>
							<click>... Reset any previous column definitions
neoTableResetColumns &quot;BasicTableContainer&quot;
... setup columns; IMPORTANT: column numbers MUST start at 1
neoTableSetColumn &quot;BasicTableContainer&quot; 1 &quot;id&quot; &quot;Id&quot; &quot;&quot; false false false &quot;&quot;
neoTableSetColumn &quot;BasicTableContainer&quot; 2 &quot;fname&quot; &quot;First Name&quot; &quot;&quot; false false false &quot;&quot;
neoTableSetColumn &quot;BasicTableContainer&quot; 3 &quot;lname&quot; &quot;Last Name&quot; &quot;&quot; false false false &quot;&quot;
neoTableSetColumn &quot;BasicTableContainer&quot; 4 &quot;email&quot; &quot;Email Address&quot; &quot;&quot; false false false &quot;&quot;
neoTableSetColumn &quot;BasicTableContainer&quot; 5 &quot;gender&quot; &quot;Gender&quot; &quot;&quot; false false false &quot;&quot;
neoTableSetColumn &quot;BasicTableContainer&quot; 6 &quot;ip_address&quot; &quot;IP Address&quot; &quot;&quot; false false false &quot;&quot;

... define user permissions
neoTableInitTable &quot;BasicTableContainer&quot; &quot;&quot; 0 &quot;Table&quot; false false false false false &quot;&quot;
... load Data
neoTableLoadData &quot;BasicTableContainer&quot; [mydata]</click>
						</PushButton>
						<PushButton id="CreateMydata">
							<left>16px</left>
							<top>470px</top>
							<width>130px</width>
							<height>32px</height>
							<caption>Create mydata</caption>
							<click>CreateEmptyArray [mydata]
Loop 0 [lastItem] [thisItem]
     SetVar [thisArrayItemString] &quot;[loadedStringArray([thisItem])]&quot;
     ...AlertBox &quot;Item String [thisItem]&quot; &quot;[thisArrayItemString]&quot; &quot;&quot;
     ParseJSON &quot;[thisArrayItemString]&quot; [thisArrayItemJSON]
     ArrayAddItem [mydata] [thisArrayItemJSON]
EndLoop
AlertBox &quot;All&quot; &quot;Done&quot; &quot;&quot;</click>
						</PushButton>
					</Components>
				</Page>
			</Components>
		</PageList>
		<PageList name="Master">
			<Components>
				<Page id="MasterPage"/>
			</Components>
		</PageList>
		<PageList name="Dialog">
			<Components>
				<Page id="NewDialog">
					<Components>
						<DialogContainer id="DialogContainer1">
							<left>0px</left>
							<top>0px</top>
							<width>800px</width>
							<height>600px</height>
							<close_button>False</close_button>
						</DialogContainer>
					</Components>
				</Page>
			</Components>
		</PageList>
	</Components>
</Application>
