<Form_Modal
Text="Test1"
ControlVSpacing="3"
Name="Test1"
Size="850,650"
IconPath="[gApplicationIcon]"
Pos="C">
<var name="TableName" value="AC_Animals" />
<var name="EditFields_Height" value="160" />
<var name="EditFields">
<Header Top="+5" Name="Header_General" Caption=" General Information" LineColor="#12527C"/>
<var name="PKEY" />
<textbox>
Name="Animal_Name"
Caption="Animals Name"
TabStop="True"
CaptionWidth="100"
Style="[style_EditFields]"/>
<textbox>
Name="Animal_Code"
Caption="Animals Code"
TabStop="True"
CaptionWidth="100"
Style="[style_EditFields]"/>
<textbox>
Name="Animal_Age"
Caption="Animals Age"
TabStop="True"
CaptionWidth="100"
Style="[style_EditFields]"/>
<popup>
NAME="Animal_CountryID"
CAPTION="Country"
Nullable="True"
TabStop="True"
QuickLookup_YN="True"
QuickLookupBackColor="Yellow"
CaptionWidth="100"
Style="[style_EditFields]"/>
</popup></textbox></textbox></textbox></var>
<var name="EditFields_In">
PKEY:Animals_ID
Animal_Name:Animals_Name
Animal_Code:Animals_Code
Animal_Age:Animals_Age
Animal_CountryID:Animals_CountryID
Animal_CountryID.TextDisplay:country_Description
</var>
<var name="EditFields_Out" value="[Me['EditFields_In']]" />
<var name="FilterFields_Height" value="30" />
<var name="FilterFields">
<textbox>
DelayTextChange="[Search_Delay]"
Name="simpleFilter"
Top="+6"
TabStop="False"
Style="[style_EditFields]"
Caption="Search"/>
</textbox></var>
<var name="FilterFields_Out" value="PKEY:PKEY,simpleFilter:simpleFilter" />
<var name="simpleFilter_TextChanged">
Me['PKEY']= ""
GOS.Parse(Me['FillList'])
</var>
<var name="ListBox">
<listbox columnheadings=",Name,Code,Age,Country" columnjustifications="L,L,L,L,L" columnwidths="0,40,20,10,30" style="[Style_StandardListBox]" />
</var>
<var name="Animal_CountryID_PopupClicked">
G = Me['Animal_CountryID'].Text
gLastPressed = Me['Animal_CountryID'].LastPressed
RunQ('POPUP_Countries')
if not GOS.General.isObjectEmpty(G) == True :
Me['Animal_CountryID'].Text = G
Me['Animal_CountryID'].TextDisplay = SQL.GetValue("Select dbo.fn_v_Get_Countries_Description(" + G + ")")
</var>
<var name="Animal_CountryID_QuickLookup">
Me['LookupText']=Me['Animal_CountryID'].QuickLookupText
if Me['LookupText'] !="" :
Me["LookupP"]=""
Me["LookupP"]=GOS.General.SetXMLValue(Me["LookupP"],"NRows2Return","1")
Me["LookupP"]=GOS.General.SetXMLValue(Me["LookupP"],"simpleFilter",Me['LookupText'])
Me["RetValues"]=SQL.Execute("exec dbo.pr_List_Countries" + GOS.General.SQ(Me["LookupP"]))
Me["LookupID"]=GOS.General.GetXMLValue(Me["RetValues"],"COUNTRY_ID")
if Me["LookupID"] != "":
Me['Animal_CountryID'].Text=Me["LookupID"]
Me['Animal_CountryID'].TextDisplay =GOS.General.GetXMLValue(SQL.Execute("Select dbo.fn_v_Get_Countries_Description("+ Me["LookupID"]+")N"),"N")
Me['Animal_CountryID'].QuickLookupOK = True
else:
Me['Animal_CountryID'].QuickLookupOK = False
</var>
<var name="CustomProcedures">
GOS.SetObjectEvent(Me['Simplefilter'],"Textchanged",Me['SimpleFilter_TextChanged'])
GOS.SetObjectEvent(Me['Animal_CountryID'],"PopupClicked",Me['Animal_CountryID_PopupClicked'])
GOS.SetObjectEvent(Me['Animal_CountryID'],"QuickLookup",Me['Animal_CountryID_QuickLookup'])
</var>
<panel dock="Fill">
[gDataEntryForm_Layout]
</panel>
<panel>
[gDataEntryForm_Logic]
</panel>
</Form_Modal>
[edit]Code block added - OriginalGriff[/edit]