Showing posts with label OBL. Show all posts
Showing posts with label OBL. Show all posts

Tuesday, 22 February 2011

Control Meta4Object Lists

Simple way to control which lists appear when the Meta4Object opens.

BEGIN Action_preload StepPreload
Idchannel = "SRCO_OR_MN_JOB"
Idnode = "SRCO_OR_MN_JOB"
Cancelif = "Notpreload"
Restrictliststo = "SCO_TR_H_HR_JOB.SCO_TR_H_HR_JOB,SRCO_OR_MT_JOB.SRCO_OR_MT_JOB"
END


This Meta4Object has three lists connected but only the two lists indicated in the attribute "Restrictlistto" appear.

Tuesday, 7 October 2008

Combo-Box With Fixed Values

The data of a combo box can either be populated directly (from OBL) or dynamically using a list group. In this case, the values are populated directly. The visible entries of the combo box are defined in Listitems (multiple language supported) and the associated values are defined in Values; the entries are separated by comma ','.

BEGIN Combobox Combobox
Iditem = "MyItem"
Left = 174
Top = 4
Width = 300
Height = 20
Listitems = "One,Two,Other"
Values = "1,2,"
END

Results in a combobox with tree entries:
- One (1)
- Two (2)
- Other (null)

Wednesday, 24 September 2008

Run New Presentation Based on Existing Instance

When you plan to implement e.g. a wizard, it might come in handy to run several presentations based on the same instance of a Meta4Object.

To open a new presentation use the element "Extends"; the Idinstance indicates the presentation to open. If the property Inheritdata is set to 1, the presentation uses the current instance of the Meta4Object.

The following code could represent the event click of the button "Next".

BEGIN Evclick evclickNext
BEGIN Extends extNextStep
Idchannel = "CRCO_PA_MT_WIZARD"
Idnode = "CRCO_PA_MT_WIZARD"
Iditem = "SRCO_LB_CANCEL"
Idinstance = "CRCO_PA_MT_WIZARD_S2"
Inheritdata = 1
END
BEGIN Action_call acUnloadForm
Sentence = "*O*../../../../Form.Unload(END_OK)"
END
END



Note: The Idchannel (Meta4Object) of the current and the new presentation should be the same.

Friday, 18 July 2008

Combo-Box With Data From List-Group

The data of a combo box can either be populated directly (from OBL) or dynamically using a list group. The list group must return the id and associated name; the id will not be visible but be passed to the item linked to the combo box (in the following example SRCO_ID_PM_TYPE), the name will be shown in the combo box.

BEGIN Combobox cboSRCO_ID_PM_TYPE
Iditem = "SRCO_ID_PM_TYPE"
Left = 174
Top = 4
Width = 300
Height = 20
Listgroup = "../lstgrpSRCO_ID_PM_TYPE"
Collabel = "##TM[SRCO_ID_PM_TYPE]"
END
BEGIN Listgroup lstgrpSRCO_ID_PM_TYPE
Iditem = "SRCO_ID_PM_TYPE"
Watchobject = "*O*../cboSRCO_ID_PM_TYPE.Visible"
BEGIN Function List
Idfuncchannel = "SRCO_PA_MT_PM_TYPE"
Idfuncnode = "SRCO_PA_MT_PM_TYPE"
Idfuncmethod = "LIST"
Mainargs = "ARG_SCO_ID_PM_TYPE"
Mainobjs = "SRCO_ID_PM_TYPE"
Targetitems = "SCO_ID_PM_TYPE,SCO_N_PM_TYPE"
Targetobjs = "SRCO_ID_PM_TYPE,SRCO_N_PM_TYPE"
END
END

Wednesday, 16 July 2008

Dump Presentation (OBL) to File

Use the following instruction to generate a file with the complete OBL code of a presentation. This is very powerful because all includes are resolved.

From developer taskbar run: ID_PRESENTATION,s:C:\FILE.OBL

ID_PRESENTATION: ID of presentation
C:\FILE.OBL: Output file including path (extension is not fixed)

Example:
SRCO_PA_MN_HIRE,s:c:\obl\SRCO_PA_MN_HIRE.obl