Welcome
-
Upload
hunter-goff -
Category
Documents
-
view
17 -
download
1
description
Transcript of Welcome
Welcome
STAR TRAINING_______
Next 7 __________________
Advanced requests
Search – Advanced requests
Advanced Requests in practice:
– Based on Next language and TCL services.
SEA
RC
H T
AB
SEA
RC
H T
AB
This exercise consists in a location query (= request) on parcels. To do so, we will use the «PARCELLE» table containing information on cadastral parcels and graphically linked to surfaces. We will build a query that will enable the user to view a parcel, on the basis of its reference.
First, let’s have a look at the table:
CCOCOM NOT NULL VARCHAR2(5) CCOSEC NOT NULL VARCHAR2(3)
DNUPLA NOT NULL VARCHAR2(4) The bold fields are «primary keys» and are used by STAR to construct the links with the graphic data. Note that there is only one sole value for «CCOCOM»: 330
Search – Advanced requests
Add a new request
• To add a new request, click on «Advanced requests» and «New»
Search – Advanced requests
Add a new request
• You can create a new request (type in the lines of code in the configurator) or reload an existing enext6 request
• Encode the «General Configuration Name» • If you want to reload an enext 6 request, click on «Browse» and select
your file from your PC
Search – Advanced requests
Add a new request
• Click on «Load file» to load your enext 6 request into the configurator
Search – Advanced requests
Add a new request
• Click on «Confirm» and give the description to save your advanced request
Search – Advanced requests
First request (Query with two interdependent lists)
PARAM 1 Section string ENUM($WEBDEMO.ListCCOSEC) CHAMP CCOSEC LIKEThe value of PARAM 1 (CCOSEC) will be selected in a list. The list will be generated via a TCL script under [JBOSS]/bin/winnext/tcl/WEBDEMO PARAM 2 Parcel_number string ENUM($WEBDEMO.ListDNUPLA&$PARAM1) CHAMP DNUPLA LIKEThe value of PARAM 2 (DNUPLA) depends on the value of PARAM 1 and will be selected in a list. The list will be generated via a TCL script under [JBOSS]/bin/winnext/tcl/WEBDEMOMAP GRATENTOUR
This means that the query will try to find linked elements in the «GRATENTOUR» mapLAYER FO_ParcelleThis means that the query will try to find linked elements in the «FO_Parcelle» layerTABLE PARCELLEThis means that the table linked to the graphic is named «PARCELLE»MIN_WIDTH 1000This means that, when the application views the quarter, the minimum width for the graphic window will be 1000 metersSQLINFO YESThis means that the selection tab has to be activated just after the location (with attributes information on the Parcel)DISPLAY_ROW OFFPROG APP_findIs the name of the program to run (key expression)
Search – Advanced requests
So, your request should look like this:
PARAM 1 Section string ENUM($WEBDEMO.ListCCOSEC) CHAMP CCOSEC LIKEPARAM 2 Parcel_number string ENUM($WEBDEMO.ListDNUPLA&$PARAM1) CHAMP DNUPLA LIKE MAP GRATENTOURLAYER FO_ParcelleTABLE PARCELLEEVIDENCE FIRSTMIN_WIDTH 1000SQLINFO YESDISPLAY_ROW OFFPROG APP_find
Connect to the application and try toexecute the query(for example, try to locate on B / 0010)
Search – Advanced requests
Search – Advanced requests
TCL scripts
ListCCOSEC.TCL : lists the different « CCOSEC » field values
proc WEBDEMO.ListCCOSEC {} {global SERVER_STDset sqlcmd "select distinct CCOSEC from PARCELLE"ServA_SimpleQuery $sqlcmd $SERVER_STD resreturn [join [split [join $res ,] "{}"] ""]
}
ListDNUPLA.tcl : lists the different «DNUPLA» values for a specific «CCOSEC» value
proc WEBDEMO.ListDNUPLA {ccosec} {global SERVER_STDset sqlcmd "select distinct DNUPLA from PARCELLE where CCOSEC='$ccosec'"
ServA_SimpleQuery $sqlcmd $SERVER_STD resreturn [join [split [join $res ,] "{}"] ""]
}
That’s all, folks !
STAR TRAINING_______
Developer
__________________
Keep up the good work !