Resuable Part for Generic iOS screens - UPDATED (RDMLX)
Posted: Tue Jul 03, 2012 9:41 am
I have created a Resuable Part alongside Mark D's RPG program to get a generic look and feel. This is now the new version of the file, with changes that I have made based on experience.
Please have a play and please add to it if you can
To use, download code and create it as a resuable part with name say IOSLOOK.
Download from here, Then put in your LongRange Resuable Part, via Define_Com Class(#IOSLOOK) Name(#IOS)
The code for the screen shot above is as follows,
* **************************************************
*
* COMPONENT: STD_PANL
*
* **************************************************
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #LRNG_FORM)
* Includes
Define_Com Class(#IOSLOOKV2) Name(#IOS2)
Define_Com Class(#prim_nmbr) Name(#pageSize) Value(20)
Define_Com Class(#prim_nmbr) Name(#endPage)
Define_Com Class(#PRIM_NMBR) Name(#W$LORD)
* Work Objects
Define_Com Class(#PRIM_ALPH) Name(#actionValue)
Define_Com Class(#PRIM_ALPH) Name(#W$CSTV)
Define Field(#retcode) Type(*char) Length(2)
* Group_bys
Group_By Name(#custData) Fields(#LTCCUSTNM #LTCCUSTEM #LTCCUSTB1 #LTCCUSTB2 #LTCCUSTBC #LTCCUSTBS #LTCCUSTBZ #LTCCUSTS1 #LTCCUSTS2 #LTCCUSTSC #LTCCUSTSS #LTCCUSTSZ #LTCCUSTPC #LTCCUSTPP #LTCCUSTPR #LTCCUSTPA #LTCCUSTCL #LTCCUSTCB #LTCDISCCD #LTCCUSTG #LTCCUSTWS)
* Form Names
Define_Com Class(#PRIM_ALPH) Name(#top)
Define_Com Class(#PRIM_ALPH) Name(#content)
Define_Com Class(#PRIM_ALPH) Name(#basicbox)
Define_Com Class(#PRIM_ALPH) Name(#billtobox)
Define_Com Class(#PRIM_ALPH) Name(#shiptobox)
Define_Com Class(#PRIM_ALPH) Name(#commsbox)
* ===============================================================
* LTCLRSD00 - Mainline
* ===============================================================
Mthroutine Name(HandleRequest) Options(*REDEFINE)
* -----------------------------------------
* Handle currently requested action (if any)
* -----------------------------------------
* Always set the USING Element to /Form.Fields at the start
#Com_Owner.Using Element('/Form.Fields')
* And Get the Current Top and Content
#COM_OWNER.Get_SharedState Variablename(currentTop) Value(#top)
#COM_OWNER.Get_SharedState Variablename(currentContent) Value(#content)
* Values
#Com_Owner.Get_SharedState Variablename('currentCustomer') Value(#W$CSTV)
If (#COM_OWNER.RequestACTION.Contains( '_' ))
#actionValue := (#COM_OWNER.RequestACTION).Substring( 1 ((#COM_OWNER.RequestACTION).PositionOf( '_' ) - 1) )
Else
#actionValue := #COM_OWNER.RequestACTION
Endif
Case Of_Field(#actionValue)
When Value_Is(= actionCustomer)
#COM_Owner.SwitchRequestPROGRAM := 'LTCLRSD01'
#COM_Owner.SwitchRequestACTION := 'DEFAULT'
When Value_Is(= actionOrders)
#COM_Owner.SwitchRequestPROGRAM := 'LTCLRSD02'
#COM_Owner.SwitchRequestACTION := 'DEFAULT'
When Value_Is(= actionSave)
#COM_OWNER.IsNewForm := false
#com_owner.handleSave
When Value_Is(= actionMapCustomer)
* Do the switch
#COM_Owner.SwitchRequestPROGRAM := 'LTCLTSD05'
#COM_Owner.SwitchRequestACTION := 'DEFAULT'
Otherwise /* Default */
#COM_OWNER.IsNewForm := true
#COM_OWNER.showDetails()
Endcase
* Always Set Current Top and Content
#COM_OWNER.Set_SharedState Variablename(currentTop) Value(#top)
#COM_OWNER.Set_SharedState Variablename(currentContent) Value(#content)
* Values
#Com_Owner.Set_SharedState Variablename('currentCustomer') Value(#W$CSTV)
Endroutine
Mthroutine Name(showDetails)
Fetch Fields(#custData) From_File(LTCCUST) With_Key(#W$CSTV)
* Init FormView
#IOS2.initFormView Formview(#COM_OWNER) Maintitle(#LTCCUSTNM + ' Details') Topbarheight(40) Topbarfullname(#top) Contentfullname(#content)
* Set Nav Buttons
#com_owner.set_button Layout_Col(1) Layout_Row(1) Name(#top + '.fields.topButton1') Text('Change Customer') Border_Cornerradius(0) Color('&4f5458') Layout_Height(30) Layout_Width(200) Buttonfacecolor('&f5f5f5') Onclick(actionCustomer)
#com_owner.set_button Layout_Col(2) Layout_Row(1) Name(#top + '.fields.topButton2') Text('Customer Orders') Border_Cornerradius(0) Color('&4f5458') Layout_Height(30) Layout_Width(200) Buttonfacecolor('&f5f5f5') Onclick(actionOrders)
#com_owner.set_button Layout_Col(3) Layout_Row(1) Name(#top + '.fields.topButton3') Text('Map Customer') Border_Cornerradius(0) Color('&4f5458') Layout_Height(30) Layout_Width(200) Buttonfacecolor('&f5f5f5') Onclick(actionMapCustomer)
*
#IOS2.initSubForm Formview(#COM_OWNER) Subform(#content)
* Setup Groupboxs on Content Form
#COM_OWNER.Set_Label Name(#content + '.fields.space1') Layout_Row(1) Layout_Col(2) Layout_Height(25)
#COM_OWNER.Set_Label Name(#content + '.fields.instruction1') Layout_Row(2) Layout_Col(2) Text('Basic Details') Font_Size(18) Color('&4A566C') Font_Bold(true) Padding(5)
#IOS2.createGroupBox Formview(#COM_OWNER) Parent(#content) Name(basicBox) Boxfullname(#basicbox) Layoutrow(3)
#COM_OWNER.Set_Label Name(#content + '.fields.space2') Layout_Row(4) Layout_Col(2) Layout_Height(25)
#COM_OWNER.Set_Label Name(#content + '.fields.instruction2') Layout_Row(5) Layout_Col(2) Text('Billing Address') Font_Size(18) Color('&4A566C') Font_Bold(true) Padding(5)
#IOS2.createGroupBox Formview(#COM_OWNER) Parent(#content) Name(billtoBox) Boxfullname(#billtobox) Layoutrow(6)
#COM_OWNER.Set_Label Name(#content + '.fields.space3') Layout_Row(7) Layout_Col(2) Layout_Height(25)
#COM_OWNER.Set_Label Name(#content + '.fields.instruction3') Layout_Row(8) Layout_Col(2) Text('Shipping Address') Font_Size(18) Color('&4A566C') Font_Bold(true) Padding(5)
#IOS2.createGroupBox Formview(#COM_OWNER) Parent(#content) Name(shiptoBox) Boxfullname(#shiptobox) Layoutrow(9)
#COM_OWNER.Set_Label Name(#content + '.fields.space4') Layout_Row(10) Layout_Col(2) Layout_Height(25)
#COM_OWNER.Set_Label Name(#content + '.fields.instruction4') Layout_Row(11) Layout_Col(2) Text('Contact Information') Font_Size(18) Color('&4A566C') Font_Bold(true) Padding(5)
#IOS2.createGroupBox Formview(#COM_OWNER) Parent(#content) Name(commsBox) Boxfullname(#commsbox) Layoutrow(12)
* Add Elements to Basic
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(username) Groupbox(#basicbox) Elementtype(Textbox) Labeltext('Name') Placeholder('Customer Name') Layoutrow(1) Value(#ltccustnm)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#basicbox) Elementtype(divider) Layoutrow(2)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(creditlimit) Groupbox(#basicbox) Elementtype(Textbox) Labeltext('Credit Limit') Placeholder('0.00') Layoutrow(3) Value(#ltccustcl.asstring)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#basicbox) Elementtype(divider) Layoutrow(4)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(discount) Groupbox(#basicbox) Elementtype(Textbox) Labeltext('Discount Level') Placeholder('00%') Layoutrow(5) Value(#ltcdisccd)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#basicbox) Elementtype(divider) Layoutrow(6)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(website) Groupbox(#basicbox) Elementtype(Textbox) Labeltext('Website') Placeholder('http://www.company.com.au') Layoutrow(7) Value(#ltccustws)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#basicbox) Elementtype(divider) Layoutrow(8)
* Add Elements to BillTo
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(address1) Groupbox(#billtobox) Elementtype(Textbox) Labeltext('Address') Placeholder('Customer Billing Address') Layoutrow(1) Value(#ltccustb1)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#billtobox) Elementtype(divider) Layoutrow(2)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(address2) Groupbox(#billtobox) Elementtype(Textbox) Labeltext('') Placeholder('Customer Billing Address') Layoutrow(3) Value(#ltccustb2)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#billtobox) Elementtype(divider) Layoutrow(4)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(city) Groupbox(#billtobox) Elementtype(Textbox) Labeltext('Billing City') Placeholder('Billing City') Layoutrow(5) Value(#ltccustbc)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#billtobox) Elementtype(divider) Layoutrow(6)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(state) Groupbox(#billtobox) Elementtype(Textbox) Labeltext('State') Placeholder('Billing State') Layoutrow(7) Value(#ltccustbs)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#billtobox) Elementtype(divider) Layoutrow(8)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(postcode) Groupbox(#billtobox) Elementtype(Textbox) Labeltext('Postal Code') Placeholder('Billing Postal Code') Layoutrow(9) Value(#ltccustbz)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#billtobox) Elementtype(divider) Layoutrow(10)
* Add Elements to ShipTo
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(address1) Groupbox(#shiptobox) Elementtype(Textbox) Labeltext('Address') Placeholder('Customer Shipping Address') Layoutrow(1) Value(#ltccusts1)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#shiptobox) Elementtype(divider) Layoutrow(2)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(address2) Groupbox(#shiptobox) Elementtype(Textbox) Labeltext('') Placeholder('Customer Shipping Address') Layoutrow(3) Value(#ltccusts2)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#shiptobox) Elementtype(divider) Layoutrow(4)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(city) Groupbox(#shiptobox) Elementtype(Textbox) Labeltext('Billing City') Placeholder('Shipping City') Layoutrow(5) Value(#ltccustsc)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#shiptobox) Elementtype(divider) Layoutrow(6)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(state) Groupbox(#shiptobox) Elementtype(Textbox) Labeltext('State') Placeholder('Shipping State') Layoutrow(7) Value(#ltccustss)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#shiptobox) Elementtype(divider) Layoutrow(8)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(postcode) Groupbox(#shiptobox) Elementtype(Textbox) Labeltext('Postal Code') Placeholder('Shipping Postal Code') Layoutrow(9) Value(#ltccustsz)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#shiptobox) Elementtype(divider) Layoutrow(10)
* Add Elements to Comms
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(service) Groupbox(#commsbox) Elementtype(Textbox) Labeltext('Customer Service') Placeholder('+61 2 9999 9999') Layoutrow(1) Value(#ltccustpc)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#commsbox) Elementtype(divider) Layoutrow(2)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(purchasing) Groupbox(#commsbox) Elementtype(Textbox) Labeltext('Purchasing') Placeholder('+61 2 9999 9999') Layoutrow(3) Value(#ltccustpp)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#commsbox) Elementtype(divider) Layoutrow(4)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(ar) Groupbox(#commsbox) Elementtype(Textbox) Labeltext('Recievable') Placeholder('+61 2 9999 9999') Layoutrow(5) Value(#ltccustpr)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#commsbox) Elementtype(divider) Layoutrow(6)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(ap) Groupbox(#commsbox) Elementtype(Textbox) Labeltext('Payable') Placeholder('+61 2 9999 9999') Layoutrow(7) Value(#ltccustpa)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#commsbox) Elementtype(divider) Layoutrow(8)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(email) Groupbox(#commsbox) Elementtype(Textbox) Labeltext('Email') Placeholder('[email protected]') Layoutrow(9) Value(#ltccustem)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#commsbox) Elementtype(divider) Layoutrow(10)
* Button under Group
#IOS2.createButton Formview(#COM_OWNER) Parent(#content) Name(signinButton) Layoutrow(14) Text('Save') Color('black') Layoutheight(50) Onclickaction(actionSave)
Endroutine
Mthroutine Name(handleSave)
Define_Com Class(#prim_alph) Name(#ltccustcla)
* Get Values
#IOS2.getElementValue Namedpath('content,basicbox,username') Formview(#COM_OWNER) Value(#ltccustnm)
#IOS2.getElementValue Namedpath('content,basicbox,creditlimit') Formview(#COM_OWNER) Value(#ltccustcla)
#ltccustcl := #ltccustcla.asnumber
#IOS2.getElementValue Namedpath('content,basicbox,discount') Formview(#COM_OWNER) Value(#LTCDISCCD)
#IOS2.getElementValue Namedpath('content,basicbox,website') Formview(#COM_OWNER) Value(#ltccustws)
#IOS2.getElementValue Namedpath('content,billtobox,address1') Formview(#COM_OWNER) Value(#ltccustb1)
#IOS2.getElementValue Namedpath('content,billtobox,address2') Formview(#COM_OWNER) Value(#ltccustb2)
#IOS2.getElementValue Namedpath('content,billtobox,city') Formview(#COM_OWNER) Value(#ltccustbc)
#IOS2.getElementValue Namedpath('content,billtobox,state') Formview(#COM_OWNER) Value(#ltccustbs)
#IOS2.getElementValue Namedpath('content,billtobox,postcode') Formview(#COM_OWNER) Value(#ltccustbz)
#IOS2.getElementValue Namedpath('content,shiptobox,address1') Formview(#COM_OWNER) Value(#ltccusts1)
#IOS2.getElementValue Namedpath('content,shiptobox,address2') Formview(#COM_OWNER) Value(#ltccusts2)
#IOS2.getElementValue Namedpath('content,shiptobox,city') Formview(#COM_OWNER) Value(#ltccustsc)
#IOS2.getElementValue Namedpath('content,shiptobox,state') Formview(#COM_OWNER) Value(#ltccustss)
#IOS2.getElementValue Namedpath('content,shiptobox,postcode') Formview(#COM_OWNER) Value(#ltccustsz)
#IOS2.getElementValue Namedpath('content,commsbox,service') Formview(#COM_OWNER) Value(#ltccustpc)
#IOS2.getElementValue Namedpath('content,commsbox,purchasing') Formview(#COM_OWNER) Value(#ltccustpp)
#IOS2.getElementValue Namedpath('content,commsbox,ar') Formview(#COM_OWNER) Value(#ltccustpr)
#IOS2.getElementValue Namedpath('content,commsbox,ap') Formview(#COM_OWNER) Value(#ltccustpa)
#IOS2.getElementValue Namedpath('content,commsbox,email') Formview(#COM_OWNER) Value(#ltccustem)
* Update File
Update Fields(#custData) In_File(ltccust) With_Key(#W$CSTV) Io_Error(*NEXT) Val_Error(*NEXT)
Endroutine
End_Com
Please have a play and please add to it if you can
To use, download code and create it as a resuable part with name say IOSLOOK.
Download from here, Then put in your LongRange Resuable Part, via Define_Com Class(#IOSLOOK) Name(#IOS)
The code for the screen shot above is as follows,
* **************************************************
*
* COMPONENT: STD_PANL
*
* **************************************************
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #LRNG_FORM)
* Includes
Define_Com Class(#IOSLOOKV2) Name(#IOS2)
Define_Com Class(#prim_nmbr) Name(#pageSize) Value(20)
Define_Com Class(#prim_nmbr) Name(#endPage)
Define_Com Class(#PRIM_NMBR) Name(#W$LORD)
* Work Objects
Define_Com Class(#PRIM_ALPH) Name(#actionValue)
Define_Com Class(#PRIM_ALPH) Name(#W$CSTV)
Define Field(#retcode) Type(*char) Length(2)
* Group_bys
Group_By Name(#custData) Fields(#LTCCUSTNM #LTCCUSTEM #LTCCUSTB1 #LTCCUSTB2 #LTCCUSTBC #LTCCUSTBS #LTCCUSTBZ #LTCCUSTS1 #LTCCUSTS2 #LTCCUSTSC #LTCCUSTSS #LTCCUSTSZ #LTCCUSTPC #LTCCUSTPP #LTCCUSTPR #LTCCUSTPA #LTCCUSTCL #LTCCUSTCB #LTCDISCCD #LTCCUSTG #LTCCUSTWS)
* Form Names
Define_Com Class(#PRIM_ALPH) Name(#top)
Define_Com Class(#PRIM_ALPH) Name(#content)
Define_Com Class(#PRIM_ALPH) Name(#basicbox)
Define_Com Class(#PRIM_ALPH) Name(#billtobox)
Define_Com Class(#PRIM_ALPH) Name(#shiptobox)
Define_Com Class(#PRIM_ALPH) Name(#commsbox)
* ===============================================================
* LTCLRSD00 - Mainline
* ===============================================================
Mthroutine Name(HandleRequest) Options(*REDEFINE)
* -----------------------------------------
* Handle currently requested action (if any)
* -----------------------------------------
* Always set the USING Element to /Form.Fields at the start
#Com_Owner.Using Element('/Form.Fields')
* And Get the Current Top and Content
#COM_OWNER.Get_SharedState Variablename(currentTop) Value(#top)
#COM_OWNER.Get_SharedState Variablename(currentContent) Value(#content)
* Values
#Com_Owner.Get_SharedState Variablename('currentCustomer') Value(#W$CSTV)
If (#COM_OWNER.RequestACTION.Contains( '_' ))
#actionValue := (#COM_OWNER.RequestACTION).Substring( 1 ((#COM_OWNER.RequestACTION).PositionOf( '_' ) - 1) )
Else
#actionValue := #COM_OWNER.RequestACTION
Endif
Case Of_Field(#actionValue)
When Value_Is(= actionCustomer)
#COM_Owner.SwitchRequestPROGRAM := 'LTCLRSD01'
#COM_Owner.SwitchRequestACTION := 'DEFAULT'
When Value_Is(= actionOrders)
#COM_Owner.SwitchRequestPROGRAM := 'LTCLRSD02'
#COM_Owner.SwitchRequestACTION := 'DEFAULT'
When Value_Is(= actionSave)
#COM_OWNER.IsNewForm := false
#com_owner.handleSave
When Value_Is(= actionMapCustomer)
* Do the switch
#COM_Owner.SwitchRequestPROGRAM := 'LTCLTSD05'
#COM_Owner.SwitchRequestACTION := 'DEFAULT'
Otherwise /* Default */
#COM_OWNER.IsNewForm := true
#COM_OWNER.showDetails()
Endcase
* Always Set Current Top and Content
#COM_OWNER.Set_SharedState Variablename(currentTop) Value(#top)
#COM_OWNER.Set_SharedState Variablename(currentContent) Value(#content)
* Values
#Com_Owner.Set_SharedState Variablename('currentCustomer') Value(#W$CSTV)
Endroutine
Mthroutine Name(showDetails)
Fetch Fields(#custData) From_File(LTCCUST) With_Key(#W$CSTV)
* Init FormView
#IOS2.initFormView Formview(#COM_OWNER) Maintitle(#LTCCUSTNM + ' Details') Topbarheight(40) Topbarfullname(#top) Contentfullname(#content)
* Set Nav Buttons
#com_owner.set_button Layout_Col(1) Layout_Row(1) Name(#top + '.fields.topButton1') Text('Change Customer') Border_Cornerradius(0) Color('&4f5458') Layout_Height(30) Layout_Width(200) Buttonfacecolor('&f5f5f5') Onclick(actionCustomer)
#com_owner.set_button Layout_Col(2) Layout_Row(1) Name(#top + '.fields.topButton2') Text('Customer Orders') Border_Cornerradius(0) Color('&4f5458') Layout_Height(30) Layout_Width(200) Buttonfacecolor('&f5f5f5') Onclick(actionOrders)
#com_owner.set_button Layout_Col(3) Layout_Row(1) Name(#top + '.fields.topButton3') Text('Map Customer') Border_Cornerradius(0) Color('&4f5458') Layout_Height(30) Layout_Width(200) Buttonfacecolor('&f5f5f5') Onclick(actionMapCustomer)
*
#IOS2.initSubForm Formview(#COM_OWNER) Subform(#content)
* Setup Groupboxs on Content Form
#COM_OWNER.Set_Label Name(#content + '.fields.space1') Layout_Row(1) Layout_Col(2) Layout_Height(25)
#COM_OWNER.Set_Label Name(#content + '.fields.instruction1') Layout_Row(2) Layout_Col(2) Text('Basic Details') Font_Size(18) Color('&4A566C') Font_Bold(true) Padding(5)
#IOS2.createGroupBox Formview(#COM_OWNER) Parent(#content) Name(basicBox) Boxfullname(#basicbox) Layoutrow(3)
#COM_OWNER.Set_Label Name(#content + '.fields.space2') Layout_Row(4) Layout_Col(2) Layout_Height(25)
#COM_OWNER.Set_Label Name(#content + '.fields.instruction2') Layout_Row(5) Layout_Col(2) Text('Billing Address') Font_Size(18) Color('&4A566C') Font_Bold(true) Padding(5)
#IOS2.createGroupBox Formview(#COM_OWNER) Parent(#content) Name(billtoBox) Boxfullname(#billtobox) Layoutrow(6)
#COM_OWNER.Set_Label Name(#content + '.fields.space3') Layout_Row(7) Layout_Col(2) Layout_Height(25)
#COM_OWNER.Set_Label Name(#content + '.fields.instruction3') Layout_Row(8) Layout_Col(2) Text('Shipping Address') Font_Size(18) Color('&4A566C') Font_Bold(true) Padding(5)
#IOS2.createGroupBox Formview(#COM_OWNER) Parent(#content) Name(shiptoBox) Boxfullname(#shiptobox) Layoutrow(9)
#COM_OWNER.Set_Label Name(#content + '.fields.space4') Layout_Row(10) Layout_Col(2) Layout_Height(25)
#COM_OWNER.Set_Label Name(#content + '.fields.instruction4') Layout_Row(11) Layout_Col(2) Text('Contact Information') Font_Size(18) Color('&4A566C') Font_Bold(true) Padding(5)
#IOS2.createGroupBox Formview(#COM_OWNER) Parent(#content) Name(commsBox) Boxfullname(#commsbox) Layoutrow(12)
* Add Elements to Basic
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(username) Groupbox(#basicbox) Elementtype(Textbox) Labeltext('Name') Placeholder('Customer Name') Layoutrow(1) Value(#ltccustnm)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#basicbox) Elementtype(divider) Layoutrow(2)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(creditlimit) Groupbox(#basicbox) Elementtype(Textbox) Labeltext('Credit Limit') Placeholder('0.00') Layoutrow(3) Value(#ltccustcl.asstring)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#basicbox) Elementtype(divider) Layoutrow(4)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(discount) Groupbox(#basicbox) Elementtype(Textbox) Labeltext('Discount Level') Placeholder('00%') Layoutrow(5) Value(#ltcdisccd)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#basicbox) Elementtype(divider) Layoutrow(6)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(website) Groupbox(#basicbox) Elementtype(Textbox) Labeltext('Website') Placeholder('http://www.company.com.au') Layoutrow(7) Value(#ltccustws)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#basicbox) Elementtype(divider) Layoutrow(8)
* Add Elements to BillTo
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(address1) Groupbox(#billtobox) Elementtype(Textbox) Labeltext('Address') Placeholder('Customer Billing Address') Layoutrow(1) Value(#ltccustb1)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#billtobox) Elementtype(divider) Layoutrow(2)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(address2) Groupbox(#billtobox) Elementtype(Textbox) Labeltext('') Placeholder('Customer Billing Address') Layoutrow(3) Value(#ltccustb2)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#billtobox) Elementtype(divider) Layoutrow(4)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(city) Groupbox(#billtobox) Elementtype(Textbox) Labeltext('Billing City') Placeholder('Billing City') Layoutrow(5) Value(#ltccustbc)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#billtobox) Elementtype(divider) Layoutrow(6)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(state) Groupbox(#billtobox) Elementtype(Textbox) Labeltext('State') Placeholder('Billing State') Layoutrow(7) Value(#ltccustbs)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#billtobox) Elementtype(divider) Layoutrow(8)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(postcode) Groupbox(#billtobox) Elementtype(Textbox) Labeltext('Postal Code') Placeholder('Billing Postal Code') Layoutrow(9) Value(#ltccustbz)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#billtobox) Elementtype(divider) Layoutrow(10)
* Add Elements to ShipTo
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(address1) Groupbox(#shiptobox) Elementtype(Textbox) Labeltext('Address') Placeholder('Customer Shipping Address') Layoutrow(1) Value(#ltccusts1)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#shiptobox) Elementtype(divider) Layoutrow(2)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(address2) Groupbox(#shiptobox) Elementtype(Textbox) Labeltext('') Placeholder('Customer Shipping Address') Layoutrow(3) Value(#ltccusts2)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#shiptobox) Elementtype(divider) Layoutrow(4)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(city) Groupbox(#shiptobox) Elementtype(Textbox) Labeltext('Billing City') Placeholder('Shipping City') Layoutrow(5) Value(#ltccustsc)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#shiptobox) Elementtype(divider) Layoutrow(6)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(state) Groupbox(#shiptobox) Elementtype(Textbox) Labeltext('State') Placeholder('Shipping State') Layoutrow(7) Value(#ltccustss)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#shiptobox) Elementtype(divider) Layoutrow(8)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(postcode) Groupbox(#shiptobox) Elementtype(Textbox) Labeltext('Postal Code') Placeholder('Shipping Postal Code') Layoutrow(9) Value(#ltccustsz)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#shiptobox) Elementtype(divider) Layoutrow(10)
* Add Elements to Comms
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(service) Groupbox(#commsbox) Elementtype(Textbox) Labeltext('Customer Service') Placeholder('+61 2 9999 9999') Layoutrow(1) Value(#ltccustpc)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#commsbox) Elementtype(divider) Layoutrow(2)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(purchasing) Groupbox(#commsbox) Elementtype(Textbox) Labeltext('Purchasing') Placeholder('+61 2 9999 9999') Layoutrow(3) Value(#ltccustpp)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#commsbox) Elementtype(divider) Layoutrow(4)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(ar) Groupbox(#commsbox) Elementtype(Textbox) Labeltext('Recievable') Placeholder('+61 2 9999 9999') Layoutrow(5) Value(#ltccustpr)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#commsbox) Elementtype(divider) Layoutrow(6)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(ap) Groupbox(#commsbox) Elementtype(Textbox) Labeltext('Payable') Placeholder('+61 2 9999 9999') Layoutrow(7) Value(#ltccustpa)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#commsbox) Elementtype(divider) Layoutrow(8)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Name(email) Groupbox(#commsbox) Elementtype(Textbox) Labeltext('Email') Placeholder('[email protected]') Layoutrow(9) Value(#ltccustem)
#IOS2.setGroupBoxRow Formview(#COM_OWNER) Groupbox(#commsbox) Elementtype(divider) Layoutrow(10)
* Button under Group
#IOS2.createButton Formview(#COM_OWNER) Parent(#content) Name(signinButton) Layoutrow(14) Text('Save') Color('black') Layoutheight(50) Onclickaction(actionSave)
Endroutine
Mthroutine Name(handleSave)
Define_Com Class(#prim_alph) Name(#ltccustcla)
* Get Values
#IOS2.getElementValue Namedpath('content,basicbox,username') Formview(#COM_OWNER) Value(#ltccustnm)
#IOS2.getElementValue Namedpath('content,basicbox,creditlimit') Formview(#COM_OWNER) Value(#ltccustcla)
#ltccustcl := #ltccustcla.asnumber
#IOS2.getElementValue Namedpath('content,basicbox,discount') Formview(#COM_OWNER) Value(#LTCDISCCD)
#IOS2.getElementValue Namedpath('content,basicbox,website') Formview(#COM_OWNER) Value(#ltccustws)
#IOS2.getElementValue Namedpath('content,billtobox,address1') Formview(#COM_OWNER) Value(#ltccustb1)
#IOS2.getElementValue Namedpath('content,billtobox,address2') Formview(#COM_OWNER) Value(#ltccustb2)
#IOS2.getElementValue Namedpath('content,billtobox,city') Formview(#COM_OWNER) Value(#ltccustbc)
#IOS2.getElementValue Namedpath('content,billtobox,state') Formview(#COM_OWNER) Value(#ltccustbs)
#IOS2.getElementValue Namedpath('content,billtobox,postcode') Formview(#COM_OWNER) Value(#ltccustbz)
#IOS2.getElementValue Namedpath('content,shiptobox,address1') Formview(#COM_OWNER) Value(#ltccusts1)
#IOS2.getElementValue Namedpath('content,shiptobox,address2') Formview(#COM_OWNER) Value(#ltccusts2)
#IOS2.getElementValue Namedpath('content,shiptobox,city') Formview(#COM_OWNER) Value(#ltccustsc)
#IOS2.getElementValue Namedpath('content,shiptobox,state') Formview(#COM_OWNER) Value(#ltccustss)
#IOS2.getElementValue Namedpath('content,shiptobox,postcode') Formview(#COM_OWNER) Value(#ltccustsz)
#IOS2.getElementValue Namedpath('content,commsbox,service') Formview(#COM_OWNER) Value(#ltccustpc)
#IOS2.getElementValue Namedpath('content,commsbox,purchasing') Formview(#COM_OWNER) Value(#ltccustpp)
#IOS2.getElementValue Namedpath('content,commsbox,ar') Formview(#COM_OWNER) Value(#ltccustpr)
#IOS2.getElementValue Namedpath('content,commsbox,ap') Formview(#COM_OWNER) Value(#ltccustpa)
#IOS2.getElementValue Namedpath('content,commsbox,email') Formview(#COM_OWNER) Value(#ltccustem)
* Update File
Update Fields(#custData) In_File(ltccust) With_Key(#W$CSTV) Io_Error(*NEXT) Val_Error(*NEXT)
Endroutine
End_Com