Lập trình domino

Embed Size (px)

Citation preview

  • 7/25/2019 Lp trnh domino

    1/264

    Developing IBMLotusDomino 7 Applications:

    Foundation SkillsStudentGuide

  • 7/25/2019 Lp trnh domino

    2/264

    C ou r se D escr ip ti o n

    CourseDescription

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 1

  • 7/25/2019 Lp trnh domino

    3/264

    C o ur s e D esc r ipt i on

    Targetaudience

    ThetargetaudienceforDevelopingIBMLotusDomino7Applications:FoundationSkillsisapplicationdevelopersnewtheIBMLotusDominoenvironment.

    Summarydescription

    Thiscourseisahands-onintroductiontothebasicskillsofworkingintheIBMLotusDominoDesigner7developmentenvironment.Throughinstructorlectureandstudent-centered activitiesandexercises,studentslearnthefoundationskillsrequiredtouseLotusDominoDesigner 7designelementstocreateLotusDomino7applications.Bytheendofthecourse,studentsshouldbeabletodesign,develop,anddeployasingle-databaseLotusDomino7application.

    Courseformatandduration

    Thisisaone-dayclassroomcourse.

    Coursegoals

    Bytheendofthecourse,studentsshouldbeabletodesign,develop,anddeployasingle-databaseLotusDomino7application.

    2 D eve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    4/264

    C ou r se D esc r ip tio n

    (continued)

    Topicscovered

    TheDevelopingIBMLotusDomino 7Applications:FoundationSkillscoursecoversthefollowingtopics:

    LotusDomino 7applicationarchitecture

    LotusDominoDesigner7applicationanddesignenvironment

    Creatingforms

    Addingfieldstoforms

    Creatingviews

    Creatingpages

    OverviewofprogramminginLotusDomino 7applications

    WorkingwiththeFormulalanguage Creatingdocuments

    Enhancingformsandpageswithlayers

    Creatingsortedandcategorizedviews

    Validatingandtranslatingfields

    Creatingagentstomodifydataindocuments

    Creatingviewandformactions

    Definingvarioussecuritylevelsforapplicationusers

    Usinghide/whenoptionstodisplayorhideinformation

    Usinglinkstomakeapplicationelementsavailabletousers

    Creatingdifferenttypesoflinks

    Creatingadesigntemplate

    Determiningreplicationrequirements

    Determininginformationrequiredbysystemadministratorstodeployanapplication

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 3

  • 7/25/2019 Lp trnh domino

    5/264

    Lesson1 IntroductiontoLotusDomino 7

    Lesson2 ExploringLotusDominoDesigner 7

  • 7/25/2019 Lp trnh domino

    6/264

    Less o n 1 I n tr odu ct i on t o L o tu s D o min o 7

    LotusDomino 7applicationsletpeopleshare,collect,track,andorganizeinformation,usingLotusNotes7 andotheruniversallyavailableclientssuchasWebbrowsers.ThedataitselfmaybecontainedinNotesdatabasesorinlegacydatasystems.

    Objectives

    Aftercompletingthislesson,youshouldbeableto:

    9 DescribeLotusDominoanditsfunctions.

    9 DescribethestructureandcomponentsofaDominodatabase.

    9 Accessdatainanote.

    18 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    7/264

    L ess on 1 Int r o duc t i on to Lo tus Do min o

    LotusDominoprovidesawiderangeofcollaborativeservicesandaframeworkfordistributedbusinessprocessapplicationsandworkflow.LotusDominoand

    IBMWebSpherehavebuilt-ininte grationpointsintheareasofdirectory,security,applicationdevelopment,andJavaservices.

    LotusDominoisarapidapplicationdevelopment(RAD)environmentwithahighreturnoninvestmenttoitsusers.

    OtherfeaturesthatLotusDominoprovidesinclude:

    IntegratedWebsecurity NativeHTML

    IntegratedJavaScript events

    Integrationwiththefilesystem

    Javaagentsandservlets Distributedobjects,suchasCORBA/IIOP

    Integrationwiththird-partydesigntools

    IntegrationwithMicrosoftIIS

    Programmableobjectstore

    Replication

    LotusDominoalsointegrateswithback-enddatasourcessuchasIBMDB2andOracle,andwithtransactionsystemssuchasIBMCICS.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 19

  • 7/25/2019 Lp trnh domino

    8/264

    Less o n 1 I n tr odu ct i on t o L o tu s D o min o 7

    ThefoundationoftheLotusNotesandDominodesignistheuseofasingleandsimpledatastructure,calledanote,tostoreallinformation.Notesareusedto

    storedataanddesignelements.Notesaredescribedinmoredetaillaterinthislesson.

    Dominodatabasecontainmentmodel

    Dominodatabasesarefilesthatexistonthefilesystem.LotusDominousesthepathandfilenametoidentifythedatabase.Oncethedatabaseisopen,youaccessdatabyopeningnotes.

    Thisrelationshipisdescribedasacontainmentmodel.Thefilesystemcontains

    databases,adatabasecontainsnotes,andanotecontainsdata.

    ThefollowingdiagramillustratestheDominodatabasecontainmentmodel.

    Asthecontainmentmodelshows,toaccessadatabase,youmustfirstaccessthefilesystem.

    20 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    9/264

    L ess on 1 Int r o duc t i on to Lo tus Do min o

    (continued)

    ThecomponentsofaDominodatabase

    ADominodatabasecontainstwoareasoffunctionality:

    NotesStorageFacility(NSF)maintainsthedataanddesignelementsoftheapplication.

    NotesIndexFacility(NIF)buildsandmaintainslistsforlocatingdataintheapplication.

    ThefollowingdiagramillustratesthecomponentsofaDominodatabase.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 21

  • 7/25/2019 Lp trnh domino

    10/264

    Less o n 1 I n tr odu ct i on t o L o tu s D o min o 7

    YoucancreateaDominodatabaseinthefollowingways:

    Createadatabasefromatemplate. Createanewblankdatabase.

    Copyanexistingdatabase.

    Duringthiscourseyouwilluseallthreemethods.

    Definingtemplates

    Atemplateisadatabasethatcontainsthestructureforaparticularapplication,butdoesnotcontainanydata.LotusDominoincludesanumberofstandardtemplatesthatletyoueasilysetupadiscussiondatabase,apersonaljournal,oracollaborativeteamdatabase.

    Youwilllearnmoreaboutworkingwithtemplateslaterinthiscourse.

    Creatinganewblankdatabase

    Ablankdatabasecontainsnodesignelements,suchaspagesorforms.Blankdatabaseshaveonedefaultview.

    Followthesestepstocreateadatabasefromscratch.

    Step Action

    1 ChooseFileDatabaseNew.

    Result:TheNewDatabasedialogboxappears.

    2 AcceptthedefaultofLocaltocreatethedatabaseonyourlocalcomputer.

    3 Enteratitleforthedatabase.

    4 Enterafilenameforthedatabase.

    5 Select-Blank-fromthetemplatelist.

    6 ClickOK.

    22 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    11/264

    L ess on 1 Int r o duc t i on to Lo tus Do min o

    DuringthiscourseyouwillworkinaPracticedatabaseforallGuidedPracticesandsomeExercises.DuringthefollowingGuidedPracticeyouwill:

    CreateapersonalcopyoftheInstructorDemodatabasebycopyingit.

    CreateapersonalcopyofthePracticedatabasefromatemplate.

    Giveyourdatabasesuniquenames.

    CreatedatabasebookmarksintheNotesclient.

    CreateapersonalcopyoftheInstructorDemodatabase

    FollowthesestepstocreateapersonalcopyoftheInstructorDemodatabase.

    Step Action

    1 OpentheNotesclient.

    2 ChooseFileDatabaseOpen.

    3 IntheServerdialogbox,selectthecourseserver.

    4 IntheDatabasedialogbox,selectInstructorDemo(Instructor_ND510.nsf).

    5 ClickOpen.

    Result:TheInstructorDemodatabaseopensintheNotesclient.

    6 ChooseFileDatabaseNewCopy.

    7 IntheServerdialogbox,selectLocal.

    8 IntheTitledialogbox,enteratitleforthedatabasethatincludesyourinitials.Forexample,ifyourinitialsareABC,enterInstructorABC.

    9 IntheFilenamedialogbox,enterauniquefilenameforyourcopyofthedatabase.Forexample,ifyourinitialsareABC,enterInstructorABC.nsf.

    10 ClickOK.

    Result:Thenewcopyofthedatabaseiscreatedandsavedinthenotes/datadirectoryonyourlocalsystem.

    11 Next,youwillopenyourdatabaseandcreateabookmark.

    ChooseFileDatabaseOpen.

    12 SelectyournewfilefromtheDatabaseslist.ClickOpen.

    13 Right-clickonthewindowtabforyourdatabase.ChooseCreateBookmark.

    14 ClickOK.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 23

  • 7/25/2019 Lp trnh domino

    12/264

    Less o n 1 I n tr odu ct i on t o L o tu s D o min o 7

    (continued)

    CreateapersonalcopyofthePracticedatabase

    FollowthesestepstocreateapersonalcopyofthePracticedatabase.

    Step Action

    1 OpentheNotesclient.

    2 ChooseFileDatabaseNew.

    3 IntheServerdialogbox,makesureLocalisselected.

    4 IntheTitledialogbox,enteratitleforthedatabasethatincludesyourinitials.Forexample,ifyourinitialsareABC,enter PracticeABC.

    5

    IntheFilenamedialogbox,enterauniquefilenameforyourcopyofthedatabase.Forexample,ifyourinitialsareABC,enterPracticeABC.nsf.

    6 IntheSpecifyTemplateforNewDatabasesection,selecttheclassroomserver intheServerdialogbox.

    7 IntheTemplatelist,highlightthePracticetemplate.

    8 ClickOK.

    Result:ThenewPracticedatabaseopensintheNotesclient.

    9 Right-clickonthewindowtabforyourdatabase.ChooseCreateBookmark.

    10 ClickOK.

    24 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    13/264

    L ess on 1 Int r o duc t i on to Lo tus Do min o

    Asstatedearlier,thenoteisthedatastructureusedtostoreallinformationinaNotesorDominodatabase.

    Characteristicsofnotes

    Allnotesinadatabaseareessentiallythesame.Theyarepeerstooneanotheranddonotsharehierarchicalorotherrelationships.NotesonlydifferinthedatavaluestheycontainandhowLotusDominousesthem.

    Howanotestoresdata

    Anotestoresdatainitems.Eachitemisidentifiedbyanameandcontainsalistofvalues.Thevaluesinasingleitemmustbethesamedatatype.Itemsalsostoreinformationaboutthedata.ThismetadataisavailabletotheapplicationandtheDominoservices.

    Metadatais,literally,dataaboutdata.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 25

  • 7/25/2019 Lp trnh domino

    14/264

    Less o n 1 I n tr odu ct i on t o L o tu s D o min o 7

    (continued)

    Typesofnotes

    ADominodatabasecontainsHeader,ACL,andDesignnotes.ItalsocontainsDatanotesoncetheusersofthedatabasecreatethem.

    Somenotesarecreatedbyusersanddevelopers,andothernotesaremaintainedbyLotusDominototrackandcontrolinformationinthedatabase.

    Notesthatdeveloperscreate

    ThefollowingtabledescribesthetypesofnotesthatusersanddeveloperscancreateinaDominodatabase.

    TypeofNote Purpose

    Data Storesdatavaluesusedintheapplication.

    Forexample,adatanotemaycontaincustomerprofileinformation,suchasthecustomersname,address,andphonenumber.

    Design Storesdatausedtoprocessoraffectthepresentationandfunctionalityoftheapplication.

    Forexample,adesignnotemaycontaininstructionsforhowLotusDominodisplaysinformationtoauser.

    NotesthatLotusDominomaintains

    ThefollowingtabledescribesothertypesofnotesthatLotusDominomaintains.

    TypeofNote Purpose

    ACL TheACLstoresalistofnamesandoptionsforcontrollingaccesspermissionstothedatabase.

    Databaseheader LotusDominostoresinformationaboutthedatabaseinadatabaseheadernote.ThedatabaseheadercontainsinformationsuchastheversionofLotusDominousedtocreatethedatabase,thetitleofthedatabase,thedatabaseID,andsoon.

    26 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    15/264

    L ess on 1 Int r o duc t i on to Lo tus Do min o

    ! "

    Dataisstoredinaspecifickindofnote,referredtoeitherasadatanoteoradocument.Bothtermsareusedinterchangeablythroughoutthiscourse.Youcan

    createandaccessdocumentsinmanyways.

    TheDocumentPropertiesbox

    TheNotesclientprovidesuserswiththeabilitytoexaminedocumentsthroughapropertiesbox.TheDocumentPropertiesboxreadsthecontentsofadocumentanddisplaysinformationtotheuser.

    ThefollowingdiagramshowstheDocumentPropertiesbox.

    OpeningtheDocumentPropertiesbox

    FollowthesestepstoopentheDesignDocumentPropertiesbox.

    Step Action

    1 OpenthedatabaseintheNotesclient.

    2 Selectthedocumentyouwishtoexamine.

    3 ChooseFileDocumentProperties(orright-click)toopenthe

    DocumentPropertiesbox.

    4 UsethetabsofthePropertiesboxtoviewthestructureofthedatanote.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 27

  • 7/25/2019 Lp trnh domino

    16/264

    Less o n 1 I n tr odu ct i on t o L o tu s D o min o 7

    ! " (continued)

    ExaminingadocumentthroughthePropertiesbox

    ThePropertiesboxhasseveraltabsthatdisplaydifferentinformationaboutthedocument.Thefollowingtabledescribesthreeofthesetabs.

    Tab InformationDisplayed

    DocumentInfo DataaboutthedocumentthatLotusDominomaintains,forexample:

    Whenitwascreated

    Whenitwaslastmodified

    Wholastmodifiedit

    Fields

    Listoftheitemsinthedocumentandthedataeachitemcontains.Selectinganitemintheleftpanedisplaysitsvalueandmetadataintherightpane.MetadataincludesthedatatypeandspecialflagsLotusDominouseswhendealingwiththisdata.

    DocumentIDs TheuniqueIDofthedocument.

    Otherwaysofaccessingdata

    Dominoprovidesaccesstodatainseveralways,including:

    Fieldsonaform

    Columnsinaview

    Programmatically,viaanyofthefollowing:

    Formulalanguage

    LotusScript

    JavaScript

    Java

    XML

    28 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    17/264

    ! #$

    L ess on 1 Int r o duc t i on to Lo tus Do min o

    Examinethecontentofdocuments

    Inthisexercise,youwillanswerquestionsaboutthecontentofdocuments.

    Completethesetasks

    OpentheCustomerviewinyourcopyoftheInstructorDemodatabase.Answerthefollowingquestions:

    Wholastupdatedthedocument?

    Whenwasthedocumentcreated?

    WhatisthedatatypeoftheCustomerIDitem?

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 29

  • 7/25/2019 Lp trnh domino

    18/264

    Less o n 1 I n tr odu ct i on t o L o tu s D o min o 7

    % " !!

    Dominoapplicationsareclient-serverapplications.Theclientcommunicateswiththeapplicationusingaproprietaryremoteprocedurecallmechanism.TheNotesRemoteProcedureCall(NRPC)transmitstheclientrequesttotheDominoapplicationandreturnstheresults.

    LotusDominoauthenticatesuserswhentheyaccessapplicationsontheserver.OtherDominoservicesarecalledupondependingonthespecificsoftheapplication.

    AccessingaDominoapplicationwithLotusNotes

    ThefollowingtabledescribesthestagesthatoccurwhenauseraccessesaDominoapplicationfromaNotesclient.

    Stage Description

    1 Usermakesarequesttoopen,read,orsavedataintheapplication.

    2 Dominoauthenticatestheusermakingtherequestandprovidesauthenticationinformationaboutitselftotheuser.Thisoccurswhentheclientfirstaccessestheserver.

    3 Dominoverifiestherightsoftheusermakingtherequest,everytimearequestismade.

    4

    Dominoexecutestherequestandrespondstotheclient.

    ThefollowingdiagramillustratestheNotesclientaccessingaDominoapplication.

    30 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    19/264

    L ess on 1 Int r o duc t i on to Lo tus Do min o

    % " !

    ! (continued)

    Workingwithlocalapplications

    Alocaldatabaseallowsuserstoworkoffline(notconnectedtothenetwork).Localdatabasescanalsobeusedtorunpersonalapplicationsthatshouldnotbeavailabletomultipleusers.

    TheNotesclientprovidesasubsetofDominoservicestoexecutecommonfunctionalitylocallyandreducetheloadontheserver.Theclientdoesnotsupportthesamelevelofsecuritychecksandrestrictionsthattheserverdoes.However,therearedatabasepropertiesthatthedevelopercanemploytoenforceacertainlevelofsecurityonapplicationsthatresidelocally.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 31

  • 7/25/2019 Lp trnh domino

    20/264

    Less o n 1 I n tr odu ct i on t o L o tu s D o min o 7

    % & !

    !

    DominosupportstheHTTPprotocolallowingWebbrowserstoaccessapplicationsonaDominoserver.

    AswithaccessusingaNotesclient,DominoauthenticatesuserswhentheyaccessapplicationsontheserverviaaWebbrowser.

    AccessingaDominoapplicationwithaWebbrowser

    ThefollowingtabledescribeshowbrowsersinteractwithDominoapplications.

    Stage

    Description

    1 Usermakesarequesttoopen,read,orsavedataintheapplication.

    2 DependingontheserversetupandthedatabaseACL,Dominoauthenticatestheusermakingtherequestandprovidesauthenticationinformationaboutitselftotheuser.IfbothserveranddatabaseallowAnonymousaccess,nochallengeisissuedtotheclientandtheuserisnotauthenticated.TheresultisthattheuserisidentifiedasAnonymous.

    3 Dominoverifiestherightsoftheusermakingtherequest.

    4 DominotranslatestheHTTPrequest.

    5 Dominoexecutestherequest.

    ThefollowingdiagramillustrateshowaWebbrowseraccessesaDominoapplication.Inthisexample,dataisalsoaccessedfromDB2.

    32 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    21/264

    Lesson 2 Ex pl or in g Lo tu s Do mi no D esign er 7

    TheLotusDominoDesigner 7clientisusedtocreateDominoapplications.Inthislesson,youwillexploreLotusDominoDesigner.

    Objectives

    Aftercompletingthislesson,youshouldbeableto:

    9 Accessthedesignofadatabase.

    9 Accessindividualdesignelementswithinthedatabase.

    9 CreateapplicationbookmarksinLotusDominoDesigner.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 33

  • 7/25/2019 Lp trnh domino

    22/264

    Less o n 2 Ex p l or in g Lo t u s Do m i no De s i gn e r 7

    !

    DominoDesigneristhedevelopmentenvironmentusedtobuildDominoapplications.DominoDesignercontainsthetoolsnecessarytocreatepowerful

    Dominoapplications.Toaccessthedesignofadatabase,openthatdatabaseinDominoDesigner.

    OpeningaDominodatabaseinDominoDesigner

    FollowthesestepstoopenadatabaseinDominoDesigner.

    Step Action

    1 OpenDominoDesigner.

    2 ChooseFileDatabaseOpenfromthemenu.

    3 IntheServer:box,enterthelocationoftheapplication(servernameorlocal).

    4 IntheDatabase:box,selectthedatabasefromthelist,orenteritintheFilename:box(directoryandfilename).

    5 ClickOpen.

    Exploringthedesignenvironment

    WhenyouopenadatabaseinDominoDesigner,thefirstlevelofthedesignenvironmentopens.Thefollowingtabledescribesseveralareasinthisenvironment.

    Area Description

    Designpane IncludestheDesignlistforthedatabase.ThisisthelistofdesignelementsandtheDesignbookmarkicons,whichpointtothemostrecentdatabasesonwhichyouhaveworked.

    Workpane Listseverythinginthecurrentdatabasefortheselecteddesignelement.

    AcrossthetopoftheWorkpaneareDesignactionbuttons.Thesebuttonsperformactionsonthecurrentlydisplayedelements(suchascreatinganewform).

    Windowtabs Eachitemthatyouareworkingoncurrentlyhasitsowntabthat,whenclicked,takesyoutothewindowthattabrepresents.

    34 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    23/264

    Lesson 2 Ex pl or in g Lo tu s Do mi no D esign er 7

    !

    DominoDesignerincludesstructurescalleddesignelementsthatarethebuildingblocksforapplications.Customizethesestructurestocreateapplications.

    Applicationtasksandcorrespondingdesignelements

    ThefollowingtablesummarizestasksyoumightwantanapplicationtoperformandthecorrespondingDominodesignelement(s)youcoulduse to implementthem.

    ApplicationTask/Functionality

    DesignElements

    Display,gather,andorganizeinformation.

    Pages:Containtext,images,applets,andotherobjects.Userscannotenterinformationintopages.

    Forms:Containfieldswhereuserscanentervalues.Thevaluesarestoredasadocument.

    Views:Indexanddisplaylistsofdocumentscontainedintheapplication.

    Automatetasks. Actionsandagents:Canrunscriptswhenauserdoessomething.

    Controlnavigation.

    Hotspots,framesets,outlines,andimagemaps:Whenusedincombination,allowuserstomovearoundtheapplicationquicklyandeasily.

    Accesscontrolandprogramming

    DesignelementsareoneoffourpiecesofaDominoapplication.TwootherpiecestheAccessControlListandLogicwillalsobediscussedinthiscourse.

    To... Use...

    Applylogic. Programminglanguages,whichenableyouto:

    Calculateormodifyinformation.

    Validateinputsbeforesaving.

    Restrictaccesstoinformation in thedatabase.

    TheAccessControlList(ACL)andotherelements,whichidentifytheuserswhocan:

    Create,read,andmodifydata.

    Changethedesignoftheapplication.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 35

  • 7/25/2019 Lp trnh domino

    24/264

    Less o n 2 Ex p l or in g Lo t u s Do m i no De s i gn e r 7

    ! (continued)

    Accessingdesignelements

    WhenyouclickadesignelementintheDesignlist,alloftheindividual,database-specificelementsofthattypeofelementarelistedintheDesignpaneandtheWorkpane.Toopenanindividualdesignelement,double-clicktheelementintheWorkpane.TheelementthenopensintotheWorkpane,withtheProgrammerspanebelowit.

    ThefollowingdiagramshowstheseareasinDominoDesigner.

    Designlist Workpane

    pane

    Programmerspane

    Objects tab Reference tab Script area

    UsingtheWorkpane

    TheWorkpaneisusedforcreatingandmodifyingforms,pages,views,andotherelementsintheDesignlistthatarespecifictoyourapplicationordatabase.Whenyouopenorcreateanindividualdesignelement,DominoDesignerautomaticallydisplaysthatelementintheWorkpane.

    36 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    25/264

    Lesson 2 Ex pl or in g Lo tu s Do mi no D esign er 7

    ! (continued)

    UsingtheProgrammerspane

    UsetheProgrammerspanetoaddcodeinareasofthecurrentdesignelementintheWorkpane.ThefollowingtabledescribesthepartsoftheProgrammerspane.

    Part Function

    Objectstab Listsallareas(objectsandevents)inthecurrentdesignelementwhereyoucanaddcode.CodeisaddedintheScriptarea.WhenyouclickanitemintheObjectstab,theScriptareachangestoshowthecodethatdescribestheobject.TheReferencetabreflectsthelanguage(s)thatyoucanuseintheScriptarea.

    Referencetab Listsfieldsandfunctionsthatcanbeusedtoscripttheobject.

    Designerscanpastefromthelistorfromthecontext-sensitiveHelpintotheScriptarea.

    Scriptarea UsedtowritescriptsfortheelementselectedusingtheObjectstab.

    DominoDesignerreferences

    ThefollowingtabledescribesdifferentwaysofgettinghelpinDominoDesigner.

    Resource

    Function

    HowtoOpen

    DominoDesignerHelp

    Providesdetailson:

    UsingDominoDesigner

    DesigningDominoapplications

    ChooseHelpHelpTopics

    fromthemenu.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 37

  • 7/25/2019 Lp trnh domino

    26/264

    Less o n 2 Ex p l or in g Lo t u s Do m i no De s i gn e r 7

    '

    (

    TheDominoDesignerenvironmentprovidestoolstohelpdevelopersmanagethedevelopmentofcomplexapplications.ThesetoolsincludetheabilitytocreatebookmarksontheDesignerbookmarkbar,andtheabilitytocreatefolderstoorganizeapplicationbookmarks.

    Createafolderandbookmarkforthecoursedatabasein

    DominoDesigner

    InthisGuidedPractice,youwillcreateafolderontheDominoDesignerBookmark

    barthatcontainsabookmarkforthePracticedatabase.

    Step Action

    1 OpenDesigner.

    2 ClickthefoldericonintheDesignpane.

    Result:TheCreateFolderdialogboxopens.

    3 Enteranameforthenewfolder.CallitFoundation.

    4 IntheCreateFolderdialogbox,selectthe-Folders-location.

    5 ClickOK.

    Result:ThefolderappearsontheBookmarkbar.Ifyoumovethecursoroverthefolder,itsnameappearsaspop-uptext.

    6 Nowcreateabookmarkwithinthefolder.

    ChooseFileDatabaseOpen.

    7 SelectthenameofyourPracticedatabase.

    8 ClickOpen.

    Result:ThedatabaseisopenedinDesigner.

    9 DragthedatabaseicontotheFoundationfolder.

    Result:AbookmarkfortheFoundationpracticedatabaseiscreatedintheFoundationfolder.

    38 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    27/264

    ) *

    Lesson 2 Ex pl or in g Lo tu s Do mi no D esign er 7

    Throughoutthiscourseyouwillworkinseveraldatabases.Theyare:

    Practicedatabase.ThisdatabaseisusedinGuidedPracticesandsomeexercises.YoucreatedapersonalcopyofthisdatabasefromatemplateinLesson1:IntroductiontoLotusDomino 7.

    OccasionallyyouwillaccesstheInstructorDemodatabase.YoucreatedapersonalcopyofthisdatabaseinLesson1.

    Policiesdatabase.Youwillcreatethisdatabaseduringexercisesthroughoutthecourse.

    ThePoliciesdatabasethatyouwilldesignanddevelopwillcontaincorporatepolicesandproceduresforWorldwideCorporation.Itwillalsocontainadiscussionforumsothatemployeescanaskquestionsaboutpoliciesorprocedures.

    Thescenario

    WorldwideCorporationisaninternationalpotterymanufacturer.Thecompanysellsceramicsworldwide.Productsincludetiles,china,andvariouskindsofpottery.Thecorporateofficehousesmanufacturing,researchanddevelopment,productmanagement,qualitycontrol,humanresources,andsystemadministration.Thereareseveralsmallersalesofficesandresellersthroughouteachregion,andsomesalesrepresentativeswhoworkfromtheirhomes.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 39

  • 7/25/2019 Lp trnh domino

    28/264

    Less o n 2 Ex p l or in g Lo t u s Do m i no De s i gn e r 7

    40 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    29/264

    Lesson3 WorkingwithForms

    Lesson4 WorkingwithViews

    Lesson5 WorkingwithPages

  • 7/25/2019 Lp trnh domino

    30/264

    Less o n 3 Wo rk i ng w i th Fo r ms

    Formsdisplayandcollectinformation.Aformprovidesastructureforcreatinganddisplayingdocuments.

    Objectives

    Aftercompletingthislesson,youshouldbeableto:

    9

    Defineaform.

    9 Designaform.

    9 Createaform.

    9 Addtextandformattingfeaturestoforms.

    9 PreviewaforminLotusNotesandontheWeb.

    9 Createfieldstostoredata.

    9 Describethedifferenttypesoffields.

    9 Setadefaultvalueforafield.

    9 UseHide/Whenoptionstodeterminewhentodisplaydata.

    42 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    31/264

    Less o n 3 Wo r k i ng w i th Fo r ms

    Aformisadesignelementthroughwhichdataisenteredanddisplayed.Formscontainapplicationlogic,andcanactondata.Thedatacollectedviaaformis

    storedinadatanote,alsodescribedasadocument.

    Whenauseraddsinformationtoadatabasethroughaformandsavesit,theinformationissavedasaseparatedocumentfromtheform.Whenauseropensadocument,thedocumentusestheformasatemplatetoprovidethestructurefordisplayingthedata.

    Formsconsistofthefollowing:

    Fieldsusedtocollectordisplaydata.

    Staticelements,suchastext,graphics,andtablesusedtocontrolappearanceanduserinterface.

    Programmingtoactondata.Thefollowinggraphicrepresentstheformdesignelement.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 43

  • 7/25/2019 Lp trnh domino

    32/264

    Less o n 3 Wo rk i ng w i th Fo r ms

    (continued)

    Databasenotes

    AformisadesignnotestoredinsideaDominodatabase.Thedataitcontainsisthedescriptionoftheform.Dominodatabasescontainfourdifferenttypesofnotes.

    Thefollowingtablebrieflydescribesthefournotetypesstoredinadatabaseandtheirfunction.

    NoteType Function

    Header Containsinformationaboutthedatabaseitself,suchasitsname,size,andcreationdate.Eachdatabasehasasingle

    headernote.

    ACLNote StorestheAccessControlList,alistofnamesandpermissionsassociatedwiththedatabase.

    DesignNote Eachdesignelement,suchasaform,view,orpageisstoredinthedatabaseasadesignnote.

    Theformdesignnoteactsasatemplateusedtocreatenewdocumentsordisplayinformation.

    DataNote Adatanoteholdstheinformationenteredusingaform,aswellassystemdatausedbyDominoformanagementpurposes.

    44 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    33/264

    Less o n 3 Wo r k i ng w i th Fo r ms

    (continued)

    Elementsusedinforms

    Thefollowingtabledescribestheelementsthatmightbeincludedonaform.

    Element Function

    Textandgraphics Displayinformationorpicturesonalldocumentsusingthe

    form.

    Fields Displaydatafromdocuments.

    Savedatatoadocument.

    Computeavalue.

    Properties Controlattributesoftheform.Forexample,abackground

    colorisaformproperty.

    Otherelements,suchas:

    Subforms

    Sharedfields

    Buttonsandactions

    Offeradditionaltoolstothedesigner,oftenenhancinginteractivityorefficiencyoftheform.

    Processofcreatingaform

    Therearethreephasesincreatingaform:

    Designtheappearance.

    Createtheform.

    Testtheform.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 45

  • 7/25/2019 Lp trnh domino

    34/264

    Less o n 3 Wo rk i ng w i th Fo r ms

    Whendesigningaform,considerthefollowingquestions:

    Whatshouldthisformdo? Whatkindofinformationisneededfromtheuser?

    Shouldanyofthisinformationbeautomaticallygenerated?

    Whatprocess(es)shouldoccuroncetheformissubmitted?

    Whatclient(s)willbeusedtoaccesstheform?

    Designingaform

    Completethesetaskstodesignandcreateaform.

    Step Task

    1 Decidethepurposeoftheform.

    2 Determinetheinformationtheformwillcollect.

    3 Determinerequiredelementsfortheform.

    4 Createtheform.

    5 Addtherequiredelementstotheform.

    6 Savetheform.

    7 Testtheforminvariousclients.

    46 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    35/264

    Less o n 3 Wo r k i ng w i th Fo r ms

    Onceyouhavedecideduponyourformsdesign,youcancreateit.

    Creatingaform

    Followthesestepstocreateaform.

    Step Action

    1 OpenthedatabaseinDesigner.

    2 IntheDesignpane,clickForms.

    Result:IntheWorkpane,thelistofexistingformsappears.TheNewForm

    buttonappearsonthebuttonbar.

    3 IntheWorkpane,clickNewForm.

    4 ChooseDesignFormProperties.

    5 EnteranameintheNamefield.

    6 ClosethePropertiesbox.

    7 Addelementstotheform.

    8 Savetheform.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 47

  • 7/25/2019 Lp trnh domino

    36/264

    Less o n 3 Wo rk i ng w i th Fo r ms

    (continued)

    TheFormpropertiesbox

    Toexamineinformationaboutaform,usetheFormpropertiesbox.Thepropertiesofaform,aswellasanyotherelement,aremodifiedthroughthepropertiesbox.

    Theprocesstochangethepropertiesofanelementisasfollows:

    Selecttheelement.

    Openitspropertiesbox.

    Specifytheappropriateproperties.

    Closeorcollapsethepropertiesbox.

    Propertiesboxesdonotneedtobeclosedaftereachmodification.Theyarelive

    andchangetoreflectthelatestelementselected.Changesareapplied immediately.

    ThefollowinggraphicshowstheFormpropertiesbox.

    Element Name

    Tabbed

    Panes

    Individual

    Properties

    Expand/

    Collapse

    Icon

    Close Icon

    Context

    SensitiveHelp Icon

    Usethepropertiesboxtospecifyattributesofaformsuchas:

    Formname

    Backgroundcolor

    Headerandfootertext

    48 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    37/264

    Less o n 3 Wo r k i ng w i th Fo r ms

    (continued)

    Namingtheform

    Formnameswithinthesamedatabasemustbeunique.

    Formnamesmayinclude:

    Characters

    Spaces

    Numbers

    Punctuation

    Formnamesarealsocase-sensitive.

    Althoughthenameitselfislimitedto64bytes,thesizelimitincreasesto256charactersifthereisanamealiasorcascadingmenuoption.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 49

  • 7/25/2019 Lp trnh domino

    38/264

    Less o n 3 Wo rk i ng w i th Fo r ms

    (continued)

    Aliases

    Analiasissimplyanothernameforaformorotherdesignelement.Aliasesareashortwaytorefertotheform.Ifanaliasexists,itisusedto:

    Refertotheformprogrammatically.

    Consistentlyrefertotheform,evenifthenameoftheformchanges.

    Aliasesareaninternalreferencetotheform,orelementtheyareassociatedwith.

    Creatingaformalias

    Followthesestepstoaddanaliastoaform.

    Step Action

    1 Opentheform.

    2 ChooseoneofthefollowingmethodstoopentheFormpropertiesbox:

    DesignFormProperties

    Right-clickontheform.ChooseFormproperties.

    3 IntheNamebox,entera|(pipe*)andyouraliasnameaftertheexistingformname.Forexample:

    formName | fn

    *PressSHIFT+\forthepipesymbol.

    4 ClosetheFormpropertiesbox.

    5 Saveyourform.

    50 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    39/264

    Less o n 3 Wo r k i ng w i th Fo r ms

    Createaform

    (continued)

    Followthesestepstocreateasimpleformwithanalias.

    Step Action Result

    1 OpenthePracticedatabase.

    2 ClickFormsintheDesignlist. AlistofexistingformsappearsintheWorkpane.

    3 ClickNewForm. Anewblankformopens.

    4 ChooseDesignFormProperties.

    TheFormPropertiesboxopens.

    5 EnterthefollowingnameandaliasintotheNamebox:

    Employee Information | ei

    6 ClosetheFormpropertiesbox.

    7 Savetheform. Yournewformanditsaliasappearsintheformlist.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 51

  • 7/25/2019 Lp trnh domino

    40/264

    Less o n 3 Wo rk i ng w i th Fo r ms

    Formscancontainthefollowingkindsoftext:

    Statictext,forexample,theformtitle,fieldlabels,orexplanatorytext. Dynamictext,forexample,textthatiscomputed.

    Formattingtext

    UsetheTextpropertiesboxtomodifytextonyourform.Usingthetextpropertiesbox,youcontrol:

    Font

    ParagraphAlignment

    ParagraphMargins

    ParagraphBorder

    Whentodisplayorhideaparagraph

    ParagraphStyles

    ThefollowinggraphicshowstheTextpropertiesbox.

    52 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    41/264

    Less o n 3 Wo r k i ng w i th Fo r ms

    Addandformattext

    (continued)

    Followthesestepstoaddformattedtexttoyourform.

    Step Action Result

    1 OpentheEmployeeInformationforminthePracticedatabase.

    2 Enterthefollowingtext:

    EmployeeInformationForm

    Thetextappearsinthetopleftcornerofyourform.

    3 HighlightthetextyoujustenteredandopentheTextpropertiesboxbychoosing

    TextTextProperties.

    TheTextpropertiesboxopenstotheFonttab.

    4 OntheFonttab,chooseArial24points. ThetextchangestoArialfontand24pointslarge.

    5 ClicktheParagraphAlignmenttabandchoosethecenteredtextoption.

    Thetextiscenteredacrossthetopofthepage.

    6 ClicktheParagraphBordertabandchoosetheDoubleBorderstyle.SelectDropshadow.

    Aborderboxappearsaroundyourtext,runningthelengthoftheform.

    7 ClosetheTextpropertiesbox.

    8 Saveyourform.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 53

  • 7/25/2019 Lp trnh domino

    42/264

    Less o n 3 Wo rk i ng w i th Fo r ms

    Todeterminehowyourworklooksandbehavesinthetargetclient,previewyourworkinthesupportedWebbrowsersaswellasintheNotesclient.

    ForeachsupportedbrowserDominoDesignerfindsinstalledonyourPC,itaddsanicontothePreviewtoolbar.Clickingabrowsericonpreviewsthecurrentdesignelementintheassociatedbrowser.

    ThefollowinggraphicshowsthePreviewtoolbar.

    Previewingyourwork

    Followthesestepstopreviewyourwork.

    Step Action

    1 InDesigner,openthedesignelementyouwishtopreview.

    2 EitherchoosetheappropriatemenucommandsorclickoneofthePreviewbuttons.Themenucommandsareasfollows:

    DesignPreviewinNotes

    DesignPreviewinWebBrowser

    Result:Youarepromptedtosaveanychangestothedesignelement.Then,thedesignelementisopenedintheselectedclient.

    3 CloseorminimizethepreviewprogramandreturntoDesigner.

    54 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    43/264

    Less o n 3 Wo r k i ng w i th Fo r ms

    Atableisanelementyoucanusetoorganizecontentintorowsandcolumns.Usetablestoorganize,summarize,andalignelementssuchastext,fields,and

    graphics.

    Tablescanbecreatedin:

    Pages

    Forms

    Subforms

    Tablecells

    Typesoftables

    DominoDesignerprovidesfourtypesoftables.Thefollowingtabledescribesthesetypes.

    Display Description

    Basic Displaysdataorganizedintorowsandcolumns.Lookslikeagridorspreadsheet.

    Tabbed Displayseachrowofdataasaseparatetab.Usersviewinformationdisplayedintherowsbyselectingatab.

    Animated Displaysonerowofthetableatatimebasedona

    specifiedtimeinterval.AnimatedtablesarenotsupportedontheWebandarenotdesignedfordataentryonforms.

    Programmed Displaysadifferentrowofthetablebasedonanactionorfield.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 55

  • 7/25/2019 Lp trnh domino

    44/264

    Less o n 3 Wo rk i ng w i th Fo r ms

    (continued)

    Tablewidthoptions

    Whenatableiscreated,therearethreewidthoptionsavailable:Fitwithmargins,Fittowindow,andFixedwidth.

    Thefollowingtableliststheseoptionsandtheirresults.

    TableWidthOption Result

    Fitwithmargin Thetablefillsagivenbodysize,frommargintomargin.Thisisusefulwhennestingtableswithinoneanother.

    Fittowindow Thewidthofthetablewillfillthemargins

    regardlessofframesize.

    Fixedwidth Ameasuredcolumnwidthissetforthetable,regardlessofthesizeofthewindow.

    Creatingatable

    Followthesestepstocreateatable.

    Step Action

    1 OpenaforminDesigner.

    2 ChooseCreateTablefromthemenu.

    3 Specifythenumberofrowsandcolumnsforthetable.

    4 Specifythetablewidth.

    5 Selectatabletypebychoosingoneoftheoptions.

    6 ClickOK.

    7 Saveandpreviewtheform.

    56 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    45/264

    Less o n 3 Wo r k i ng w i th Fo r ms

    Afieldisapartofaformthatcollects,calculates,ordisplaysdata.Eachfieldstoresasingletypeofinformation.Thetypeofinformationafieldacceptsmustbe

    defined.

    Fieldsareusedto:

    Enterdataindocuments.

    Modifythecontentofdocuments.

    Viewdataindocuments.

    Calculatedatathroughformulas.

    Creatingformfields

    Completethesetaskstocreateformfields.

    Step Task

    1 Addthefieldtotheform.

    2 Namethefield.

    3 Specifydatatype.

    4 Specifyhowthefieldispopulated.

    5

    Setadditionalfieldproperties,and/or

    6 Optionallyprogramfieldcontents.

    7 Savetheform.

    8 Testtheforminvariousclients.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 57

  • 7/25/2019 Lp trnh domino

    46/264

    Less o n 3 Wo rk i ng w i th Fo r ms

    (continued)

    Specifyingfieldcharacteristics

    Whenyoucreatefields,specifyatleastthefollowingcharacteristics:

    Fieldname

    Fieldtype

    Howthefieldispopulated

    EachofthesecharacteristicsisspecifiedusingtheFieldpropertiesbox.

    Addingafieldtoaform

    Followthesestepstoaddafieldtoaform.

    Step Action

    1 Placethecursoratthedesiredlocationontheform.

    2 ChooseCreateFieldfromthemenu.

    Alternatively,right-clicktheformandchooseCreateField.*

    Result:Dominoaddsafieldtotheformandopensthefields

    propertiesbox.

    3

    EnteranameforthefieldontheFieldInfotabinthepropertiesbox.

    4 SpecifythefieldtypeontheFieldInfotabinthepropertiesbox.

    *Note:Likemanyapplications,therecanbeseveraloptionsforperformingatask.Inthiscourseweusethemenubaroptionforconsistency.However,feelfreetochoosewhichevermethodyouaremostcomfortablewith.

    58 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    47/264

    Less o n 3 Wo r k i ng w i th Fo r ms

    (continued)

    Namingfields

    Eachfieldinaformmusthaveauniquenameinthatform.Usethefollowingrulesandguidelineswhennamingfields.

    Fieldnamescannot:

    Exceed32characters.

    Beginwithanumber.

    Usethe@symbol.

    Containspaces.

    Caution

    Fieldnamescanbeginwithdollarsigns($).However,thistypicallyindicatesareservedfieldname.Thesetypesoffieldsaddfunctionalitythatyouwouldotherwisehavetoprogramyourself.Ifyoutrytouseareservednameinawaythatisdifferentfromitsintendeduseorredefinethefield,DominoDesignerdisplaysanerrormessage.

    Specifyingthetypeofdataforafield

    Thefieldsdatatypedeterminestwothings: Whattypeofinformationthefieldcancontain

    Howthefieldispopulated

    Fieldscancontainsomeofthefollowingtypesofdata:

    Text

    Numbers

    Dateandtime

    Formulas

    Richtext

    AmorecompletelistmaybefoundinDominoDesignerHelp.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 59

  • 7/25/2019 Lp trnh domino

    48/264

    Less o n 3 Wo rk i ng w i th Fo r ms

    (continued)

    Specifyinghowthefieldispopulated

    Whenyouindicatethetypeofdataafieldcontains,youalsoindicatehowthefieldgetsitsvalue.

    Thefollowingtableliststhefieldvalueoptionsandtheirpurpose.

    HowtheFieldValueIs

    Created

    ValueIs...

    Editable Enteredbytheuser.Therecanbeadefaultentrybasedonaformula.

    Computed Createdastheresultofacalculation.Fieldsarecalculated

    when: Saving

    Refreshing

    Changingmodes

    Computedfordisplay Createdastheresultofacalculation.

    Dominodoesnotstoretheresultwiththedocument.Itcalculatesthevalueeachtimeusersrefreshthedocument.

    Computedwhencomposed

    Createdwhenthedocumentiscreated.

    Note:Ifthefieldisaddedtoaform,afterdocumentshavebeencreated,thevalueiscalculatedthenexttimeoneof

    thesedocumentsisopened.

    Designconsiderationswhenaddingfields

    Beforeaddingfieldstoaform,determinethefollowing:

    Thetypeofdatathatyouwanttocapture(text,number,date,andsoon).

    Logicalpositionoffieldsontheform(considerdataentryflow).

    Howtoidentifytousersthepurposeofthefield(forexample,fieldlabels).

    Howthedatashouldappeartothereader.

    Howtoidentifythefieldforyourselfwhendesigningtheapplication(fieldname).

    LotusDominoprocessesformsfromthetop-lefttothebottom-right.Keepthisinmindifyoucreatefieldswhosecalculationsaredependentuponotherfieldsontheform.

    60 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    49/264

    Less o n 3 Wo r k i ng w i th Fo r ms

    DominoDesignerallowsyoutospecifythetypeoftextdataafieldwillstore.Thetypesoftextdatainclude:

    Text

    Richtext

    Lists

    Names

    Usingtextfields

    Atextfieldiseditablebydefault.Userscanenterandviewalphanumericdatain

    thistypeoffield.Oneexampleofatextfieldisafieldusedtocollectordisplayacustomername.

    Textfieldshavethefollowingcharacteristics:

    Thedisplayformatisdefinedbythefieldontheform.

    Thefieldlengthisnotfixed.

    Thefieldcontentcanbedisplayedinaview.

    Usingrichtextfields

    Arichtextfieldstorescomplexdata.AnexampleofarichtextfieldistheBodyfieldusedinthemailmemo.

    Richtextfieldshavethefollowingcharacteristics:

    Storemanytypesofdata,includinggraphics.

    Storeformattingwiththedata.

    Cannotdisplayinaview.

    UsingNativeOSstyle

    NativeOSisastyleselectedontheFieldInfotabintheFieldpropertiesbox.TheNativeOSstylehasauser-friendlyinterfacefortextfields.Forexample,Editabletextfieldsappearonthedocumentasafixed-sizedoutlinedboxinsteadofasablankspacemarkedoffbybrackets.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 61

  • 7/25/2019 Lp trnh domino

    50/264

  • 7/25/2019 Lp trnh domino

    51/264

    Less o n 3 Wo r k i ng w i th Fo r ms

    (continued)

    Usinglistfields

    Listfieldspresentuserswithalistofpre-definedchoices.Sometypesoflistfieldsallowtheselectionofasinglechoice,multiplechoices,orchoicesnotinthelist.

    Thefollowingtabledescribesthelisttypesavailableandwhentousethem.

    UseThisTypeofField IfYouWanttheUsertoSelect

    Dialoglist Oneormorechoicesfromapop-updialogbox,ortoaddachoicenotinthelist.

    Checkbox Oneormorechoicesfromashortlist.

    Radiobutton Onlyonechoicefromashortlist.

    Listbox Oneormorechoicesfromascrollinglist.

    Combobox Onechoicefromadrop-downlist,ortoaddachoicenotinthelist.

    Creatingalistofchoices

    Followthesestepstocreateafieldwithalistofchoices.

    Step

    Action

    1 Placethecursoratthedesiredlocationontheform.

    2 ChooseCreateFieldfromthemenu.

    Enteranameforthefieldandchooseoneofthelistfieldtypes.

    3 ClicktheControltab.

    4 Selectoneofthelistchoices:

    Enterchoices(oneperline)

    Useformulaforchoices

    Note:Dialoglistshaveseveralmorechoiceoptions.

    5 Entereitherthelistchoicesoraformula.

    6 Saveandpreviewtheform.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 63

  • 7/25/2019 Lp trnh domino

    52/264

  • 7/25/2019 Lp trnh domino

    53/264

    Less o n 3 Wo r k i ng w i th Fo r ms

    (continued)

    Createandsetadefaultvalueforalistfield

    InthisGuidedPractice,youwillcreateseverallistfieldsandsetdefaultvaluesforthem.FollowthesestepstocompletetheGuidedPractice.

    Step Action Result

    1 OpentheEmployeeInformationforminDesigner.

    TheformappearsintheWorkpane.

    2 Addthefollowingfieldlabelbelowthetable:

    EmploymentStatus

    Thetextisinserted.

    3

    Addafieldnexttothetext.

    Anewfieldisinserted.

    4 OpentheFieldpropertiesbox.Addthe followingcharacteristicson theFieldInfotab:

    Name:EmploymentStatus

    Type:Listbox,Editable

    Thenameandfieldtypesareset.

    5 OntheControltab,enterthefollowingchoices:

    Fulltime

    Parttime

    Contractor

    Thelistchoicesareset.

    6 FromtheObjectstabintheProgrammerspane,selecttheDefaultValueobject.

    Justabovethescriptarea,thetextEmploymentStatus(Field):DefaultValuedisplays.

    7 IntheScriptarea,enterthedefaultvalueFulltimeandselectthecheckbox.

    ThevalueisenteredintheScriptarea.

    8 RepeatSteps2through5andaddanother list fieldwith the followingcharacteristics:

    Name:Department

    Type:Listbox,EditableChoices:Administration,

    R&D,Manufacturing

    9 Saveandtesttheform.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 65

  • 7/25/2019 Lp trnh domino

    54/264

  • 7/25/2019 Lp trnh domino

    55/264

    !

    Less o n 3 Wo r k i ng w i th Fo r ms

    Createanumberfieldwhenthedatathatuserswillenterisnumeric.LotusDominocanusedatainanumberfieldtoperformmathematicalcalculations.

    Numberfieldsrecognizethefollowing:

    Numerals0through9

    Plus(+)andminus(-)signs

    Decimalpoint(.)

    Scientificnotation(E)

    Numberfieldscanbeeditable,computed,computedfordisplay,orcomputedwhencomposed.

    Settingthestyleofanumberfield

    Followthesestepstosetthestyleofanumberfield.

    Step Action

    1 Createthefield.

    2 IntheBasicstabofthefieldsPropertiesbox,selectNumberasitstype.

    3 ClicktheControltabtosetthestyle.

    Usingadefaultvaluefornumericfields

    Caution

    Ifanumericfieldissavedwithablank,anerrorwilloccurifyoutrytocomputeavaluebasedonit.Ablankvalueisrepresentedbytwoquotationmarks,"",andevaluatestoatextstring.

    Toensurethatnumericfieldsmaintaintheproperdatatype,setanappropriatedefaultvalueintheProgrammerspane.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 67

  • 7/25/2019 Lp trnh domino

    56/264

  • 7/25/2019 Lp trnh domino

    57/264

    # $ " %&

    Less o n 3 Wo r k i ng w i th Fo r ms

    Hide/Whenisapropertythatcontrolswhenanelementisvisibletousersoraspecificsetofusers.TheHide/Whenoptionhidestheentirerowwherethe

    selectedfield,text,orgraphicislocated.However,iftheitemisinsideatablecell,onlythecontentsofthecellarehidden.

    SomeelementsthatcontainHide/Whenfunctionalityare:

    Text

    Fields

    Graphics

    Thefollowingtabledetailstheoptionsavailableforhidingelements.

    Option Description

    Previewedforreading

    ThehiddeninformationisnotvisiblewhenusersreaddocumentsinthedocumentPreviewpane.

    Previewedforediting ThehiddeninformationisnotvisiblewhenusersworkondocumentsinEditmodeinthedocumentPreviewpane.

    Openedforreading ThehiddeninformationisnotvisiblewhenusersopendocumentsinReadmode.Afieldthatcannotbereadcannotbeprintedorcopiedtotheclipboard.

    Openedforediting ThehiddeninformationisnotvisiblewhenusersworkondocumentsinEditmode.

    Printed Thehiddeninformationisnotvisibleonprinted

    documents.

    Copiedtotheclipboard Thehiddeninformationisnotvisiblewheninformationiscopiedtoandpastedfromtheclipboard.

    Embedded Thehiddenelementisnotvisiblewhenthedocumentisanembeddeddocument.

    Hideparagraphifformulaistrue

    Aformuladeterminesthecircumstancesinwhichinformationishidden.

    ItisimportanttonotethattheHide/Whenoptionisnotasecurityfeature.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 69

  • 7/25/2019 Lp trnh domino

    58/264

    Less o n 3 Wo rk i ng w i th Fo r ms

    # $ " %& (continued)

    ConditionsforusingHide/Whenoptions

    Whendeterminingwhetherornottohideafield,askthefollowingquestions:

    Isitappropriateforalluserstoseethisdata?

    Dousersneedtoseethedataatalltimes?

    Forexample,WorldwideCorporationhasastandardformfilledwithinformationabouttheiremployees.Whenamanageropensanemployeesprofile,shedoes not

    needtoseeallthecompanydepartments,justtheonetowhichtheemployeebelongs.Ontheotherhand,whennewemployeesareadded,oranexistingemployeesinformationisupdated,itwouldbehelpfultoseeallthedepartments.

    Thefollowingtableoutlinesconditionstohideinformation.

    IfUsersAre... Then...

    Readingadocument Hideinformationthatisusefulonlywhenuserscreateoreditdocuments.

    Editing,creating,orprintingdocuments

    Hideinformationthatisusefulwhenusersreaddocuments.

    Inthepreviousexample,theDepartmentfieldisalistfield.Inordertoviewthelistfieldwhileeditingandtheresultingdatawhenreading,createthefollowingtwofields:

    AlistfieldcontainingalltheWorldwideCorporationdepartments

    Acomputedfordisplayfieldtodisplaytheresultingvalue

    70 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    59/264

    Less o n 3 Wo r k i ng w i th Fo r ms

    # $ " %& (continued)

    DisplayingtheselectedvalueofalistfieldinReadmode

    FollowthesestepstosetHide/Whenoptionsforalistfield.

    Step Action

    1 Createaneditablelistfield.

    2 SetthepropertiesontheParagraphHide/Whentabsothatthelistfieldishiddenwhenthedocumentis:

    Previewedforreading

    Openedforreading

    3 CreateanotherfieldandsetthefieldtypetoComputedfordisplay.

    4 SetthepropertiesontheHide/Whentabsothatthecomputedfieldishiddenwhenthedocumentis:

    Previewedforediting

    Openedforediting

    5 IntheProgrammerspane,selecttheValueobjectforthecomputedfieldfromtheObjectstab.

    6 IntheScriptarea,enterthenameofthelistfield.

    7 Savetheform.

    8 Testtheform.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 71

  • 7/25/2019 Lp trnh domino

    60/264

    Less o n 3 Wo rk i ng w i th Fo r ms

    # $ " %& (continued)

    SetHide/Whenproperties

    InthisGuidedPracticeyouwillcreateafieldnamedDEmploymentStatus(theDinfrontofthefieldnameindicatesthatthefieldisfordisplayonly)andsettheappropriateHide/WhenpropertiessothattheEmploymentStatuslistfielddisplayswhenthedocumentisneworinEditmode,andtheDEmploymentStatusfieldisdisplayedwhenthedocumentisinReadmode.

    FollowthesestepstocompletetheGuidedPractice.

    Step Action Result

    1 AddlabeltextandafieldonthelinebelowtheEmploymentStatusfieldthathasthefollowingcharacteristics:

    Labeltext:EmploymentStatus

    FieldName:DEmploymentStatus

    FieldType:Text,Computedfordisplay

    Thenewfieldiscreated.

    2 TosetthevalueofDEmploymentStatus:

    Highlightthefield.

    IntheScriptareaoftheProgrammerspane,enterEmploymentStatus.

    ThedefaultvalueforthenewfieldissettothevalueoftheEmploymentStatusfield.

    3 TosetHide/Whenpropertiesforthenewfield:

    Highlightthefield. IntheFieldpropertiesbox,clickthe

    ParagraphHide/Whentab.

    SelectPreviewedforEditingandOpenedforEditing.

    ThefieldwillonlydisplaywhentheformisinRead

    mode.Itwillnotdisplaywhentheuseriseditingthedocument.

    4 TosettheHide/WhenpropertiesfortheEmploymentStatusfield:

    Highlightthefield.

    OpentheFieldpropertiesbox.

    ClicktheParagraphHide/Whentab.

    ChoosePreviewedforReadingand

    OpenedforReading.

    ThefieldwillonlydisplaywhentheformisinEditmode.Itwillnotdisplaywhentheuserisreadingthedocument.

    5 Saveandtestthedesignchanges.

    Createfourorfivedocumentsusingthis

    form.

    TheEmploymentStatusfielddisplaysinEditmode.TheDEmploymentStatus fielddisplaysinReadmode.

    72 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    61/264

    Less o n 3 Wo r k i ng w i th Fo r ms

    !

    WorldwideCorporationisintheprocessofcreatingorganizationalpolicies.Inthisexerciseyouwillcreateadatabaseandtheformthatwillbeusedtoenterthecompanyspoliciesandprocedures.

    Completethesetasks

    Performthefollowingtaskstocompletethisexercise:

    Createanewblankdatabase.NameitPolicies.nsf.

    Createanewforminthenewdatabase.NameitPolicy.

    TitletheformPoliciesandProcedures.

    Formatthetitle.

    Useatabletoorganizethefollowingfieldsandfieldlabels.

    Addthefollowingfieldlabelsandfieldnamestocollectand/ordisplaythefollowinginformation:

    PolicyNumber:PolicyNo

    PolicyTitle:PolicyTitle

    EffectiveDateofthepolicy:EffectiveDate

    PolicyDescription:Description

    PolicyCategory:CategoryThecategoriesareOfficeGuidelines,Benefits,Holidays,andGrievanceProcedures.

    Thecategoryshoulddisplaywhenthedocumentisinthereadmode,whileallthecategoriesshouldbevisiblewhenthedocumentisineditmode.

    Testtheform.

    Createseveraldocumentsfromthenewformtoseeifthecorrectinformationisgatheredanddisplayed.ClosethedocumentandreopenittotesttheCategoryfieldfunctionality.

    Note:Thedatabasewillcontainadefaultview.Allofthedocumentsyoucreate

    willappearinthisview.Youwillcreateacustomizedviewinthenextlesson.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 73

  • 7/25/2019 Lp trnh domino

    62/264

  • 7/25/2019 Lp trnh domino

    63/264

    ( ! '

    Les so n 4 Wo rk i ng Wi t h V i ew s

    ThepurposeoftheViewdesignelementistocreateanorganizedlistofdocumentssothatuserscanfindtheinformationtheyneed.Viewsareoneofthe

    entrypointstothedocumentsstoredinaDominodatabase.Alldatabasescontainatleastoneview.However,mostdatabasescontainmorethanoneview.

    ThefollowinggraphicrepresentstheViewdesignelement.

    Characteristicsofaview

    Thefollowinglistdescribessomeofthecharacteristicsofviews:

    Aviewisalistofdocumentsinadatabase.

    Eachrowinaviewrepresentsadocumentinthedatabase.

    Eachcolumndisplaysinformationfromoraboutthedocumentinthatrow.

    Aviewmayincludealldocumentsorasubsetofdocumentsbasedonselectioncriteria.

    Usersreadtheinformationintheviewtolocatespecificdocuments.

    Excessivenumbersofviewsandpoorlydesignedviewscanhaveaseriousimpactondatabaseperformance.

    Viewsshouldbedesignedearlyintheapplicationdevelopmentprocess.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 75

  • 7/25/2019 Lp trnh domino

    64/264

    Less o n 4 Wo rk i ng Wi t h V i ew s

    ( ! ' (continued)

    HowDominostoresaview

    Dominousesaninternalfilingsystemcalledtheviewindextostorethelistofdocumentsinaview.Endusersanddesignersneverworkdirectlywiththeviewindex.ItisbuiltandmaintainedbytheDominoapplication.

    ThefollowingtabledescribeshowDominobuildsaview.

    Stage Description

    1 Theapplicationdevelopercreatestheviewdesign.

    2 Dominopullsinformationfromdocumentsaccordingtothedesignandbuildsaviewindex.

    3

    Dominodisplaystheinformationtousers.

    ThefollowinggraphicshowshowDominobuildsaview.

    76 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    65/264

    Les so n 4 Wo rk i ng Wi t h V i ew s

    ( ! ' (continued)

    HowDominobuildsaview

    ThefollowingdiagramillustrateshowDominobuildsaview.

    TheNotesIndexFacility

    TheNotesIndexFacility(NIF)resideswithinaDominodatabase.TheNIFisresponsibleforalltasksthatkeepdocumentsorderedwithineachdatabaseview.SomeoftheNIFfunctionsinclude:

    Openandclosecollections. Updatetheindex.

    Locatenoteswithinanindex.

    Locateindexentries.

    Updatecollections.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 77

  • 7/25/2019 Lp trnh domino

    66/264

    Less o n 4 Wo rk i ng Wi t h V i ew s

    ( ! ' (continued)

    Minimizingthenumberofviews

    Eachviewbuildsitsowncollectionandrelatedindex,withallthecollationsorsortsyouhavespecified.Whenpreparingaviewfordisplaytoaclient,keepinmindthatitismuchfasterforDominotoreorderacollectionthatisalreadyopen(differentsortsinsameview)thantoopenandorderadifferentcollection(differentviews).

    UsetheClickoncolumnheadertosortpropertytominimizethenumberofviewsandmaximizethesortingwithinthoseviews.

    ThefollowingillustrationshowstheClickoncolumnheadertosortproperty.

    78 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    67/264

  • 7/25/2019 Lp trnh domino

    68/264

    Less o n 4 Wo rk i ng Wi t h V i ew s

    '

    Whendesigningaview,startbycreatinganinitialviewdesign.Theinitialviewdesignincludes:

    Creatingtheview

    Namingtheview

    Determiningtheviewtype

    Controllinghowtheviewwillappearintheviewlist

    Settingtheviewselectionconditions

    Creatingaview

    FollowthesestepsinDominoDesignertocreateanewview.

    Step Action

    1 IntheDesignpane,clickViews.

    2 IntheWorkpane,clickNewView.

    3 IntheCreateViewdialogbox,settheinitialviewproperties.ClickOK.

    Result:DominocreatestheviewandaddsittothelistintheWorkpane.

    80 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    69/264

    Les so n 4 Wo rk i ng Wi t h V i ew s

    ' (continued)

    Guidelinesforsettinginitialviewproperties

    Thefollowingareguidelinesforsettingtheinitialviewproperties.

    Property Guidelines

    Viewname Useashort,descriptivenameindicatinghowthevieworganizesdocuments.

    Type SelectShared,tocreateaviewmanyuserswillaccess.

    SelectShared,containsdocumentsnotinanyfolders,iftheusertypicallystoresdocumentsinfoldersandwantstofindallothersquickly.

    SelectShared,containsdeleteddocumentsforuserstodragoutofthetrashtoafolder,orundelete,ifthesoftdeletionsoptionhasbeenactivated.

    SelectPrivatetocreateapersonalviewforasingleuser.

    SelectShared,private-on-first-useviewstodistributeviewsthatbeginasshared,butchangetoprivateonceauserhasaccessedandsavedtheview.

    Note:Youcannotchangethetypeonceyoucreateaview.

    Location Useuptotwolevelsinahierarchy.

    Groupviewsthatincludethesamedocumentstogether.

    Createacascadedlistofviews.

    Note:Enteringabackslash(\)afteraviewsnamewithanewnameaccomplishes thesamecascadedviewmenu.

    Copystylefrom Usethedesignofanotherviewinthecurrentdatabaseasatemplate.

    Selectionconditions

    Leavetheconditionblanktoincludealldocumentsinthedatabase.

    ClickAddConditionandusetheSearchBuildertospecifycriteriaforincludingasubsetofdocumentsintheview.

    Changetheselectionconditionsafteryoucreatetheview.

    Note:Itisbettertohaveonewell-designedviewthanadozenpoorly-designed

    views.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 81

  • 7/25/2019 Lp trnh domino

    70/264

    Less o n 4 Wo rk i ng Wi t h V i ew s

    ' (continued)

    Creatinganaliasforaview

    Followthesestepstosetpropertiesaftercreatinganewview.

    Step Action

    1 OpentheviewinDominoDesigner.

    2 OpentheViewpropertiesbox.

    3 OntheBasicstab,enteranAliasandComment.

    82 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    71/264

    Les so n 4 Wo rk i ng Wi t h V i ew s

    ) ! ! '

    Addselectionconditionstocontrolwhichdocumentsaviewincludes.

    Addingselectionconditionstoaview

    Followthesestepstoaddselectionconditionstoaview.

    Step Action

    1 OpentheviewinDominoDesigner.

    2 IntheObjectlistoftheProgrammerspane,clickViewSelection.

    3 IntheInfolistoftheProgrammer'spane,ensurethatthedefaultisSimple

    Search.Result:AnAddConditionbuttonisaddedtothebottomofthescriptareaintheProgrammerspane.

    4 IntheScriptarea,clickAddCondition.

    Result:TheAddConditiondialogboxopens.

    5 IntheAddConditiondialogbox,createacondition.ClickAdd.

    6 RefreshtheviewindexinDesigner.

    Result:Designerrebuildstheviewindexwiththenewselectioncondition.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 83

  • 7/25/2019 Lp trnh domino

    72/264

    Less o n 4 Wo rk i ng Wi t h V i ew s

    ) ! ! ' (continued)

    SpecifyingconditionsintheAddConditiondialogbox

    ThefollowingtabledescribesthetypesofconditionsyoucanspecifyintheAddConditiondialogbox.

    UsetheCondition... ToFindDocuments...

    ByAuthor Whoseauthorisorisnotaspecifieduserorusers.DocumentsmusthaveanAuthorsfield.

    ByDate Thatwerecreatedormodified:

    On,after,before,ornotonaspecifieddate

    Inthelast,inthenext,olderthan,orafterthenextspecifiednumberofdays

    Betweenornotbetweenaspecifiedrangeofdates

    ByField Thathaveafieldthatcontainsordoesnotcontainaspecifiedvalue.

    ByForm WhoseFormfieldcontainsthespecifiedformname.

    Filloutexampleform WhoseFormfieldcontainsthespecifiedformnameandwhosefieldshavematchingconditions.Onlyfilloutthefieldsthatarerelevanttoyoursearch.

    InFolder Inthespecifiedfolder.

    MultipleWords Thathaveany,orall,ofuptoeightterms,wordsorshort

    phrases.

    Note:AddConditionisatoolusedmainlybyenduserstosimplifysettingviewconditions.Itdoesnotreplaceformulas.Developersshouldusetheselectstatement.FormulabuildingwillbediscussedinModuleC:ProgramminginDominoApplications.

    84 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    73/264

    Les so n 4 Wo rk i ng Wi t h V i ew s

    ) ! ! ' (continued)

    Createaviewwithanalias

    InthisGuidedPractice,youwillfirstcreateaviewthatislimitedtodocumentscreatedusingtheEmployeeInformationform.

    Followthesestepstocreatetheviewandlimitthedocumentsintheview.

    Step Action Result

    1 OpenthePracticedatabase.

    2 ClickViewsintheWorkpane.

    3 ClickNewView. Thecreateviewboxopens.

    4

    Choosethefollowingoptions: Name:EmployeeInformation

    ViewType:Shared

    Location:Views

    Copyfrom:Blank

    Selectcondition:None

    ClickOK.

    AnewblankviewiscreatedanddisplayedintheWorkpane.

    5 Double-clicktoopentheviewyoujustcreated.

    AblankviewopensintheWorkpane.

    6

    IntheViewpropertiesInfotab,enterthefollowing:

    Alias:ei

    Comment:Thisisthefirstpracticeview.

    7 ClosetheViewpropertiesbox.

    (continuedonnextpage...)

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 85

  • 7/25/2019 Lp trnh domino

    74/264

    Less o n 4 Wo rk i ng Wi t h V i ew s

    ) ! ! ' (continued)

    Createaviewwithanalias...

    Step Action Result

    8 IntheInfolistoftheProgrammer'spane,ensure thatAddConditionisselected.

    9 IntheScriptarea,clickAddCondition.

    TheAddconditionbuttonappearsatthebottomoftheProgrammerspane.

    10 IntheAddConditiondialogbox,choosethefollowing:

    Condition:Byform

    Searchfordocumentswhichuseform:EmployeeInformation

    ClickAdd.

    TheconditionappearsintheProgrammerspane.

    11 Previewyourchanges. OnlydocumentscreatedusingtheEmployeeInformationformshouldappear.

    12 Closetheview.ClickYestosavetheview.

    Yournewview,itsaliasandcommentappearsintheviewlist.

    86 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    75/264

  • 7/25/2019 Lp trnh domino

    76/264

  • 7/25/2019 Lp trnh domino

    77/264

  • 7/25/2019 Lp trnh domino

    78/264

    Less o n 4 Wo rk i ng Wi t h V i ew s

    & * ( ' (continued)

    Addandformatviewcolumns

    InthisGuidedPracticeyouwillmodifytheEmployeeInformationviewtoshowemployeesnamesanddepartments.

    Followthesestepstoaddandformatviewcolumns.

    Step Action Result

    1 InthePracticedatabase,opentheEmployeeInformationviewinDesigner.

    TheviewopensintheWorkpane.

    2 Selectthefirstcolumnandchoose

    FieldintheProgrammerspane.

    The Programmers pane displays all

    thefieldsavailableinthePractice.nsfdatabase.

    3 ChoosetheLastNamefield.

    4 Double-clickthecolumnheadertoopen theColumn propertiesbox,

    andenterthetitle:LastName

    ThecolumntitlechangestoLastName.

    5 InsertacolumntotheleftoftheLastNamefieldwiththefollowingfeatures:

    Field:FirstName

    Columntitle:FirstName

    TheFirstNamecolumnappearstotheleftoftheLastNamecolumn.

    6 AppendacolumntotherightoftheLastNamecolumnwiththefollowingfeatures:

    Field:Department

    Columntitle:Department

    TheDepartmentcolumnappearstotherightoftheLastNamecolumn.

    7 AppendacolumntotherightoftheDepartmentcolumnwiththefollowingfeatures:

    Field:Salary

    Columntitle:Salary

    TheSalarycolumnappearstotherightoftheDepartmentcolumn.

    8

    SelecttheTitletab.ChooseCenter,Bold,andApplytoall.

    Alltheviewcolumntitlesarecenteredandbold.

    9 ClosetheColumnpropertiesbox.

    10 Previewyourchanges.

    90 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    79/264

    Les so n 4 Wo rk i ng Wi t h V i ew s

    % + ! '

    Onceyouhaveaddedcolumnstodisplayrelevantinformationfortheusers,organizethelistofdocumentssouserscanlocateaspecificdocumentquickly.

    ThesortingtabintheColumnpropertiesboxprovidesseveraldifferentwaystoorganizedocumentsinaview.

    Therearetwotypesofsortoptionsyoucanchoose:

    Standard:Sortsdocumentsbythecolumnvalueinascendingordescendingorder.

    Categorize:Groupstogetherdocumentswiththesamecolumnvalues.

    Whenyousortorcategorizeacolumn,youarechangingtheorderinwhichtheviewdisplaysthedocumentstousers.

    Sortedcolumns

    Asortedcolumndisplaysdocumentsinaspecificorder.Thefollowingtabledescribeshowaviewsortsdifferenttypesofvalues.

    ColumnsThatDisplay... SortDocuments...

    Textvalues Alphabetically

    Numbervalues Numerically

    Date/timevalues Chronologically

    Ifthecolumnbeingsortedcontainstext,therearetwootheroptionsthatcouldbeuseful:

    Case-sensitivesorting:Sortslowercaselettersbeforeuppercaseletters.Forexample,"ab"sortsbefore"Aa."

    Accent-sensitivesorting:Sortsaccentedcharactersafternon-accentedcharacters.Forexample,"ab"sortsbefore"a."

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 91

  • 7/25/2019 Lp trnh domino

    80/264

    Less o n 4 Wo rk i ng Wi t h V i ew s

    % + ! ' (continued)

    Sortingdocumentsbycolumnvalue

    Followthesestepstosortdocumentsbasedonthecontentsofacolumn.

    Step Action

    1 Selectthecolumnyouwanttosort.

    2 OpentheColumnpropertiesbox.

    3 ClicktheSortingtab.

    4 SelectNone,Ascending,orDescending.

    5 Setoptionalpropertiestorefinethesort:

    Case-sensitivesorting Accent-sensitive sorting

    Clickcolumnheadertosort

    92 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    81/264

    Les so n 4 Wo rk i ng Wi t h V i ew s

    % + ! ' (continued)

    User-sortedcolumns

    Thesortcolumnfeatureallowsenduserstoclickonthecolumnheadertochangethecolumnssortorder.ThisoptionisavailableintheSortingtaboftheColumnpropertiesbox.

    Thefollowingtabledescribesthedifferentendusersortcontroloptions.

    Option Function

    Ascending Anupward-pointingtriangleappears inthecolumnheader.Usersclicktheheadertosortinascendingorderorreverttotheoriginalorder.

    Descending

    Adownward-pointingtriangleappearsinthecolumnheader.Usersclicktheheadertosortindescendingorderorreverttotheoriginalorder.

    Both Atwo-headedtriangleappearsinthecolumnheader.Usersclicktheheadertocyclebetweenascending,descending,andtheoriginalsortorder.

    SecondarySortColumn Designateasecondcolumntosorttheviewfurther.Forexample,iftheprimarysortcolumnislastname,thesecondarycouldbethefirstname.

    Note:Thiscolumncanbesortedineitherascendingordescendingorderonly.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 93

  • 7/25/2019 Lp trnh domino

    82/264

    Less o n 4 Wo rk i ng Wi t h V i ew s

    % + ! ' (continued)

    Setsortcolumns

    InthisGuidedPracticeyouwillmodifytheEmployeeInformationviewsouserscansorttheviewbylastname,thenfirst,ifnecessary.

    Followthesestepstocreateuser-sortedcolumns.

    Step Action Result

    1 InthePracticedatabase,opentheEmployeeInformationviewinDesigner.

    TheviewopensintheWorkpane.

    2 Double-clicktheLastName

    columntoopentheColumnpropertiesbox.

    TheColumnpropertiesboxopens.

    3 ClicktheSortingtabandmakethefollowingselections:

    Clickoncolumnheadertosort:

    Both

    Secondarysortcolumn:FirstName

    Order:Ascending

    TheLastNamecolumnhasatwo-headedarrowinthecolumntitleheader.

    4 Previewyourchanges.

    94 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    83/264

  • 7/25/2019 Lp trnh domino

    84/264

    Less o n 4 Wo rk i ng Wi t h V i ew s

    % + ! ' (continued)

    Guidelinesforformattingcategorizedcolumns

    Aviewdisplaysthecolumnvalueofacategorizedcolumninitsownrow.

    Thefollowingtablelistssomebestpracticeguidelinestofollow,andtheirexplanations.

    Guideline Why

    Donotuseatitleforthecolumn. Thecolumnvaluesappearintheviewandshouldbeself-explanatory.Acolumn titlewouldberedundant.

    Setthewidthofthecolumnto1. Thishelpssaveroomintheviewtosee

    moredata.

    Showtwistieswhentherowisexpandable.

    Thissimplifiesexpandingandcollapsingdifferentcategoriesforendusers.

    Useboldandcolortomakethecategorizedcolumnvaluestandoutfromotherinformationintheview.

    Thishelpstheuserdifferentiatebetweenthecategoryheadersandthedocuments.

    96 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    85/264

    '

    UsetheViewpropertiesboxtoformattheview.

    Lesso n 4 Wo rk i ng Wi t h V i ew s

    Formattingaview

    ThefollowingtabledescribessomeofthepropertiesintheViewpropertiesbox.

    Tab SetPropertiesto...

    Options Opentheviewbydefaultwhenthedatabaseopens.

    Specifythisviewasthedefaultforallnewviews.

    Specifyhowtheviewdisplaysthedocumentswhenitopens.

    Style

    Applycolortotheviewsbackground. Applyanimagetotheviewsbackground.

    Displayalternaterowsindifferentcolors.

    Displaytotalsinthecolumn.

    Setrowspacing.

    Advanced DeterminewhenDominorefreshestheviewindex.

    SetcolorsforlinksinaWebbrowser.

    Security Listuserswhowillusetheviewinthedatabase.

    Note:Thisoptiondoesnotpreventusersfromseeingdata inthedocumentsdisplayedintheview.Userscouldselecttodisplaythe

    samedocumentsinanothervieworfolderthattheycreate.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 97

  • 7/25/2019 Lp trnh domino

    86/264

    Less o n 4 Wo rk i ng Wi t h V i ew s

    + ' !

    WorldwideCorporationwantstoprovideanewwayoforganizingitspoliciesand

    proceduresinthePoliciesandProceduresapplication.Theviewshoulddothe

    following:

    ListdocumentscreatedwiththePolicyform.

    Displaythetitleofthepolicyanditseffectivedate(inthatorder).

    Organizethedocumentsbythetypeofpolicy(Guidelines,Holidays,andsoon).

    Completethesetasks

    Performthefollowingtaskstocompletethisexercise:

    Buildaviewaccordingtotherequirementsstatedabove.

    NametheviewPolicies.

    TesttheviewinNotes.

    98 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    87/264

  • 7/25/2019 Lp trnh domino

    88/264

    Less o n 5 Wo rk i ng w i th Pa g e s

    ,

    ThepagedesignelementissimilarinconceptandusagetoastaticHTMLpage.Dominopagesstructureanddisplay information that remains relativelystable.

    Applicationusersdonotcreatepagesoraddcontenttopages,butusethemtodiscoverinformationandnavigatethroughasiteorapplication.

    Pagescanconsistofthefollowing:

    Information

    Organizingelements

    Programmableelements

    Navigationalelements

    Caution

    Alloftheelementsavailabletopagesareavailabletoforms;however,not

    allelementsavailabletoformsareavailabletopages.

    Typesofinformationonapage

    Thefollowingtableliststhetypesofinformationthatcanbeincorporatedona

    page.

    Element Description

    Text Staticdatasuchasacompanyname

    Graphics ImagessuchasGIF,JPEG,andBMPfiles

    Organizingelements

    Thefollowingelementscanbeusedtoorganizeanddisplayinformationonapage.

    Element

    Description

    Tables Informationorganizedinrowsandcolumns

    Sections Collapsibleandexpandableareasthatcanincludetext,graphics,andobjects

    Layers Controltheplacement,size,andcontentofinformationinoverlappingblocks.

    100 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    89/264

  • 7/25/2019 Lp trnh domino

    90/264

    Less o n 5 Wo rk i ng w i th Pa g e s

    , (continued)

    DisplayingpagesinDominoDesigner

    Pagescanbedisplayedtotheuserinseveralways:

    Aspartofaframeset

    Asalinkfromaform,subformoutline,oranotherpage

    Fromanaction

    Asanoutlineentrythatdisplaysthepage

    Examineapage

    Followthesestepstoexamineapage,itselements,andproperties.

    Step Action Result

    1 IntheDesignpane,selectPages. AlistofpagesappearsintheWorkpane.

    2 Double-clicktheFirstLookpagetoopenit.

    TheFirstLookpageopens.

    3 ChooseDesignPageProperties. ThePagepropertiesboxopens.

    4 Clickthefollowingelementstosee

    thedifferentpropertiesboxes:

    TheIBMlogo

    Thepicture

    Thetext

    Thepropertiesboxchangesto

    PicturesandText.

    5 Closethepropertiesbox.

    102 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    91/264

    ! -

    Less on 5 Wo rk in g w i th Pa g e s

    Pagesandformsaresimilarinmanyways.Bothdisplayandorganizeinformationandbothsharemanyelements.Forms,however,cancollectinformationand

    containcertainelementsnotavailableonpages.

    Usingpages

    Whendevelopingorupdatinganapplication,designersdeterminewhentouseapageversusaformtodisplayinformation.

    Thefollowingtableliststheconditionsusedtodeterminewhethertouseapageoraform.

    IftheGoalIsto...

    Usea...

    Displaystaticinformationsuchascompanydataandbackgroundinformation.

    Pagetostructureanddisplayinformation

    Collectandstoreinformationfromendusers.

    Formtostructureanddisplaythedata

    Elementsnotavailableonpages

    Thefollowingtableliststheelementsavailabletoformsbutnottopages.

    DesignElement Page Form

    Layoutregions No Yes

    Subforms No Yes

    Fields No Yes

    Sharedfields No Yes

    Embeddedelements:

    Fileupload

    Scheduler

    Editor

    No Yes

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 1 0 3

  • 7/25/2019 Lp trnh domino

    92/264

    Less o n 5 Wo rk i ng w i th Pa g e s

    Applicationdevelopersdesign,create,andcontrolthedisplayofpages.Applicationusersseepagesastheynavigatethroughtheapplication.

    Whendevelopingpages:

    Createthepage.

    Setthepageproperties.

    Addtherequiredelements.

    Creatingapage

    Followthesestepstocreateapage.

    Step Action

    1 IntheDesignpane,clickPages.

    2 IntheWorkpane,clickNewPage.

    3 SelectDesignPageProperties.

    4 EnteranameintheNamefield.

    5 Closethepropertiesbox.

    6 Addappropriateelementstothepage.

    7

    Savethepage.

    104 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    93/264

    ) &

    Less on 5 Wo rk in g w i th Pa g e s

    Inadditiontothecontentthatresidesonthepage,apagecontainspropertiesorattributesofitsown.Likeformsandviews,thepropertiesofapagearemodified

    throughthepropertiesbox.

    ThefollowinggraphicshowsthePagepropertiesbox.

    Element NameExpand/Collapse

    Icon

    Tabbed

    PanesClose Icon

    Individual

    Properties Context-Sensitive

    Help Icon

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 1 0 5

  • 7/25/2019 Lp trnh domino

    94/264

    Less o n 5 Wo rk i ng w i th Pa g e s

    ) & (continued)

    Usepropertiestospecifyattributesoraspectsofapagesuchas:

    Pagenameandalias Backgroundcolor

    Backgroundgraphic

    Createapage

    Followthesestepstocreateapage.

    Step Action

    1

    OpenthePracticedatabaseinDesigner.

    2 SelectPagesintheDesignlist.

    Result:ThePagesdesignlistappears.

    3 ClickNewPage.

    Result:AblankpageopensintheWorkpane.

    4 Namethepage:

    PracticePage

    Result:Thepagenameisset.

    5 Enterthefollowingtextatthetopofthepage:PracticePage

    Leavethetextleft-justifiedandformatithoweveryoulike.

    6 SavethepageasPractice.

    7 Previewthepage.

    106 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    95/264

    ( ! & . & !

    Less on 5 Wo rk in g w i th Pa g e s

    Theuseofgraphicscanmakeanapplicationmoreappealingandeffective.LotusDominoprovidesseveraltoolsforincorporatinggraphics.Youcan:

    Copyandpasteagraphicfromtheclipboard.

    Importanimagefromafile.

    InsertasharedimagefromthesharedresourcesareaoftheDominodatabase.

    Thefollowingimagetypescanbeused:

    BMP(Bitmap)

    CGM

    JPEG

    GIF

    LotusPIC

    PCX

    Tiff5.0

    Imagescanbeusedinpagesandforms.

    Note:WebbrowserssupportGIFandJPEGformatsdirectly.UsetheseformatswhendesigningfortheWeb.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 1 0 7

  • 7/25/2019 Lp trnh domino

    96/264

    Less o n 5 Wo rk i ng w i th Pa g e s

    ( ! & . & ! (continued)

    Importinganimagefromafile

    Followthesestepstoimportanimagefromafile.

    Step Action

    1 OpenthePracticepageinDesigner.

    2 Placethecursorwhereyouwantthegraphictoappear.

    3 Chooseoneofthefollowing:

    CreatePicture

    FileImport

    4

    Selecttheimagesfiletype.Result:TheCreatePicturedialogboxdisplaysonlyimagefiletypes.FileImportdisplaysallfiletypesthatcanbeimportedintoaDesignerpageorform.

    5 Selectorenterthefilename.

    6 ClickImport.

    Result:Theimageisinsertedontothepage.

    108 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    97/264

  • 7/25/2019 Lp trnh domino

    98/264

    Less o n 5 Wo rk i ng w i th Pa g e s

    # ) / !

    Asharedresourceisanelement,suchasagraphicfile,storedwithinaDominodatabase.Eachdatabasecancontainalibraryofitsownsharedresources.

    Sharedresourcesletyoureferencearesourcemultipletimesthroughoutadatabase,whileonlyhavingtomaintaintheresourceinonelocation.

    Typesofsharedresources

    Eachdatabasecancontainalibraryofsharedresourcesconsistingof:

    Images

    Files

    Applets Stylesheets

    Dataconnections

    Sharedresourceadvantages

    Usingsharedresourcesreducesdatabasemaintenance.Ifaresourceischanged,alloccurrencesofthesharedresourceareautomaticallyupdated.Amajoradvantageofsharedresourcesisthattheyareapartoftheapplication;ifthe

    applicationismoved,copied,orreplicated,soareitssharedresources.

    Addingsharedresources

    Touseasharedresource,itneedstobeimportedtotheDominodatabase.Itsnativeformatismaintainedduringthisprocess.

    110 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    99/264

    # ( / !

    Less on 5 Wo rk in g w i th Pa g e s

    Asyousawearlierinthislesson,youcanimportanimagefromthefilesystem.However,ifthegraphicfilechanges,theimageintheapplicationisnotupdated

    unlessyouimportitagain.

    Addinganimageresourcetoadatabase

    Thefirststepintheprocessofusingasharedimageistocreateanimage

    resource.Followthesestepstocreateanimageresource.

    Step Action

    1 ClickSharedResourcesintheDesignlist.

    2 ClickImages.

    3 IntheWorkpane,clicktheNewImageResourcebutton.

    4 IntheNewImageResourcedialogbox,dothefollowing:

    Selectthefiletype.

    Navigatetothecorrectdirectoryandselectthefilename.

    ClickOpen.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 1 1 1

  • 7/25/2019 Lp trnh domino

    100/264

    Less o n 5 Wo rk i ng w i th Pa g e s

    # ( / ! (continued)

    Imageresourceproperties

    LikeotherDominoDesignerelements,imageresourceshavepropertieswhicharemodifiedusingapropertiesbox.

    Usetheimageresourcepropertiestospecifyattributessuchas:

    Nameandalias

    Sourcefileinformation

    ThefollowinggraphicshowstheImageResourcepropertiesbox.

    112 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    101/264

    Less on 5 Wo rk ing w i th Pa g e s

    # ( / ! (continued)

    Insertinganimageresource

    Thesecondstepintheprocessofusingasharedimageistoinserttheimageresourcewhereneeded.

    Followthesestepstoinsertanimageresource.

    Step Action

    1 Createanew,oropenanexisting,pageinDesigner.

    2 Movethecursortowhereyouwanttotheimagetoappear.

    3 ChooseCreateImageResourcefromthemenu.

    4

    Choosethetypeofimage(GIF,JPEG,AllImages).

    5 Clickthefilenamelistedinthelistbox.

    Result:Athumbnailviewoftheimagedisplaysinthedialogbox.

    6 ClickOK.

    Identifyingapicturessource

    Toidentifythesourceofapictureonapage,usethePicturepropertiesbox.

    ThefollowinggraphicshowsthesourceofanimageaddedusingtheCreatemenu.

    Thefollowinggraphicshowsthesourceofanimagethatisasharedresource.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 1 1 3

  • 7/25/2019 Lp trnh domino

    102/264

  • 7/25/2019 Lp trnh domino

    103/264

  • 7/25/2019 Lp trnh domino

    104/264

  • 7/25/2019 Lp trnh domino

    105/264

    Less on 5 Wo rk ing w i th Pa g e s

    !

    WorldwideCorporationneedsapageinthePoliciesandProceduresapplicationthatgivespeopleanoverviewofthecompany.Inthisexercise,youwillcreatea

    pageandpreviewitintheNotesclient.

    ThisworkshouldbedoneinyourPoliciesdatabase.

    Completethesetasks

    Performthefollowingtaskstocompletethisexercise.

    Createthefollowingsharedimages:

    LogoWW1.gif

    bluerule.gif

    CreateapagenamedInfothatdisplaysthecompanylogo,LogoWW1.gifandthecompanyaddress123WorldwideBlvd.Metropolis,PA45555inatable.

    Placebluerule.gifbelowthetable.

    Enterthefollowingtextthatdescribesthecompany.Givethetextaheading.

    Worldwideisaninternationalpotterymanufacturer.Thecompany

    sellsceramicsworldwide.Productsincludetiles,china,and

    variouskindsofpottery.Thecorporateofficehouses

    manufacturing,researchanddevelopment,productmanagement,

    qualitycontrol,humanresources,andsystemadministration.

    Thereareseveralsmallersalesofficesandresellers

    throughouteachregion,andsomesalesrepresentativeswhowork

    fromtheirhomes.

    Createasectionthatcontainsthetext.

    Saveandpreviewyourwork.

    Dev e lop i ng IB M Lo t us Do m i no 7 A pp l icat io ns : F oun d at i on S k il ls 1 1 7

  • 7/25/2019 Lp trnh domino

    106/264

    Less o n 5 Wo rk i ng w i th Pa g e s

    118 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    107/264

    Lesson6 IntroducingFormulaLanguage

    Lesson7 UsingFormulaLanguageinForms

  • 7/25/2019 Lp trnh domino

    108/264

    Less o n 6 I n tr odu ci ng Fo r mu l a L a ng ua ge

    InthislessonyouwilllearnthebasicsofworkingwiththeFormulalanguage.Youwillusethisinformationthroughouttherestofthecourse.

    Objectives

    Aftercompletingthislesson,youshouldbeableto:

    9 DefinetherulesandsyntaxoftheFormulalanguage.

    9 Computevalues.

    9 Comparevaluesusingoperators.

    9 Use@functionsinformulas.

    9 PerformFormulalanguagebestpractices.

    9 Interfacewiththeuser.

    120 Deve lop i ng IBM Lo t us D o min o 7 App lic a t io ns : Fo u nd at i on Sk i ll s

  • 7/25/2019 Lp trnh domino

    109/264

  • 7/25/2019 Lp trnh domino

    110/264

    Less o n 6 I n tr odu ci ng Fo r mu l a L a ng ua ge

    (continued)

    Syntaxrules

    Allprogramminglanguageshaverules.TheFormulalanguageisnoexception.Aformulamustconformtothegeneralrulesdescribedinthefollowingtable.

    RuleTitle RuleDescription

    Statementseparators Separatemultiplestatementsusingasemicolon.Forexample:

    @IsNewDoc(TrueArgument;FalseArgument)

    Spaces Anynumberofspaces,includingnone,canbeusedbetweenoperators,punctuation,andvalues.

    Keywordsandfunctions,however,mustbeseparatedbyatleastonespace.

    Case Caseisnotsignificantexceptwithintextconstants.Byconvention,keywordsareusuallyuppercase,and@functionand@commandsareusuallywritteninmixedupperandlowercase.

    Operatorsandvalues Twovaluesmustbeseparatedbyatleastoneoperator.

    Wheretouseformulas

    Formulascanbeusedinmanydesignelementssuchasforms,views,pages, fields,buttons,actions,andsoon.CodeisenteredinaneventofanobjectintheP