Enterprise PeopleTools 8.

50 PeopleBook: PeopleCode Language Reference

September 2009

Enterprise PeopleTools 8.50 PeopleBook: PeopleCode Language Reference SKU pt850pbr0 Copyright © 1988, 2009, Oracle and/or its affiliates. All rights reserved.

Trademark Notice Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

License Restrictions Warranty/Consequential Damages Disclaimer This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

Warranty Disclaimer The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

Restricted Rights Notice If this software or related documentation is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065.

Hazardous Applications Notice This software is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications which may create a risk of personal injury. If you use this software in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy and other measures to ensure the safe use of this software. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software in dangerous applications.

Third Party Content, Products, and Services Disclaimer This software and documentation may provide access to or information on content, products and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third party content, products and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third party content, products or services.

Contents

Preface PeopleCode Language Reference Preface ................................................................................................ xxi PeopleCode Language Reference ................................................................................................................. xxi PeopleCode Typographical Conventions ...................................................................................................... xxi

Chapter 1 PeopleCode Built-in Functions ..................................................................................................................... 1 PeopleCode Typographical Conventions ......................................................................................................... 1 Functions by Category ..................................................................................................................................... 2 Analytic Calculation Engine ..................................................................................................................... 2 APIs ........................................................................................................................................................... 2 Application Classes ................................................................................................................................... 2 Application Engine .................................................................................................................................... 2 Application Logging ................................................................................................................................. 3 Arrays ........................................................................................................................................................ 3 Attachment ................................................................................................................................................ 3 Bulk ........................................................................................................................................................... 3 Business Interlink ...................................................................................................................................... 4 Character Processing ................................................................................................................................. 4 Charting ..................................................................................................................................................... 4 ChartField .................................................................................................................................................. 4 Component Buffer ..................................................................................................................................... 5 Component Interface ................................................................................................................................. 6 Conversion ................................................................................................................................................ 7 Currency and Financial ............................................................................................................................. 7 Current Date and Time .............................................................................................................................. 7 Custom Display Formats ........................................................................................................................... 8 Database and Platform .............................................................................................................................. 8 Data Buffer Access .................................................................................................................................... 8 Date and Time ........................................................................................................................................... 8 Debugging ............................................................................................................................................... 10 Defaults, Setting ...................................................................................................................................... 10 Effective Date and Effective Sequence ................................................................................................... 11 Email ....................................................................................................................................................... 11 Environment ............................................................................................................................................ 11

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

iii

Contents

Exceptions ............................................................................................................................................... Executable Files, Running ....................................................................................................................... Files ......................................................................................................................................................... Financial .................................................................................................................................................. Grids ........................................................................................................................................................ Images ..................................................................................................................................................... Integration Broker ................................................................................................................................... Internet .................................................................................................................................................... Java .......................................................................................................................................................... Language Constructs ............................................................................................................................... Language Preference and Locale ............................................................................................................ Logical (Tests for Blank Values) ............................................................................................................ Mail ......................................................................................................................................................... Math ........................................................................................................................................................ Menu Appearance ................................................................................................................................... Message Catalog and Message Display .................................................................................................. Messages ................................................................................................................................................. Modal Transfers ...................................................................................................................................... MultiChannel Framework ....................................................................................................................... Object ...................................................................................................................................................... Object-Oriented ....................................................................................................................................... Page ......................................................................................................................................................... Page Control Appearance ........................................................................................................................ Personalizations ....................................................................................................................................... Process Scheduler .................................................................................................................................... Remote Call ............................................................................................................................................. RowsetCache ........................................................................................................................................... Saving and Canceling .............................................................................................................................. Scroll Select ............................................................................................................................................. Search Dialog .......................................................................................................................................... Secondary Pages ...................................................................................................................................... SQL ......................................................................................................................................................... SQL Date and Time ................................................................................................................................. SQL Shortcuts ......................................................................................................................................... String ....................................................................................................................................................... Subrecords ............................................................................................................................................... TimeZone ................................................................................................................................................ Trace Control ........................................................................................................................................... Transfers .................................................................................................................................................. Type Checking ........................................................................................................................................ User Information ..................................................................................................................................... User Security ........................................................................................................................................... Validation ................................................................................................................................................ Workflow ................................................................................................................................................ XML ........................................................................................................................................................

12 12 12 12 13 13 13 14 15 16 16 17 17 17 18 18 19 19 19 20 20 22 22 22 22 23 23 23 23 23 24 24 25 26 26 27 27 28 28 28 29 29 30 30 31

iv

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

Contents

PeopleCode Built-in Functions and Language Constructs ............................................................................ Abs ......................................................................................................................................................... AccruableDays ....................................................................................................................................... AccrualFactor ......................................................................................................................................... Acos ........................................................................................................................................................ ActiveRowCount .................................................................................................................................... AddAttachment ...................................................................................................................................... AddEmailAddress .................................................................................................................................. AddKeyListItem ..................................................................................................................................... AddSystemPauseTimes .......................................................................................................................... AddToDate ............................................................................................................................................. AddToDateTime ..................................................................................................................................... AddToTime ............................................................................................................................................ All ........................................................................................................................................................... AllOrNone .............................................................................................................................................. AllowEmplIdChg ................................................................................................................................... Amortize ................................................................................................................................................. Asin ........................................................................................................................................................ Atan ........................................................................................................................................................ BlackScholesCall ................................................................................................................................... BlackScholesPut ..................................................................................................................................... BootstrapYTMs ...................................................................................................................................... Break ...................................................................................................................................................... BulkDeleteField ..................................................................................................................................... BulkInsertField ....................................................................................................................................... BulkModifyPageFieldOrder ................................................................................................................... BulkUpdateIndexes ................................................................................................................................ CallAppEngine ....................................................................................................................................... CancelPubHeaderXmlDoc ..................................................................................................................... CancelPubXmlDoc ................................................................................................................................. CancelSubXmlDoc ................................................................................................................................. ChangeEmailAddress ............................................................................................................................. Char ........................................................................................................................................................ CharType ................................................................................................................................................ ChDir ...................................................................................................................................................... ChDrive .................................................................................................................................................. CheckMenuItem ...................................................................................................................................... Clean ....................................................................................................................................................... CleanAttachments .................................................................................................................................. ClearKeyList .......................................................................................................................................... ClearSearchDefault ................................................................................................................................ ClearSearchEdit ...................................................................................................................................... Code ....................................................................................................................................................... Codeb ...................................................................................................................................................... CollectGarbage .......................................................................................................................................

32 32 32 34 35 36 37 48 49 50 52 54 55 56 57 58 59 60 61 62 63 64 65 66 68 71 74 76 79 80 81 83 84 85 88 88 89 89 90 91 92 93 94 95 95

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

v

Contents

CommitWork .......................................................................................................................................... 96 CompareLikeFields ................................................................................................................................ 98 CompareStrings .................................................................................................................................... 100 Component ........................................................................................................................................... 103 ComponentChanged ............................................................................................................................. 104 ConnectorRequest ................................................................................................................................. 105 ConnectorRequestURL ......................................................................................................................... 106 ContainsCharType ................................................................................................................................ 107 ContainsOnlyCharType ........................................................................................................................ 110 Continue ............................................................................................................................................... 112 ConvertChar ......................................................................................................................................... 114 ConvertCurrency .................................................................................................................................. 119 ConvertDatetimeToBase ...................................................................................................................... 120 ConvertRate .......................................................................................................................................... 121 ConvertTimeToBase ............................................................................................................................ 123 CopyAttachments ................................................................................................................................. 124 CopyFields ........................................................................................................................................... 129 CopyFromJavaArray ............................................................................................................................ 130 CopyRow .............................................................................................................................................. 132 CopyToJavaArray ................................................................................................................................ 133 Cos ........................................................................................................................................................ 134 Cot ........................................................................................................................................................ 135 CreateAnalyticInstance ........................................................................................................................ 136 CreateArray .......................................................................................................................................... 138 CreateArrayAny ................................................................................................................................... 139 CreateArrayRept ................................................................................................................................... 140 CreateDirectory .................................................................................................................................... 142 CreateException ................................................................................................................................... 143 CreateJavaArray ................................................................................................................................... 145 CreateJavaObject .................................................................................................................................. 146 CreateMCFIMInfo ............................................................................................................................... 147 CreateMessage ..................................................................................................................................... 148 CreateObject ......................................................................................................................................... 149 CreateObjectArray ............................................................................................................................... 152 CreateProcessRequest .......................................................................................................................... 153 CreateRecord ........................................................................................................................................ 154 CreateRowset ....................................................................................................................................... 156 CreateRowsetCache ............................................................................................................................. 158 CreateSOAPDoc ................................................................................................................................... 159 CreateSQL ............................................................................................................................................ 160 CreateWSDLMessage ........................................................................................................................... 162 CreateXmlDoc ...................................................................................................................................... 162 CubicSpline .......................................................................................................................................... 163 CurrEffDt ............................................................................................................................................. 166 CurrEffRowNum .................................................................................................................................. 167

vi

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

Contents

CurrEffSeq ........................................................................................................................................... CurrentLevelNumber ........................................................................................................................... CurrentRowNumber ............................................................................................................................. Date ...................................................................................................................................................... Date3 .................................................................................................................................................... DatePart ................................................................................................................................................ DateTime6 ............................................................................................................................................ DateTimeToHTTP ............................................................................................................................... DateTimeToLocalizedString ................................................................................................................ DateTimeToTimeZone ......................................................................................................................... DateTimeValue .................................................................................................................................... DateValue ............................................................................................................................................. Day ....................................................................................................................................................... Days ...................................................................................................................................................... Days360 ................................................................................................................................................ Days365 ................................................................................................................................................ DBCSTrim ........................................................................................................................................... DBPatternMatch ................................................................................................................................... Declare Function .................................................................................................................................. Decrypt ................................................................................................................................................. Degrees ................................................................................................................................................. DeleteAttachment ................................................................................................................................. DeleteEmailAddress ............................................................................................................................. DeleteImage ......................................................................................................................................... DeleteRecord ........................................................................................................................................ DeleteRow ............................................................................................................................................ DeleteSQL ............................................................................................................................................ DeleteSystemPauseTimes .................................................................................................................... DeQueue ............................................................................................................................................... DetachAttachment ................................................................................................................................ DisableMenuItem ................................................................................................................................. DiscardRow .......................................................................................................................................... DoCancel .............................................................................................................................................. DoModal ............................................................................................................................................... DoModalComponent ............................................................................................................................ DoModalPanelGroup ............................................................................................................................ DoSave ................................................................................................................................................. DoSaveNow ......................................................................................................................................... EnableMenuItem .................................................................................................................................. EncodeURL .......................................................................................................................................... EncodeURLForQueryString ................................................................................................................. Encrypt ................................................................................................................................................. EncryptNodePswd ................................................................................................................................ EndMessage ......................................................................................................................................... EndModal .............................................................................................................................................

167 168 169 170 171 172 172 173 175 178 179 180 181 182 183 183 184 184 185 189 190 191 196 197 198 199 201 203 205 207 214 215 217 217 220 224 224 225 227 228 230 232 233 234 235

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

vii

Contents

EndModalComponent .......................................................................................................................... EnQueue ............................................................................................................................................... Error ..................................................................................................................................................... EscapeHTML ....................................................................................................................................... EscapeJavascriptString ......................................................................................................................... EscapeWML ......................................................................................................................................... Evaluate ................................................................................................................................................ Exact ..................................................................................................................................................... Exec ...................................................................................................................................................... ExecuteRolePeopleCode ...................................................................................................................... ExecuteRoleQuery ............................................................................................................................... ExecuteRoleWorkflowQuery ............................................................................................................... Exit ....................................................................................................................................................... Exp ....................................................................................................................................................... ExpandBindVar .................................................................................................................................... ExpandEnvVar ..................................................................................................................................... ExpandSqlBinds ................................................................................................................................... Fact ....................................................................................................................................................... FetchSQL ............................................................................................................................................. FetchValue ........................................................................................................................................... FieldChanged ....................................................................................................................................... FileExists .............................................................................................................................................. Find ....................................................................................................................................................... Findb ..................................................................................................................................................... FindCodeSetValues .............................................................................................................................. FindFiles ............................................................................................................................................... FlushBulkInserts ................................................................................................................................... For ........................................................................................................................................................ FormatDateTime .................................................................................................................................. Forward ................................................................................................................................................ Function ................................................................................................................................................ GenerateActGuideContentUrl .............................................................................................................. GenerateActGuidePortalUrl ................................................................................................................. GenerateActGuideRelativeUrl ............................................................................................................. GenerateComponentContentRelURL ................................................................................................... GenerateComponentContentURL ........................................................................................................ GenerateComponentPortalRelURL ...................................................................................................... GenerateComponentPortalURL ........................................................................................................... GenerateComponentRelativeURL ....................................................................................................... GenerateExternalPortalURL ................................................................................................................ GenerateExternalRelativeURL ............................................................................................................. GenerateHomepagePortalURL ............................................................................................................. GenerateHomepageRelativeURL ......................................................................................................... GenerateMobileTree ............................................................................................................................. GenerateQueryContentURL .................................................................................................................

236 237 240 242 244 245 245 247 247 251 253 253 254 255 256 257 258 259 260 262 263 265 267 268 268 270 272 273 274 275 277 279 280 282 283 285 288 290 292 295 296 297 298 299 303

viii

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

Contents

GenerateQueryPortalURL .................................................................................................................... GenerateQueryRelativeURL ................................................................................................................ GenerateScriptContentRelURL ............................................................................................................ GenerateScriptContentURL ................................................................................................................. GenerateScriptPortalRelURL ............................................................................................................... GenerateScriptPortalURL .................................................................................................................... GenerateScriptRelativeURL ................................................................................................................. GenerateTree ........................................................................................................................................ GenerateWorklistPortalURL ................................................................................................................ GenerateWorklistRelativeURL ............................................................................................................ GenToken ............................................................................................................................................. GetAESection ....................................................................................................................................... GetAnalyticGrid ................................................................................................................................... GetAnalyticInstance ............................................................................................................................. GetArchPubHeaderXmlDoc ................................................................................................................. GetArchPubXmlDoc ............................................................................................................................ GetArchSubXmlDoc ............................................................................................................................ GetAttachment ..................................................................................................................................... GetBiDoc .............................................................................................................................................. GetCalendarDate .................................................................................................................................. GetChart ............................................................................................................................................... GetChartURL ....................................................................................................................................... GetCwd ................................................................................................................................................. GetEnv .................................................................................................................................................. GetField ................................................................................................................................................ GetFile .................................................................................................................................................. GetGanttChart ....................................................................................................................................... GetGrid ................................................................................................................................................. GetHTMLText ..................................................................................................................................... GetImageExtents .................................................................................................................................. GetInterlink .......................................................................................................................................... GetJavaClass ........................................................................................................................................ GetLevel0 ............................................................................................................................................. GetMethodNames ................................................................................................................................. GetMessage .......................................................................................................................................... GetMessageInstance ............................................................................................................................. GetMessageXmlDoc ............................................................................................................................ GetNextNumber ................................................................................................................................... GetNextNumberWithGaps ................................................................................................................... GetNextNumberWithGapsCommit ...................................................................................................... GetNextProcessInstance ....................................................................................................................... GetNRXmlDoc ..................................................................................................................................... GetOrgChart .......................................................................................................................................... GetPage ................................................................................................................................................ GetPageField ........................................................................................................................................

304 306 308 310 311 313 315 317 318 319 321 321 322 324 324 325 325 326 333 334 336 337 338 339 340 341 345 346 348 349 350 352 353 355 356 357 357 359 361 363 365 366 367 368 369

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

ix

Contents

GetProgramFunctionInfo ..................................................................................................................... GetPubContractInstance ....................................................................................................................... GetPubHeaderXmlDoc ......................................................................................................................... GetPubXmlDoc .................................................................................................................................... GetRatingBoxChart ............................................................................................................................... GetRecord ............................................................................................................................................. GetRelField .......................................................................................................................................... GetRow ................................................................................................................................................. GetRowset ............................................................................................................................................ GetRowsetCache .................................................................................................................................. GetSelectedTreeNode ............................................................................................................................ GetSession ............................................................................................................................................ GetSetId ................................................................................................................................................ GetSQL ................................................................................................................................................. GetStoredFormat .................................................................................................................................. GetSubContractInstance ....................................................................................................................... GetSubXmlDoc .................................................................................................................................... GetSyncLogData .................................................................................................................................. GetTreeNodeParent ............................................................................................................................... GetTreeNodeRecordName .................................................................................................................... GetTreeNodeValue ................................................................................................................................ GetURL ................................................................................................................................................ GetUserOption ..................................................................................................................................... GetWLFieldValue ................................................................................................................................ Global ................................................................................................................................................... Gray ...................................................................................................................................................... GrayMenuItem ...................................................................................................................................... Hash ...................................................................................................................................................... HermiteCubic ....................................................................................................................................... Hide ...................................................................................................................................................... HideMenuItem ..................................................................................................................................... HideRow ............................................................................................................................................... HideScroll ............................................................................................................................................. HistVolatility ........................................................................................................................................ Hour ...................................................................................................................................................... IBPurgeDomainStatus .......................................................................................................................... IBPurgeNodesDown ............................................................................................................................. Idiv ....................................................................................................................................................... If ........................................................................................................................................................... InboundPublishXmlDoc ....................................................................................................................... InitChat ................................................................................................................................................. InsertImage ........................................................................................................................................... InsertRow ............................................................................................................................................. Int ......................................................................................................................................................... Integer ...................................................................................................................................................

371 377 377 378 380 380 382 383 384 385 387 387 388 389 392 393 393 395 396 396 397 397 399 399 400 401 403 403 404 405 407 408 409 411 412 412 413 413 414 415 416 419 422 423 424

x

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

Contents

IsAlpha ................................................................................................................................................. IsAlphaNumeric ................................................................................................................................... IsDate ................................................................................................................................................... IsDateTime ........................................................................................................................................... IsDaylightSavings ................................................................................................................................ IsDigits ................................................................................................................................................. IsDisconnectedClient ........................................................................................................................... IsHidden ............................................................................................................................................... IsMenuItemAuthorized ........................................................................................................................ IsMessageActive .................................................................................................................................. IsModal ................................................................................................................................................. IsModalComponent .............................................................................................................................. IsModalPanelGroup .............................................................................................................................. IsNumber .............................................................................................................................................. IsOperatorInClass .................................................................................................................................. IsSearchDialog ..................................................................................................................................... IsTime ................................................................................................................................................... IsUserInPermissionList ........................................................................................................................ IsUserInRole ......................................................................................................................................... IsUserNumber ...................................................................................................................................... Left ....................................................................................................................................................... Len ........................................................................................................................................................ Lenb ....................................................................................................................................................... LinearInterp .......................................................................................................................................... Ln ......................................................................................................................................................... Local ..................................................................................................................................................... LogObjectUse ........................................................................................................................................ Log10 ................................................................................................................................................... Lower ................................................................................................................................................... LTrim ................................................................................................................................................... MarkPrimaryEmailAddress .................................................................................................................. MarkWLItemWorked ........................................................................................................................... Max ....................................................................................................................................................... MCFBroadcast ..................................................................................................................................... MessageBox ......................................................................................................................................... Min ....................................................................................................................................................... Minute .................................................................................................................................................. Mod ...................................................................................................................................................... Month ................................................................................................................................................... MSFGetNextNumber ........................................................................................................................... MsgGet ................................................................................................................................................. MsgGetExplainText ............................................................................................................................. MsgGetText .......................................................................................................................................... NextEffDt ............................................................................................................................................. NextRelEffDt .......................................................................................................................................

425 426 427 428 429 430 431 432 433 434 436 437 437 438 439 439 440 441 442 442 443 444 445 445 446 446 447 449 450 451 451 452 453 454 456 462 463 463 464 465 466 467 468 469 470

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

xi

Contents

NodeDelete ........................................................................................................................................... NodeRename ........................................................................................................................................ NodeSaveAs ......................................................................................................................................... NodeTranDelete ................................................................................................................................... None ..................................................................................................................................................... NotifyQ ................................................................................................................................................. NumberToDisplayString ...................................................................................................................... NumberToString ................................................................................................................................... ObjectDoMethod .................................................................................................................................. ObjectDoMethodArray ......................................................................................................................... ObjectGetProperty ................................................................................................................................ ObjectSetProperty ................................................................................................................................ OnlyOne ............................................................................................................................................... OnlyOneOrNone .................................................................................................................................. PanelGroupChanged .............................................................................................................................. PingNode .............................................................................................................................................. PriorEffDt ............................................................................................................................................. PriorRelEffDt ....................................................................................................................................... PriorValue ............................................................................................................................................ Product ................................................................................................................................................. Prompt .................................................................................................................................................. Proper ................................................................................................................................................... PublishXmlDoc .................................................................................................................................... PutAttachment ...................................................................................................................................... Quote .................................................................................................................................................... Radians ................................................................................................................................................. Rand ..................................................................................................................................................... RecordChanged .................................................................................................................................... RecordDeleted ...................................................................................................................................... RecordNew ........................................................................................................................................... RefreshTree ........................................................................................................................................... RelNodeTranDelete .............................................................................................................................. RemoteCall ........................................................................................................................................... RemoveDirectory ................................................................................................................................. RenameDBField ................................................................................................................................... RenamePage ......................................................................................................................................... RenameRecord ..................................................................................................................................... Repeat ................................................................................................................................................... Replace ................................................................................................................................................. Rept ...................................................................................................................................................... ReSubmitPubHeaderXmlDoc .............................................................................................................. ReSubmitPubXmlDoc .......................................................................................................................... ReSubmitSubXmlDoc .......................................................................................................................... Return ................................................................................................................................................... ReturnToServer ....................................................................................................................................

470 472 473 474 475 476 477 481 484 485 486 488 489 490 491 491 492 493 494 495 495 497 498 499 508 509 510 510 512 515 517 517 518 521 524 526 527 528 529 530 531 532 533 535 535

xii

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

Contents

ReValidateNRXmlDoc ......................................................................................................................... RevalidatePassword ............................................................................................................................. Right ..................................................................................................................................................... Round ................................................................................................................................................... RoundCurrency .................................................................................................................................... RowFlush ............................................................................................................................................. RowScrollSelect ................................................................................................................................... RowScrollSelectNew ........................................................................................................................... RTrim ................................................................................................................................................... ScheduleProcess .................................................................................................................................... ScrollFlush ........................................................................................................................................... ScrollSelect ........................................................................................................................................... ScrollSelectNew ................................................................................................................................... Second .................................................................................................................................................. SendMail .............................................................................................................................................. SetAuthenticationResult ....................................................................................................................... SetChannelStatus .................................................................................................................................. SetComponentChanged ......................................................................................................................... SetControlValue ................................................................................................................................... SetCursorPos ........................................................................................................................................ SetDBFieldAuxFlag ............................................................................................................................. SetDBFieldCharDefn ........................................................................................................................... SetDBFieldFormat ............................................................................................................................... SetDBFieldFormatLength .................................................................................................................... SetDBFieldLabel .................................................................................................................................. SetDBFieldLength ................................................................................................................................ SetDBFieldNotUsed ............................................................................................................................. SetDefault ............................................................................................................................................. SetDefaultAll ........................................................................................................................................ SetDefaultNext ..................................................................................................................................... SetDefaultNextRel ............................................................................................................................... SetDefaultPrior ..................................................................................................................................... SetDefaultPriorRel ............................................................................................................................... SetDisplayFormat ................................................................................................................................. SetLabel ................................................................................................................................................ SetLanguage ......................................................................................................................................... SetMessageStatus .................................................................................................................................. SetNextPanel ......................................................................................................................................... SetNextPage ......................................................................................................................................... SetPageFieldPageFieldName ............................................................................................................... SetPasswordExpired ............................................................................................................................. SetPostReport ....................................................................................................................................... SetRecFieldEditTable ........................................................................................................................... SetRecFieldKey .................................................................................................................................... SetReEdit ..............................................................................................................................................

537 538 540 541 542 542 544 546 548 549 549 551 553 555 556 558 561 563 564 566 567 569 571 573 574 576 577 579 580 581 581 582 583 583 584 586 587 588 588 589 591 592 592 594 595

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

xiii

Contents

SetSearchDefault .................................................................................................................................. SetSearchDialogBehavior .................................................................................................................... SetSearchEdit ....................................................................................................................................... SetTempTableInstance ......................................................................................................................... SetTracePC ........................................................................................................................................... SetTraceSQL ........................................................................................................................................ SetupScheduleDefnItem ....................................................................................................................... SetUserOption ...................................................................................................................................... Sign ....................................................................................................................................................... Sin ......................................................................................................................................................... SinglePaymentPV ................................................................................................................................. SortScroll .............................................................................................................................................. Split ...................................................................................................................................................... SQLExec .............................................................................................................................................. Sqrt ....................................................................................................................................................... StartWork ............................................................................................................................................. StopFetching ......................................................................................................................................... StoreSQL .............................................................................................................................................. String .................................................................................................................................................... StripOffHTMLTags ............................................................................................................................. Substitute .............................................................................................................................................. Substring ............................................................................................................................................... Substringb .............................................................................................................................................. SwitchUser ........................................................................................................................................... SyncRequestXmlDoc ........................................................................................................................... Tan ........................................................................................................................................................ Throw ................................................................................................................................................... Time ..................................................................................................................................................... Time3 ................................................................................................................................................... TimePart ............................................................................................................................................... TimeToTimeZone ................................................................................................................................ TimeValue ............................................................................................................................................ TimeZoneOffset ................................................................................................................................... TotalRowCount .................................................................................................................................... Transfer ................................................................................................................................................ TransferExact ....................................................................................................................................... TransferMobilePage ............................................................................................................................. TransferNode ........................................................................................................................................ TransferPortal ....................................................................................................................................... TransferPanel ........................................................................................................................................ TransferPage ......................................................................................................................................... Transform ............................................................................................................................................. TransformEx ......................................................................................................................................... TransformExCache ................................................................................................................................ TreeDetailInNode .................................................................................................................................

596 597 598 600 601 605 607 608 609 610 610 611 613 614 620 620 622 623 625 626 626 627 628 629 631 632 633 634 635 636 637 638 639 640 642 646 650 652 654 657 658 659 661 662 664

xiv

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

Contents

TriggerBusinessEvent .......................................................................................................................... Truncate ................................................................................................................................................ Try ........................................................................................................................................................ UnCheckMenuItem ............................................................................................................................... Unencode .............................................................................................................................................. Ungray .................................................................................................................................................. Unhide .................................................................................................................................................. UnhideRow ........................................................................................................................................... UnhideScroll ......................................................................................................................................... UniformSeriesPV ................................................................................................................................. UpdateSysVersion ................................................................................................................................ UpdateValue ......................................................................................................................................... UpdateXmlDoc ..................................................................................................................................... Upper .................................................................................................................................................... Value .................................................................................................................................................... ValueUser ............................................................................................................................................. ViewAttachment ................................................................................................................................... ViewContentURL ................................................................................................................................. ViewURL ............................................................................................................................................. Warning ................................................................................................................................................ Weekday ............................................................................................................................................... While .................................................................................................................................................... WinEscape ............................................................................................................................................. WinExec ................................................................................................................................................ WinMessage ......................................................................................................................................... WriteToLog .......................................................................................................................................... Year ......................................................................................................................................................

665 666 667 668 668 669 671 673 674 675 676 677 678 679 680 681 682 689 690 691 694 694 695 695 696 701 702

Chapter 2 Meta-SQL .................................................................................................................................................. 705 Meta-SQL .................................................................................................................................................... Meta-SQL Use ....................................................................................................................................... Meta-SQL Element Types ..................................................................................................................... Parameter Markers ....................................................................................................................................... Date Considerations .................................................................................................................................... Basic Date Meta-SQL Guidelines ......................................................................................................... Date, DateTime, and Time Wrappers with Application Engine Programs ........................................... Date, DateTime, and Time Out Wrappers for SQL and Dynamic Views ............................................. {DateTimein-prefix} in SQR ................................................................................................................ Meta-SQL Placement Considerations ......................................................................................................... Meta-SQL Reference ................................................................................................................................... %Abs .................................................................................................................................................... 705 705 706 706 706 707 707 707 707 708 714 714

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

xv

Contents

%BINARYSORT ................................................................................................................................. %Cast ................................................................................................................................................... %COALESCE ...................................................................................................................................... %Concat ............................................................................................................................................... %CurrentDateIn ................................................................................................................................... %CurrentDateOut ................................................................................................................................. %CurrentDateTimeIn ........................................................................................................................... %CurrentDateTimeOut ........................................................................................................................ %CurrentTimeIn ................................................................................................................................... %CurrentTimeOut ................................................................................................................................ %DatabaseRelease ............................................................................................................................... %DateAdd ............................................................................................................................................ %DateDiff ............................................................................................................................................ %DateIn ................................................................................................................................................ %DateNull ............................................................................................................................................ %DateOut ............................................................................................................................................. %DatePart ............................................................................................................................................. %DateTimeDiff .................................................................................................................................... %DateTimeIn ....................................................................................................................................... %DateTimeNull ................................................................................................................................... %DateTimeOut ..................................................................................................................................... %DecDiv .............................................................................................................................................. %DecMult ............................................................................................................................................ %DTTM ............................................................................................................................................... %EffDtCheck ....................................................................................................................................... %FirstRows .......................................................................................................................................... %InsertSelect ........................................................................................................................................ %InsertSelectWithLongs ...................................................................................................................... %InsertValues ...................................................................................................................................... %Join .................................................................................................................................................... %KeyEqual ........................................................................................................................................... %KeyEqualNoEffDt ............................................................................................................................. %Like ................................................................................................................................................... %LikeExact .......................................................................................................................................... %NoUppercase ..................................................................................................................................... %NumToChar ...................................................................................................................................... %OldKeyEqual ..................................................................................................................................... %OPRCLAUSE ................................................................................................................................... %Round ................................................................................................................................................ %SQL ................................................................................................................................................... %Substring ........................................................................................................................................... %SUBREC ........................................................................................................................................... %Table ................................................................................................................................................. %Test .................................................................................................................................................... %TextIn ................................................................................................................................................

714 715 716 717 718 718 718 718 718 719 719 720 720 721 721 722 722 723 724 724 725 726 726 727 728 729 731 733 735 736 738 739 740 742 744 745 746 746 747 748 750 751 751 752 753

xvi

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

Contents

%TimeAdd ........................................................................................................................................... %TimeIn ............................................................................................................................................... %TimeNull ........................................................................................................................................... %TimeOut ............................................................................................................................................ %TimePart ............................................................................................................................................ %TrimSubstr ........................................................................................................................................ %Truncate ............................................................................................................................................ %TruncateTable ................................................................................................................................... %UpdatePairs ....................................................................................................................................... %Upper ................................................................................................................................................. %UuidGen ............................................................................................................................................ %UuidGenBase64 ................................................................................................................................ Meta-SQL Shortcuts ................................................................................................................................... %Delete ................................................................................................................................................ %Insert ................................................................................................................................................. %SelectAll ............................................................................................................................................ %SelectDistinct .................................................................................................................................... %SelectByKey ..................................................................................................................................... %SelectByKeyEffDt ............................................................................................................................ %Update ...............................................................................................................................................

754 755 755 756 756 757 758 759 760 761 762 762 762 763 763 763 764 764 765 765

Chapter 3 System Variables ....................................................................................................................................... 767 Understanding System Variables ................................................................................................................. %AllowNotification ............................................................................................................................. %AllowRecipientLookup ..................................................................................................................... %ApplicationLogFence ........................................................................................................................ %AsOfDate .......................................................................................................................................... %AuthenticationToken ......................................................................................................................... %BPName ............................................................................................................................................ %ClientDate ......................................................................................................................................... %ClientTimeZone ................................................................................................................................ %Component ........................................................................................................................................ %CompIntfcName ................................................................................................................................ %ContentID .......................................................................................................................................... %ContentType ...................................................................................................................................... %Copyright .......................................................................................................................................... %Currency ............................................................................................................................................ %Date ................................................................................................................................................... %DateTime ........................................................................................................................................... %DbName ............................................................................................................................................ %DbServerName .................................................................................................................................. 767 767 767 768 769 769 769 769 770 770 770 771 771 772 772 773 773 773 773

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

xvii

........................................................................................................................................................... %Import .. %ProcessProfilePermissionList .............. 773 774 774 774 775 775 775 775 776 776 776 777 777 777 778 778 779 779 780 780 780 781 781 781 782 782 782 783 783 783 784 784 785 786 786 786 786 787 787 787 787 788 788 788 788 xviii Copyright © 1988............. %Language_Base ........................................................................................................................................................................................................................... %Response .................................................................................................................................................... %RowSecurityPermissionList .......................................................................................................................................................... %PrimaryPermissionList ................... %EmployeeId ..................................................................................................................................................................................................................................... %HPTabName ......................... 2009........ %ServerTimeZone .......................................................................................... %EmailAddress ............................................................... %MobilePage ........................... All Rights Reserved.......................................................................................................................................................................... %DeviceType ....................... %OutDestType ........................................................................................................................................................................................................................................................ %Node .................................................................................. %RunningInPortal ................................... %IsMultiLanguageEnabled ...................................................................................................................... %FilePath .......................................................................................................................................................................................................................... %Language_User ........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... %Request ............................................. %OperatorRowLevelSecurityClass ................................................................................................................................................................................ %OperatorId .................................. %PerfTime ................................................................................................................................................................... %PermissionLists ............................................ %OutDestFormat .......................................................................................................... %PID .......................................................................................................... %ResultDocument ......... %Roles ................................................................................. %Language_Data ..................................................................................... Oracle and/or its affiliates..................................................................................................................................... %Mode ...................................................................................................................................... %OperatorClass ........ %PanelGroup ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................Contents %DbType ..................................................................................................... %Panel ............................................ %Portal ................................................................................ %NavigatorHomePermissionList ............................................................................................. %MaxMessageSize ................................................................. .................... %ExternalAuthInfo ................. %PSAuthResult ................................................................................. %LocalNode .......................................................................................................................................... %Market ........................................................................................................................................................................................................................................................................ %Menu .................................................................................................................................................................................................................................................................................................................................................................................................................................. %Page ......................................................... %IntBroker ....................... %Language ............................................................................................. %PasswordExpired ...........................................................................................................................................

............. %Browser ........................................................................................................................................................................................................................... %SignonUserId ......................................................................................................................................................................................................................................... %Time ...................................................................... %LabelTag ......................................................................................................... 795 796 796 796 797 797 797 797 798 798 798 799 799 799 799 799 800 800 800 801 802 802 802 802 Copyright © 1988................................................................................................. xix ............................................................................................................................................................................................................. %SyncServer ..................... %JavaScript ................................................................................................................... %SQLRows .................................................................................. %Copyright ............................... %Image ....................................................................................................................... %UserId .................................................................................................................................... %WLName .. %HtmlContent ......................................................................................... %UserDescription ............................................. %TransformData ................................. Oracle and/or its affiliates..................................... %SMTPBlackberryReplyTo ............................................................................................ %BrowserPlatform ................................. %Message .............................................................................................................................................................................................................................................................................................................................. %SignOnUserPswd ............................................... %DBName ................... %SMTPSender .........................................................................Contents %Session ........... %AppsRel ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... %WLInstanceID ................................................................................................. Variables ............................................................................................... All Rights Reserved.................................................................................................................................................................................................. %Encode ............................... %LanguageISO .................................................................................................................................................................................................................................................... 788 789 789 789 790 790 791 791 791 792 792 793 793 793 793 Chapter 4 Meta-HTML ......... 2009....................................................................................................................................................................................................................................................................................................................................................................... %Cols ......................................................................................................... %Formname ........................................................................................................................................................................................................................................................................ %ThisMobileObject ............................................................................................................................................................................................. %SMTPGuaranteed ..... 795 Understanding Meta-HTML ........................................................................................................................................................... %Appserver ............. %DBType ....................................................................................................................................................................................................................................................................................... Functions ....................................... %Component ....................................................................................................................................................... %Menu ............................... %BrowserVersion ............................................................................................................................................................................................................................................. Comments ................................................................ Alphabetical List of Meta-HTML Elements ..................................................

........................................................................................................... %SubmitScriptName ..................................................................................................................................... 807 Understanding View Trees ....................................................................................................................................................... ........................................................................Contents %Page ...... 810 View Trees From Application Example−Without Multi-Node Selection (Method A) .............. 807 Invoking View Trees From Application Pages .................................................................................... %UserId ............................................................................................................................ Oracle and/or its affiliates................... 2009...................................... 817 xx Copyright © 1988........................................................................................................................................................... %ToolsRel .................................................................................................................................... 814 Index ......................... %URL ....................... 803 804 804 804 804 805 Appendix A Viewing Trees From Application Pages ................................................................................................................................................................... %ServicePack ...................... All Rights Reserved................................................................................. 813 View Trees From Application Example−With Multi-Node Selection (Method B) ..............

See also PeopleTools 8. the field class. and so on.50 PeopleBook: PeopleCode API Reference and PeopleTools 8. common page elements. italics for arguments. and so on. we use typographical conventions to distinguish between different elements of the PeopleCode language. the PeopleCode API Reference and the PeopleCode Developer's Guide. PeopleCode is the proprietary language used in the development of PeopleSoft applications. method names. items in variable font are placeholders for arguments that your program must supply. Variable In PeopleCode syntax. language constructs. Please take a moment to review the following typographical cues: Font Type monospace font Description Indicates a PeopleCode program or other example Keyword In PeopleCode syntax. There are two accompanying books. the component processor. Oracle and/or its affiliates. and so on. PeopleCode Typographical Conventions Throughout this book. 2009. such as related documentation. and so on. and typographical conventions. xxi . meta-SQL. The API reference contains information about the classes delivered with PeopleCode. such as the built-in functions. Copyright © 1988. all the methods and properties of the rowset class. and PeopleCode reserved words that must be included literally in the function call. Its chapters describe the syntax and fundamental elements of this part of the PeopleCode language. such as bold to indicate function names. system variables. The PeopleCode Developer's Guide contains conceptual information about the PeopleCode language. The "About These PeopleBooks" preface contains general product line information. PeopleCode Language Reference This PeopleBook covers the language elements of PeopleCode. the PeopleCode APIs. for example. All Rights Reserved. This preface also contains a glossary with useful terms that are used in PeopleBooks. Its chapters contain reference material for the PeopleCode language.PeopleCode Language Reference Preface This preface includes typographical conventions used in PeopleCode and discusses the uses of this book. items in keyword font indicate function names.50 PeopleBook: PeopleCode Developer's Guide.

Preface Font Type Description . Navigating the PeopleBooks interface and searching the PeopleSoft online library. {Option1|Option2} In PeopleCode syntax. ISO country codes and currency codes. How to access hosted PeopleBooks. xxii Copyright © 1988. Typographical conventions and visual cues used in PeopleBooks. [] In PeopleCode syntax optional items are enclosed in square brackets. How to send PeopleSoft documentation comments and suggestions to Oracle. Glossary of useful PeopleSoft terms that are used in PeopleBooks. the options are enclosed in curly braces and separated by a pipe. Oracle and/or its affiliates. PeopleBooks and the Online PeopleSoft Library A companion PeopleBook called PeopleBooks and the Online PeopleSoft Library contains general information. ellipses indicate that the preceding item or series can be repeated any number of times. Displaying and printing screen shots and graphics in PeopleBooks. Understanding documentation integration and how to integrate customized documentation into the library. All Rights Reserved.. including: • • • • • • • • • • • • • Understanding the PeopleSoft online library and related documentation.. &Parameter In PeopleCode syntax an ampersand before a parameter indicates that the parameter is an already instantiated object. PeopleBooks that are common across multiple applications. downloadable HTML PeopleBooks. Understanding PeopleBook structure. 2009. How to manage the PeopleSoft online library including full-text searching and configuring a reverse proxy server. when there is a choice between two options. and downloadable PDF PeopleBooks as well as documentation updates. In PeopleCode syntax. . Common elements used in PeopleBooks.

2009. All Rights Reserved. Oracle and/or its affiliates. Copyright © 1988. xxiii .Preface You can find this companion PeopleBook in your PeopleSoft online library.

.

. ellipses indicate that the preceding item or series can be repeated any number of times. and so on. when there is a choice between two options. items in keyword font indicate function names. and PeopleCode reserved words that must be included literally in the function call. italics for arguments. items in variable font are placeholders for arguments that your program must supply.. {Option1|Option2} In PeopleCode syntax. In PeopleCode syntax. All Rights Reserved. Variable In PeopleCode syntax.. Oracle and/or its affiliates. method names. Copyright © 1988. we use typographical conventions to distinguish between different elements of the PeopleCode language. such as bold to indicate function names.Chapter 1 PeopleCode Built-in Functions This chapter provides a reference to PeopleCode built-in functions and language constructs and discusses: • • • PeopleCode typographical conventions Functions by category PeopleCode built-in functions and language constructs PeopleCode Typographical Conventions Throughout this book. 1 . 2009. language constructs. the options are enclosed in curly braces and separated by a pipe. Please take a moment to review the following typographical cues: Font Type monospace font Description Indicates a PeopleCode program or other example Keyword In PeopleCode syntax.

page 322 APIs Chapter 1. page 95 Application Engine Chapter 1. &Parameter In PeopleCode syntax an ampersand before a parameter indicates that the parameter is an already instantiated object. page 321 2 Copyright © 1988. "PeopleCode Built-in Functions. page 76 Chapter 1. page 136 Chapter 1. Functions by Category The following topics subdivide the PeopleCode built-in functions by functional category and provide links from within each category to the reference entries." GetAnalyticGrid. page 149 Chapter 1.PeopleCode Built-in Functions Chapter 1 Font Type Description [] In PeopleCode syntax optional items are enclosed in square brackets. Oracle and/or its affiliates." GetAnalyticInstance. page 788 Application Classes Chapter 1." CreateAnalyticInstance. 2009. page 387 Chapter 3. page 324 Chapter 1." GetAESection. "PeopleCode Built-in Functions. page 96 Chapter 1. "PeopleCode Built-in Functions." CollectGarbage." GetSession. All Rights Reserved." CommitWork. "PeopleCode Built-in Functions. . "PeopleCode Built-in Functions." %Session." CreateObject. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. Analytic Calculation Engine Chapter 1." CallAppEngine. "PeopleCode Built-in Functions. or is a parameter variable that will receive a value during the execution of the function. "System Variables. "PeopleCode Built-in Functions.

"System Variables. page 139 Chapter 1. "PeopleCode Built-in Functions. page 682 See Also Chapter 1." CopyToJavaArray. page 90 Chapter 1. "PeopleCode Built-in Functions. page 499 Chapter 1. page 613 Attachment Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." ViewAttachment." WriteToLog." CreateArrayRept." CleanAttachments. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 140 Chapter 1. "PeopleCode Built-in Functions." Images. page 326 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." CreateArray." BulkDeleteField. 2009." AddAttachment." DeleteAttachment." BulkInsertField. page 138 Chapter 1. "PeopleCode Built-in Functions. page 701 Chapter 3. "PeopleCode Built-in Functions. page 124 Chapter 1. "PeopleCode Built-in Functions. page 37 Chapter 1." Files." PutAttachment. page 133 Chapter 1." Split. page 130 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. Oracle and/or its affiliates. All Rights Reserved. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 13 Bulk Chapter 1. page 768 Arrays Chapter 1." CopyAttachments. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 71 Copyright © 1988. page 191 Chapter 1." BulkModifyPageFieldOrder. page 68 Chapter 1." %ApplicationLogFence." CopyFromJavaArray. page 66 Chapter 1. "PeopleCode Built-in Functions." CreateArrayAny." GetAttachment. page 12 and Chapter 1. page 207 Chapter 1. 3 . "PeopleCode Built-in Functions." DetachAttachment.Chapter 1 PeopleCode Built-in Functions Application Logging Chapter 1.

" ContainsOnlyCharType." SetDBFieldAuxFlag. "PeopleCode Built-in Functions. page 569 Chapter 1." SetDBFieldLabel." GetRatingBoxChart. page 367 Chapter 1. page 74 Business Interlink Chapter 1. page 524 Chapter 1. "PeopleCode Built-in Functions. page 114 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." GetGanttChart. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 149 Chapter 1. page 567 Chapter 1. page 350 Character Processing Chapter 1. "PeopleCode Built-in Functions. page 85 Chapter 1. All Rights Reserved. page 574 4 Copyright © 1988." SetDBFieldFormatLength." SetDBFieldFormat." GetChart. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." RenameRecord. "PeopleCode Built-in Functions. Oracle and/or its affiliates." RenameDBField. "PeopleCode Built-in Functions. page 337 Chapter 1." GetInterlink. ." SetDBFieldCharDefn. "PeopleCode Built-in Functions." GetChartURL." GetOrgChart. 2009. "PeopleCode Built-in Functions. page 333 Chapter 1. page 184 Charting Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 527 Chapter 1." CreateObject. page 345 Chapter 1." GetBiDoc." ContainsCharType." BulkUpdateIndexes." CharType. page 107 Chapter 1. page 571 Chapter 1. "PeopleCode Built-in Functions. page 573 Chapter 1. "PeopleCode Built-in Functions. page 526 Chapter 1.PeopleCode Built-in Functions Chapter 1 Chapter 1. page 380 ChartField Chapter 1." DBCSTrim. "PeopleCode Built-in Functions." RenamePage. page 336 Chapter 1." ConvertChar. page 110 Chapter 1.

" CurrentRowNumber. "PeopleCode Built-in Functions." SetDBFieldLength. page 258 Chapter 1." AddKeyListItem. "PeopleCode Built-in Functions. page 263 Chapter 1. page 388 Chapter 1. page 215 Chapter 1. page 256 Chapter 1. 5 ." DiscardRow. "PeopleCode Built-in Functions." ExpandBindVar. page 198 Chapter 1. page 382 Chapter 1. "PeopleCode Built-in Functions. page 363 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. Oracle and/or its affiliates." ExpandEnvVar." FetchValue. 2009. "PeopleCode Built-in Functions. page 422 Copyright © 1988. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." GetNextNumber." ExpandSqlBinds. page 262 Chapter 1. page 594 Component Buffer Chapter 1. page 132 Chapter 1. page 91 Chapter 1. page 49 Chapter 1. "PeopleCode Built-in Functions." ActiveRowCount." GetSetId. page 104 Chapter 1. page 169 Chapter 1. "PeopleCode Built-in Functions." GetRelField. page 577 Chapter 1. "PeopleCode Built-in Functions." ClearKeyList. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 168 Chapter 1. "PeopleCode Built-in Functions." DeleteRecord. "PeopleCode Built-in Functions. All Rights Reserved." SetRecFieldEditTable." InsertRow. page 98 Chapter 1." ComponentChanged." CopyFields. page 36 Chapter 1." FieldChanged. "PeopleCode Built-in Functions." CopyRow." SetPageFieldPageFieldName. page 589 Chapter 1. page 359 Chapter 1. page 576 Chapter 1. "PeopleCode Built-in Functions. page 361 Chapter 1. page 257 Chapter 1. page 199 Chapter 1." DeleteRow. "PeopleCode Built-in Functions." CompareLikeFields. "PeopleCode Built-in Functions." GetNextNumberWithGapsCommit. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." CurrentLevelNumber." SetRecFieldKey.Chapter 1 PeopleCode Built-in Functions Chapter 1. page 592 Chapter 1." GetNextNumberWithGaps. "PeopleCode Built-in Functions. page 129 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." SetDBFieldNotUsed. "PeopleCode Built-in Functions.

"PeopleCode Built-in Functions. page 563 Chapter 1." %Mode. page 371 Chapter 1. All Rights Reserved. "Meta-SQL. "PeopleCode Built-in Functions. page 600 Chapter 1. "PeopleCode Built-in Functions. page 8 Component Interface Chapter 1. "PeopleCode Built-in Functions. ." TreeDetailInNode." %TruncateTable. page 780 Chapter 3. "PeopleCode Built-in Functions." GetSession. page 542 Chapter 1." RecordDeleted. 2009. page 689 Chapter 2. page 427 Chapter 1. "PeopleCode Built-in Functions. page 355 Chapter 1. page 676 Chapter 1. "PeopleCode Built-in Functions." SetDefaultAll. page 622 Chapter 1." %BINARYSORT. page 714 Chapter 3." %Menu." %Table. page 664 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." SetTempTableInstance. page 580 Chapter 1. "PeopleCode Built-in Functions. page 510 Chapter 1." TotalRowCount. page 677 Chapter 1. page 751 Chapter 2. "PeopleCode Built-in Functions." StopFetching." UpdateSysVersion. "Meta-SQL." SetComponentChanged. "PeopleCode Built-in Functions." GetProgramFunctionInfo." IsDate." RowFlush. "Meta-SQL." GetMethodNames. "PeopleCode Built-in Functions." %Component. page 494 Chapter 1.PeopleCode Built-in Functions Chapter 1 Chapter 1. page 512 Chapter 1." Data Buffer Access." UpdateValue." %OperatorClass. page 770 Chapter 3. page 579 Chapter 1. page 515 Chapter 1. "PeopleCode Built-in Functions. "System Variables. "PeopleCode Built-in Functions. Oracle and/or its affiliates. "System Variables." ViewContentURL." PriorValue. "PeopleCode Built-in Functions." RecordNew. page 781 Chapter 2. "PeopleCode Built-in Functions. "System Variables. page 387 6 Copyright © 1988. "PeopleCode Built-in Functions. page 779 Chapter 3." SetDefault. "PeopleCode Built-in Functions. page 640 Chapter 1. "PeopleCode Built-in Functions. "System Variables." RecordChanged. page 759 See Also Chapter 1.

page 114 Chapter 1. 2009. page 610 Chapter 1." %CurrentTimeOut. page 59 Chapter 1. "PeopleCode Built-in Functions." %CurrentDateIn." Char. "PeopleCode Built-in Functions." %CompIntfcName. page 94 Chapter 1. "Meta-SQL. page 63 Chapter 1." ConvertCurrency. "Meta-SQL." BlackScholesPut. page 718 Chapter 2. page 718 Chapter 2. page 718 Chapter 2. page 770 Conversion Chapter 1. "Meta-SQL. page 620 Chapter 3. "System Variables. "PeopleCode Built-in Functions. "System Variables. page 719 See Also Chapter 1. All Rights Reserved. "PeopleCode Built-in Functions." SQL Date and Time. "PeopleCode Built-in Functions. page 625 Chapter 1. "PeopleCode Built-in Functions.Chapter 1 PeopleCode Built-in Functions Chapter 1." Value. page 675 Chapter 3. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. Oracle and/or its affiliates. page 119 Chapter 1. "PeopleCode Built-in Functions. page 84 Chapter 1. page 718 Chapter 2. "PeopleCode Built-in Functions. page 25 Copyright © 1988." %Currency." String. page 8 and Chapter 1." Code. page 718 Chapter 2." UniformSeriesPV. page 481 Chapter 1." %CurrentDateOut." ConvertChar. page 772 Current Date and Time Chapter 2. page 680 Currency and Financial Chapter 1. "PeopleCode Built-in Functions." %CurrentDateTimeIn. "Meta-SQL. "Meta-SQL." Date and Time. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." SinglePaymentPV." RoundCurrency. "PeopleCode Built-in Functions." NumberToString. page 542 Chapter 1." %CurrentDateTimeOut. "Meta-SQL. 7 ." Amortize." StartWork. "PeopleCode Built-in Functions." %CurrentTimeIn.

page 392 Chapter 1." %DbServerName. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." GetField." DatePart. page 154 Chapter 1. "System Variables. . page 5 Date and Time Chapter 1." %DbType." AddToDateTime. page 773 Chapter 3. page 380 Chapter 1. "PeopleCode Built-in Functions." Date. page 773 Chapter 3. page 172 8 Copyright © 1988. page 170 Chapter 1. page 52 Chapter 1." Date3." SetDisplayFormat." FlushBulkInserts." AddToDate.PeopleCode Built-in Functions Chapter 1 Custom Display Formats Chapter 1. "PeopleCode Built-in Functions." GetRecord. "PeopleCode Built-in Functions. page 120 Chapter 1. page 583 Database and Platform Chapter 3. page 54 Chapter 1. All Rights Reserved." AddToTime. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 384 See Also Chapter 1. page 171 Chapter 1. page 55 Chapter 1." CreateRowset. page 340 Chapter 1. "System Variables." GetStoredFormat. "PeopleCode Built-in Functions. page 156 Chapter 1." Component Buffer. "PeopleCode Built-in Functions. page 353 Chapter 1. "PeopleCode Built-in Functions. 2009. Oracle and/or its affiliates." GetRowset. "PeopleCode Built-in Functions." GetRow." CreateRecord. "PeopleCode Built-in Functions." GetLevel0. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 773 Data Buffer Access Chapter 1. page 383 Chapter 1. "System Variables. page 272 Chapter 1." %DbName. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." ConvertDatetimeToBase.

page 555 Chapter 1." DateValue. page 274 Chapter 1. "System Variables. "PeopleCode Built-in Functions. page 635 Chapter 1. page 634 Chapter 1." GetCalendarDate. page 769 Chapter 3. "PeopleCode Built-in Functions." %ClientDate.Chapter 1 PeopleCode Built-in Functions Chapter 1." Weekday. "PeopleCode Built-in Functions. page 770 Chapter 3." DateTime6." TimeZoneOffset. "PeopleCode Built-in Functions." FormatDateTime. page 178 Chapter 1." TimeValue. 9 . "PeopleCode Built-in Functions. "System Variables." %ClientTimeZone. page 183 Chapter 1." Year. "PeopleCode Built-in Functions. page 183 Chapter 1." DateTimeValue. "PeopleCode Built-in Functions. page 702 Chapter 3. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 180 Chapter 1. "PeopleCode Built-in Functions." Days360. page 639 Chapter 1. page 412 Chapter 1. "PeopleCode Built-in Functions. page 172 Chapter 1. "PeopleCode Built-in Functions." DateTimeToHTTP." %AsOfDate. "PeopleCode Built-in Functions." Hour. page 638 Chapter 1. page 769 Chapter 3. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 637 Chapter 1. page 181 Chapter 1. "PeopleCode Built-in Functions. page 175 Chapter 1." Minute. page 182 Chapter 1. Oracle and/or its affiliates. page 427 Chapter 1. "System Variables. All Rights Reserved. "PeopleCode Built-in Functions." Second." Time. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 179 Chapter 1. page 463 Chapter 1." Time3. page 464 Chapter 1." %Date." Days. page 334 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." TimePart. page 773 Copyright © 1988. page 636 Chapter 1. "System Variables. 2009." TimeToTimeZone. "PeopleCode Built-in Functions." Month." DateTimeToTimeZone. "PeopleCode Built-in Functions." Day. page 429 Chapter 1. "PeopleCode Built-in Functions. page 173 Chapter 1." IsDate. page 694 Chapter 1." Days365." IsDaylightSavings." DateTimeToLocalizedString.

"PeopleCode Built-in Functions." SetDefaultAll. page 727 Chapter 3." %DateTimeOut." SetTraceSQL." %PerfTime. "System Variables." SetTracePC. page 7 and Chapter 1." %DateTime. Oracle and/or its affiliates." %Time. page 633 Chapter 2. "System Variables. page 605 Chapter 1. page 773 Chapter 2. "Meta-SQL. "PeopleCode Built-in Functions. page 724 Chapter 2." %DateDiff. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." Try." %TextIn. page 25 Debugging Chapter 1. "Meta-SQL. "PeopleCode Built-in Functions. "Meta-SQL. "System Variables. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. 2009. page 792 Chapter 2." SetDefault. "PeopleCode Built-in Functions. page 580 10 Copyright © 1988." %DateTimeDiff. page 701 Chapter 3. "Meta-SQL. page 696 Chapter 1.PeopleCode Built-in Functions Chapter 1 Chapter 2. ." %Test." WinMessage. page 785 Chapter 3. "System Variables. page 723 Chapter 2. "System Variables. page 752 Chapter 1. "Meta-SQL. page 579 Chapter 1. page 784 Chapter 3. "PeopleCode Built-in Functions." WriteToLog. page 753 See Also Chapter 1." %ServerTimeZone. page 601 Chapter 1." Throw. "PeopleCode Built-in Functions." %DateAdd. page 143 Chapter 1." Current Date and Time. page 788 Chapter 3." SQL Date and Time. "Meta-SQL. page 667 Chapter 1. page 768 Defaults. "Meta-SQL." %ApplicationLogFence. "System Variables. Setting Chapter 1. "PeopleCode Built-in Functions. page 720 Chapter 3. "Meta-SQL." CreateException." %DTTM. All Rights Reserved." %DateTimeIn. page 725 Chapter 2. page 720 Chapter 2." %PermissionLists.

page 581 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 83 Chapter 1." CurrEffRowNum. "PeopleCode Built-in Functions. page 470 Chapter 1." AddEmailAddress. "PeopleCode Built-in Functions." %EffDtCheck." SetDefaultPrior." GetEnv. page 581 Chapter 1. page 581 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 451 Environment Chapter 1." NextRelEffDt. "PeopleCode Built-in Functions." SetDefaultNext." NextEffDt." SetDefaultNext. page 166 Chapter 1. 11 ." MarkPrimaryEmailAddress. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 493 Chapter 1. 2009." SetDefaultNextRel. page 48 Chapter 1. "PeopleCode Built-in Functions. page 167 Chapter 1. "PeopleCode Built-in Functions. page 257 Chapter 1.Chapter 1 PeopleCode Built-in Functions Chapter 1." CurrEffDt. page 581 Chapter 1." PriorRelEffDt. "PeopleCode Built-in Functions." SetDefaultNextRel. page 582 Chapter 1. page 339 Chapter 3." GetCwd. All Rights Reserved. page 492 Chapter 1. page 469 Chapter 1." ChangeEmailAddress." %PID." SetDefaultPriorRel. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 582 Chapter 1. Oracle and/or its affiliates. "PeopleCode Built-in Functions. page 338 Chapter 1. page 728 Email Chapter 1. "PeopleCode Built-in Functions." CurrEffSeq." SetDefaultPrior. "System Variables. page 583 Chapter 2. "Meta-SQL. "PeopleCode Built-in Functions. page 786 Copyright © 1988." PriorEffDt. page 196 Chapter 1. page 583 Effective Date and Effective Sequence Chapter 1." ExpandEnvVar. "PeopleCode Built-in Functions. page 167 Chapter 1." DeleteEmailAddress." SetDefaultPriorRel. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions.

page 62 Chapter 1. page 20 Files Chapter 1. "PeopleCode Built-in Functions." Throw." BlackScholesCall. page 63 Chapter 1." BlackScholesPut." BootstrapYTMs. page 247 Chapter 1." FileExists. page 64 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 695 See Also Chapter 1." Exec. Running Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." Attachment." WinExec. "PeopleCode Built-in Functions." ConvertRate. "PeopleCode Built-in Functions." AccrualFactor." CreateException. page 775 See Also Chapter 1. "PeopleCode Built-in Functions. "System Variables. "PeopleCode Built-in Functions. page 121 12 Copyright © 1988. page 270 Chapter 1. 2009. Oracle and/or its affiliates. "PeopleCode Built-in Functions." FindFiles. "PeopleCode Built-in Functions. page 34 Chapter 1. "PeopleCode Built-in Functions. page 265 Chapter 1. page 521 Chapter 3. "PeopleCode Built-in Functions." AccruableDays. page 13 Financial Chapter 1." CreateDirectory. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." %FilePath. All Rights Reserved. page 341 Chapter 1." RemoveDirectory. page 633 Chapter 1. "PeopleCode Built-in Functions. page 3 and Chapter 1. "PeopleCode Built-in Functions." Object.PeopleCode Built-in Functions Chapter 1 Exceptions Chapter 1." Images. page 667 Executable Files. "PeopleCode Built-in Functions. page 142 Chapter 1. page 143 Chapter 1. page 32 Chapter 1." Try. "PeopleCode Built-in Functions." GetFile. .

"PeopleCode Built-in Functions. page 517 Copyright © 1988." EncryptNodePswd." LinearInterp. page 445 Grids Chapter 1." IBPurgeNodesDown." HermiteCubic. "PeopleCode Built-in Functions." Files. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." PingNode." IBPurgeDomainStatus." GetImageExtents. "PeopleCode Built-in Functions." Attachment." NodeTranDelete. page 3 and Chapter 1. "PeopleCode Built-in Functions.Chapter 1 PeopleCode Built-in Functions Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." NodeDelete. page 419 See Also Chapter 1. "PeopleCode Built-in Functions. page 404 Chapter 1." CreateWSDLMessage." RelNodeTranDelete. "PeopleCode Built-in Functions. All Rights Reserved. 2009. page 162 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 470 Chapter 1." ConnectorRequestURL." GetGrid. page 197 Chapter 1. Oracle and/or its affiliates. "PeopleCode Built-in Functions." NodeRename." DeleteImage. "PeopleCode Built-in Functions." FindCodeSetValues. page 268 Chapter 1." ConnectorRequest. "PeopleCode Built-in Functions. page 233 Chapter 1. page 491 Chapter 1. "PeopleCode Built-in Functions. page 413 Chapter 1." HistVolatility. "PeopleCode Built-in Functions. page 472 Chapter 1. page 349 Chapter 1." NodeSaveAs." CubicSpline. page 473 Chapter 1." InsertImage. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. 13 . page 106 Chapter 1. "PeopleCode Built-in Functions. page 105 Chapter 1. page 163 Chapter 1. page 346 Images Chapter 1. page 474 Chapter 1. page 411 Chapter 1. page 12 Integration Broker Chapter 1. page 412 Chapter 1.

All Rights Reserved." CreateSOAPDoc." SetMessageStatus. page 228 Chapter 1. page 297 Chapter 1. "System Variables." EncodeURL. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." SetChannelStatus. "PeopleCode Built-in Functions. page 230 Chapter 1." GenerateExternalPortalURL. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." GenerateQueryRelativeURL. "PeopleCode Built-in Functions. page 303 Chapter 1. page 298 Chapter 1." %TransformData. "PeopleCode Built-in Functions." GenerateComponentContentRelURL. page 561 Chapter 1." GenerateHomepagePortalURL." GenerateComponentRelativeURL. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." %IntBroker." GenerateActGuidePortalUrl." EscapeWML. page 587 Chapter 1.PeopleCode Built-in Functions Chapter 1 Chapter 1. "PeopleCode Built-in Functions." GenerateComponentPortalURL. page 661 Chapter 1. page 159 Chapter 1. "PeopleCode Built-in Functions." Transform. page 282 Chapter 1. "System Variables. page 792 Internet Chapter 1. "PeopleCode Built-in Functions. page 306 14 Copyright © 1988. page 280 Chapter 1. page 244 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 242 Chapter 1." GenerateExternalRelativeURL." EscapeHTML." GenerateActGuideContentUrl. "PeopleCode Built-in Functions." TransformEx. Oracle and/or its affiliates. page 292 Chapter 1. "PeopleCode Built-in Functions." EncodeURLForQueryString. page 285 Chapter 1. page 290 Chapter 1. ." GenerateQueryPortalURL." GenerateHomepageRelativeURL. page 288 Chapter 1. "PeopleCode Built-in Functions." GenerateComponentPortalRelURL." GenerateComponentContentURL. page 304 Chapter 1. "PeopleCode Built-in Functions. page 295 Chapter 1. page 279 Chapter 1. page 283 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. 2009." TransformExCache. page 659 Chapter 1." EscapeJavascriptString. page 662 Chapter 3. "PeopleCode Built-in Functions." GenerateQueryContentURL. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." GenerateActGuideRelativeUrl. page 776 Chapter 3. page 296 Chapter 1. page 245 Chapter 1.

page 771 Chapter 3. "PeopleCode Built-in Functions. "System Variables. "System Variables. 2009." GenerateTree. "System Variables." %ContentType. "PeopleCode Built-in Functions. page 668 Chapter 1. page 778 Chapter 3." GenerateWorklistRelativeURL. "PeopleCode Built-in Functions." CopyToJavaArray. "PeopleCode Built-in Functions. page 317 Chapter 1. page 311 Chapter 1. page 355 Chapter 1. "PeopleCode Built-in Functions." %ContentID." GenerateScriptContentURL. page 786 Chapter 3. "System Variables. "System Variables. page 130 Chapter 1." GetHTMLText. "System Variables." %HPTabName." %EmailAddress." %Response. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." GenerateScriptRelativeURL." GenerateWorklistPortalURL. page 781 Chapter 3. page 337 Chapter 1. "System Variables." %LocalNode. page 397 Chapter 1. "PeopleCode Built-in Functions. page 319 Chapter 1. All Rights Reserved. "PeopleCode Built-in Functions. "System Variables. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. Oracle and/or its affiliates." GenerateScriptContentRelURL." GenerateScriptPortalURL. "PeopleCode Built-in Functions. page 787 Chapter 3." Unencode. "System Variables." GetMethodNames. page 788 Java Chapter 1. "PeopleCode Built-in Functions. page 145 Copyright © 1988." %Request." %Portal. page 690 Chapter 3." %RunningInPortal. "System Variables." ViewURL. 15 . page 315 Chapter 1." CreateJavaArray." %Node. "PeopleCode Built-in Functions. page 318 Chapter 1." GetURL." ViewContentURL. page 310 Chapter 1. "PeopleCode Built-in Functions. page 775 Chapter 3. page 348 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 308 Chapter 1. page 771 Chapter 3. page 787 Chapter 3. page 774 Chapter 3. "PeopleCode Built-in Functions." GetChartURL. page 689 Chapter 1." CopyFromJavaArray." GenerateScriptPortalRelURL. page 133 Chapter 1. page 313 Chapter 1.Chapter 1 PeopleCode Built-in Functions Chapter 1.

"PeopleCode Built-in Functions. "PeopleCode Built-in Functions." Local. page 245 Chapter 1. "System Variables. page 586 Chapter 3. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." SetLanguage. "PeopleCode Built-in Functions. page 352 Language Constructs Chapter 1. "System Variables." %Language. page 277 Chapter 1. Oracle and/or its affiliates. page 776 Chapter 3." Throw. page 528 Chapter 1. page 273 Chapter 1." %Language_Data." %Language_User. page 776 Chapter 3." GetJavaClass." %Language_Base. page 400 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 633 Chapter 1. page 185 Chapter 1." Break. page 777 Chapter 3. page 103 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." Return. page 535 Chapter 1. "PeopleCode Built-in Functions." %IsMultiLanguageEnabled." Evaluate. "System Variables. page 777 Chapter 3. page 667 Chapter 1. "System Variables." While. page 112 Chapter 1." Component. "PeopleCode Built-in Functions." Function. page 146 Chapter 1. "PeopleCode Built-in Functions." Try." If. page 777 Chapter 3. 2009. page 694 Language Preference and Locale Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." For." Declare Function. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. ." Continue. All Rights Reserved. page 414 Chapter 1.PeopleCode Built-in Functions Chapter 1 Chapter 1. page 446 Chapter 1." CreateJavaObject. "System Variables." %Market. page 254 Chapter 1." Exit. "PeopleCode Built-in Functions." Repeat. "PeopleCode Built-in Functions. "System Variables. page 65 Chapter 1. page 778 16 Copyright © 1988." Global. "PeopleCode Built-in Functions.

"PeopleCode Built-in Functions. page 259 Chapter 1." Atan." Abs. page 413 Chapter 1." Asin. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 490 Mail Chapter 1. "PeopleCode Built-in Functions. page 449 Chapter 1." Degrees." Cot. page 453 Chapter 1." SendMail." AllOrNone. page 462 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." OnlyOne. "PeopleCode Built-in Functions. page 61 Chapter 1. "PeopleCode Built-in Functions. page 489 Chapter 1. "System Variables." Max." Idiv." Exp." Acos. "PeopleCode Built-in Functions. All Rights Reserved. page 190 Chapter 1. page 774 Math Chapter 1." %EmailAddress. "PeopleCode Built-in Functions. page 57 Chapter 1. page 424 Chapter 1." Integer." OnlyOneOrNone. page 35 Chapter 1. page 423 Chapter 1. page 446 Chapter 1. "PeopleCode Built-in Functions." None. page 60 Chapter 1." Min. page 135 Chapter 1. page 56 Chapter 1. "PeopleCode Built-in Functions. page 134 Chapter 1. "PeopleCode Built-in Functions. Oracle and/or its affiliates." Mod." All. "PeopleCode Built-in Functions. page 463 Copyright © 1988. page 475 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." Fact. "PeopleCode Built-in Functions. page 556 Chapter 3. "PeopleCode Built-in Functions. page 32 Chapter 1. 17 . page 255 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." Int.Chapter 1 PeopleCode Built-in Functions Logical (Tests for Blank Values) Chapter 1." Log10. 2009." Cos." Ln.

page 758 Menu Appearance Chapter 1." %Round." Product." Truncate. page 466 Chapter 1." %DecDiv. page 668 Message Catalog and Message Display Chapter 1. "PeopleCode Built-in Functions." MsgGetText. page 234 Chapter 1. "PeopleCode Built-in Functions. page 726 Chapter 2. page 541 Chapter 1." %Abs. "PeopleCode Built-in Functions. page 747 Chapter 2. page 510 Chapter 1." Radians. All Rights Reserved. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." %Truncate. . "Meta-SQL." DisableMenuItem." Quote. page 495 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 620 Chapter 1." MsgGetExplainText. page 632 Chapter 1." Rand. page 508 18 Copyright © 1988. "PeopleCode Built-in Functions. page 456 Chapter 1." Tan. 2009." EnableMenuItem. "PeopleCode Built-in Functions. page 509 Chapter 1. "Meta-SQL. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." Round." HideMenuItem. page 89 Chapter 1." Sign. "PeopleCode Built-in Functions." CheckMenuItem. "PeopleCode Built-in Functions. page 240 Chapter 1." %DecMult. page 714 Chapter 2. page 610 Chapter 1. page 467 Chapter 1. page 227 Chapter 1. "PeopleCode Built-in Functions. "Meta-SQL. "PeopleCode Built-in Functions." Sqrt. page 609 Chapter 1. "PeopleCode Built-in Functions. Oracle and/or its affiliates. "PeopleCode Built-in Functions. "Meta-SQL. "Meta-SQL. page 407 Chapter 1. "PeopleCode Built-in Functions." MessageBox. "PeopleCode Built-in Functions. page 214 Chapter 1." Error. "PeopleCode Built-in Functions. page 726 Chapter 2. page 468 Chapter 1. page 666 Chapter 2." Sin.PeopleCode Built-in Functions Chapter 1 Chapter 1. "PeopleCode Built-in Functions." MsgGet." EndMessage." UnCheckMenuItem.

"PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "System Variables." Warning. page 535 Chapter 1. "PeopleCode Built-in Functions." PingNode." Secondary Pages. page 356 Chapter 1." CreateMCFIMInfo." DoModalComponent. page 203 Chapter 1. "PeopleCode Built-in Functions." XML." GetMessage. 2009. "PeopleCode Built-in Functions. page 587 Chapter 3. 19 . "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 437 See Also Chapter 1. "PeopleCode Built-in Functions." DeQueue. page 561 Chapter 1." %MaxMessageSize. page 236 Chapter 1." AddSystemPauseTimes. page 779 See Also Chapter 1. "PeopleCode Built-in Functions. page 28 MultiChannel Framework Chapter 1. page 691 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 696 Messages Chapter 1." ReturnToServer. page 148 Chapter 1. "PeopleCode Built-in Functions. page 220 Chapter 1. page 162 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." SetChannelStatus. "PeopleCode Built-in Functions." CreateMessage. page 434 Chapter 1." EndModalComponent. "PeopleCode Built-in Functions." SetMessageStatus. page 24 and Chapter 1." GetSyncLogData. page 50 Chapter 1. "PeopleCode Built-in Functions." WinMessage." IsModalComponent. Oracle and/or its affiliates. "PeopleCode Built-in Functions. page 31 Modal Transfers Chapter 1." DeleteSystemPauseTimes.Chapter 1 PeopleCode Built-in Functions Chapter 1. page 395 Chapter 1. page 147 Chapter 1. All Rights Reserved. page 491 Chapter 1." Transfers." IsMessageActive." CreateWSDLMessage. page 205 Copyright © 1988. "PeopleCode Built-in Functions.

" ObjectDoMethod." EnQueue. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 143 Chapter 1." CreateObjectArray. page 201 20 Copyright © 1988. page 159 Chapter 1. "PeopleCode Built-in Functions. Oracle and/or its affiliates." CreateXmlDoc. page 486 Chapter 1. page 476 Object Chapter 1." NotifyQ." CreateSQL. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 416 Chapter 1." InitChat." CreateJavaObject. "PeopleCode Built-in Functions. page 488 Object-Oriented Chapter 1. All Rights Reserved. page 152 Chapter 1." CreateRecord. page 154 Chapter 1. "PeopleCode Built-in Functions." CreateMessage. page 145 Chapter 1." CreateProcessRequest. page 153 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." Forward. page 454 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 237 Chapter 1." ObjectGetProperty. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." ObjectSetProperty." ObjectDoMethodArray." CreateObjectArray. "PeopleCode Built-in Functions." CreateException." CreateObject. 2009. "PeopleCode Built-in Functions." CreateArray." CreateJavaArray. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." CreateSOAPDoc. page 149 Chapter 1. page 152 Chapter 1." CreateArrayRept. page 148 Chapter 1. page 156 Chapter 1. "PeopleCode Built-in Functions. page 160 Chapter 1. page 138 Chapter 1. "PeopleCode Built-in Functions. page 162 Chapter 1. "PeopleCode Built-in Functions. page 149 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 275 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." CreateObject. page 146 Chapter 1." CreateRowset. page 484 Chapter 1. .PeopleCode Built-in Functions Chapter 1 Chapter 1. page 485 Chapter 1." MCFBroadcast. page 140 Chapter 1." DeleteSQL.

" GetField." Split. "PeopleCode Built-in Functions. page 380 Chapter 1. "PeopleCode Built-in Functions. page 387 Chapter 1. page 357 Chapter 1. "PeopleCode Built-in Functions. page 321 Chapter 1. page 377 Chapter 1. page 623 Copyright © 1988. page 352 Chapter 1." GetInterlink. page 338 Chapter 1. "PeopleCode Built-in Functions. page 389 Chapter 1. page 340 Chapter 1." ObjectGetProperty." GetCwd." ObjectSetProperty. page 336 Chapter 1.Chapter 1 PeopleCode Built-in Functions Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 260 Chapter 1." GetRow. page 341 Chapter 1. "PeopleCode Built-in Functions." GetMessageInstance. page 337 Chapter 1. page 393 Chapter 1. page 346 Chapter 1." GetJavaClass. page 447 Chapter 1. "PeopleCode Built-in Functions." LogObjectUse." ObjectDoMethod." GetPubContractInstance. page 488 Chapter 1. "PeopleCode Built-in Functions." GetSubContractInstance." FetchSQL. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. 21 . page 383 Chapter 1." GetMessageXmlDoc. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." GetRecord." GetHTMLText. page 384 Chapter 1. page 348 Chapter 1. page 350 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 613 Chapter 1." GetSession." ObjectDoMethodArray." GetChart. page 484 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." GetLevel0. page 357 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." GetMessage." GetSQL. page 486 Chapter 1. All Rights Reserved." GetFile. Oracle and/or its affiliates. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." ReturnToServer. page 485 Chapter 1. page 535 Chapter 1." StoreSQL. "PeopleCode Built-in Functions. 2009." GetRowset. page 356 Chapter 1." GetAESection. page 353 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." GetChartURL." GetGrid.

" HideRow." SetupScheduleDefnItem. page 607 Chapter 3." GetNextProcessInstance. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 782 22 Copyright © 1988." SetCursorPos." SetUserOption. page 368 Page Control Appearance Chapter 1. page 584 Chapter 1. "System Variables. page 669 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 409 Chapter 1." HideScroll. page 671 Chapter 1. "PeopleCode Built-in Functions." IsHidden. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. Oracle and/or its affiliates. page 365 Chapter 1. page 401 Chapter 1. "PeopleCode Built-in Functions. page 432 Chapter 1. page 592 Chapter 1. page 408 Chapter 1. "PeopleCode Built-in Functions. . page 349 Chapter 1." UnhideRow. "PeopleCode Built-in Functions. 2009." CreateProcessRequest. page 673 Chapter 1. page 405 Chapter 1." GetPage. page 399 Chapter 1." GetImageExtents. "PeopleCode Built-in Functions." Ungray." %OutDestFormat. "PeopleCode Built-in Functions. page 566 Chapter 1. page 153 Chapter 1. "PeopleCode Built-in Functions." UnhideScroll. "PeopleCode Built-in Functions." %OutDestType. All Rights Reserved." GetUserOption." Unhide. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 608 Process Scheduler Chapter 1.PeopleCode Built-in Functions Chapter 1 Page Chapter 1. "PeopleCode Built-in Functions." SetLabel." Gray. "PeopleCode Built-in Functions. "System Variables. page 674 Personalizations Chapter 1. "PeopleCode Built-in Functions." Hide." SetPostReport. page 782 Chapter 3.

" RowFlush. "PeopleCode Built-in Functions. page 596 Chapter 1." WinEscape. page 553 Chapter 1." DoCancel. "PeopleCode Built-in Functions." ScrollFlush." RowScrollSelectNew. page 549 Chapter 1." DoSaveNow. page 217 Chapter 1. 23 . page 695 Scroll Select Chapter 1. "PeopleCode Built-in Functions." ClearSearchDefault." ScrollSelect. page 385 Saving and Canceling Chapter 1. 2009. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 546 Chapter 1. "PeopleCode Built-in Functions." DoSave. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. All Rights Reserved. page 439 Chapter 1. Oracle and/or its affiliates." SortScroll." GetRowsetCache." ClearSearchEdit. page 225 Chapter 1. "PeopleCode Built-in Functions. page 93 Chapter 1. page 225 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 551 Chapter 1." SetSearchDefault." RemoteCall. page 518 RowsetCache Chapter 1. "PeopleCode Built-in Functions. page 542 Chapter 1. "PeopleCode Built-in Functions.Chapter 1 PeopleCode Built-in Functions Remote Call Chapter 1. "PeopleCode Built-in Functions." RowScrollSelect. page 92 Chapter 1. page 158 Chapter 1. "PeopleCode Built-in Functions." ScrollSelectNew." IsSearchDialog. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 224 Chapter 1. page 611 Search Dialog Chapter 1." CreateRowsetCache. page 544 Chapter 1. "PeopleCode Built-in Functions." SetSearchDialogBehavior." DoSaveNow. page 597 Copyright © 1988.

page 739 Chapter 2. "PeopleCode Built-in Functions. "Meta-SQL." %Like. "Meta-SQL. page 436 See Also Chapter 1." GetSQL." SetSearchEdit.PeopleCode Built-in Functions Chapter 1 Chapter 1. "Meta-SQL. page 736 Chapter 2. page 258 Chapter 1. "PeopleCode Built-in Functions. 2009." DeleteSQL. "Meta-SQL. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." ExpandBindVar. "PeopleCode Built-in Functions." %InsertSelect. page 260 Chapter 1." IsModal. All Rights Reserved." %Join." CreateSQL. page 598 Chapter 3. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 235 Chapter 1." FetchSQL. page 614 Chapter 1. "System Variables. "Meta-SQL. page 780 Secondary Pages Chapter 1." %KeyEqualNoEffDt." FlushBulkInserts. page 623 Chapter 2. page 731 Chapter 2. page 160 Chapter 1." %LikeExact." EndModal. page 256 Chapter 1." Modal Transfers. Oracle and/or its affiliates." Transfers. page 19 and Chapter 1. page 742 Chapter 2. "Meta-SQL. page 738 Chapter 2. "PeopleCode Built-in Functions. "Meta-SQL." %KeyEqual. page 735 Chapter 2." ExpandSqlBinds." %FirstRows. . "PeopleCode Built-in Functions. page 272 Chapter 1. page 744 24 Copyright © 1988. "PeopleCode Built-in Functions. page 201 Chapter 1. page 729 Chapter 2." %Mode. page 740 Chapter 2. "PeopleCode Built-in Functions. "Meta-SQL." %NoUppercase. "Meta-SQL. page 389 Chapter 1. page 217 Chapter 1." DoModal. "PeopleCode Built-in Functions. page 28 SQL Chapter 1." StoreSQL." SQLExec." %InsertValues. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions.

" %SQLRows. "Meta-SQL. page 724 Chapter 2. page 8 and Chapter 1. page 791 Chapter 2. "Meta-SQL. "Meta-SQL." %DateTimeDiff. Oracle and/or its affiliates. page 756 Copyright © 1988. "Meta-SQL." %DateTimeIn." %TimePart. "PeopleCode Built-in Functions. page 748 Chapter 3. 25 . "Meta-SQL. "Meta-SQL. All Rights Reserved." %DateDiff." %OldKeyEqual. page 723 Chapter 2. "Meta-SQL. page 754 Chapter 2. page 725 Chapter 2. "Meta-SQL." %UpdatePairs. "System Variables. "Meta-SQL. page 789 Chapter 2. "Meta-SQL. "Meta-SQL. page 753 Chapter 2. page 756 Chapter 2. page 755 Chapter 2." %DateOut. "Meta-SQL. "Meta-SQL. "System Variables." %TextIn." %DateTimeNull. page 748 Chapter 3." %SQL. "Meta-SQL. page 720 Chapter 2. page 721 Chapter 2." Data Buffer Access. "PeopleCode Built-in Functions." %DateNull." %DatePart. "Meta-SQL. 2009. page 755 Chapter 2. "Meta-SQL. page 746 Chapter 2. "Meta-SQL." %DateIn. page 720 Chapter 2. page 727 Chapter 2. "Meta-SQL." %DateTimeOut." %SQL." %DateAdd." %TimeIn. "Meta-SQL. "Meta-SQL. "Meta-SQL. page 722 Chapter 2." %SignonUserId." %Table. page 760 See Also Chapter 1. "Meta-SQL. page 724 Chapter 2." %TimeOut. page 722 Chapter 2." Scroll Select. page 721 Chapter 2." %TimeNull. page 751 Chapter 2." %DTTM.Chapter 1 PeopleCode Built-in Functions Chapter 2." %TimeAdd. page 23 SQL Date and Time Chapter 2.

page 184 Chapter 2." %SelectByKeyEffDt. "Meta-SQL. "Meta-SQL." IsAlphaNumeric." %Delete. "Meta-SQL. page 89 Chapter 1." Find." %Concat. "Meta-SQL. page 94 Chapter 1. page 444 26 Copyright © 1988. "PeopleCode Built-in Functions. page 765 String Chapter 1." %SelectAll. page 763 Chapter 2.PeopleCode Built-in Functions Chapter 1 See Also Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." %COALESCE. page 763 Chapter 2." Exact. "PeopleCode Built-in Functions." %SelectDistinct." Date and Time. page 257 Chapter 1. page 763 Chapter 2. page 443 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "Meta-SQL. page 256 Chapter 1. Oracle and/or its affiliates. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 430 Chapter 1. page 184 Chapter 1. page 348 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 7 and Chapter 1." %Insert. "PeopleCode Built-in Functions. page 764 Chapter 2. 2009. "PeopleCode Built-in Functions." GetHTMLText. page 8 SQL Shortcuts Chapter 2. page 764 Chapter 2." IsAlpha." Code." Clean." Len. page 716 Chapter 2. page 765 Chapter 2. page 425 Chapter 1." %Update. "Meta-SQL. "PeopleCode Built-in Functions." Left. "Meta-SQL. "PeopleCode Built-in Functions. "Meta-SQL. . page 267 Chapter 1. page 247 Chapter 1. page 426 Chapter 1." DBCSTrim." IsDigits." ExpandBindVar. page 717 Chapter 1." Current Date and Time. "Meta-SQL. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." %SelectByKey. All Rights Reserved." ExpandEnvVar." DBPatternMatch.

"PeopleCode Built-in Functions. page 679 Chapter 2." FormatDateTime. page 450 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 530 Chapter 1." Proper. "PeopleCode Built-in Functions. page 751 TimeZone Chapter 1.Chapter 1 PeopleCode Built-in Functions Chapter 1. page 481 Chapter 1. page 120 Chapter 1. "PeopleCode Built-in Functions." NumberToString. 2009. "Meta-SQL. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 451 Chapter 1." LTrim. page 508 Chapter 1. "PeopleCode Built-in Functions. page 637 Copyright © 1988." %Upper. page 529 Chapter 1." Replace." Rept." %Substring." %NumToChar. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." Quote. page 540 Chapter 1." %Abs. page 626 Chapter 1. page 757 Chapter 2. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "Meta-SQL. page 750 Chapter 2. page 123 Chapter 1." Right." Substring. "PeopleCode Built-in Functions." Lower. page 497 Chapter 1." IsDaylightSavings. page 625 Chapter 1. page 274 Chapter 1. page 745 Chapter 2. page 429 Chapter 1." %SUBREC. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." %TrimSubstr." ConvertDatetimeToBase." TimeToTimeZone. page 178 Chapter 1." Upper. page 761 Subrecords Chapter 2. Oracle and/or its affiliates." RTrim. "Meta-SQL. page 548 Chapter 1." String. page 627 Chapter 1. All Rights Reserved." ConvertTimeToBase. page 714 Chapter 2. "Meta-SQL. "PeopleCode Built-in Functions. page 477 Chapter 1. 27 . "PeopleCode Built-in Functions." Substitute." NumberToDisplayString. "Meta-SQL. "PeopleCode Built-in Functions." DateTimeToTimeZone. "Meta-SQL. "PeopleCode Built-in Functions.

"PeopleCode Built-in Functions." Transfer." Modal Transfers." TimeZoneOffset." ValueUser. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 654 See Also Chapter 1. page 681 Chapter 1." TransferPortal." IsAlphaNumeric. page 788 Trace Control Chapter 1. "PeopleCode Built-in Functions. page 49 Chapter 1." TransferNode. page 428 Chapter 1. page 642 Chapter 1." IsDateTime. page 427 Chapter 1." %ServerTimeZone. "PeopleCode Built-in Functions." IsDate." SetTracePC. "PeopleCode Built-in Functions. page 430 Chapter 1. "PeopleCode Built-in Functions. page 91 Chapter 1. page 588 Chapter 1. page 425 Chapter 1. "PeopleCode Built-in Functions. page 605 Transfers Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." IsDigits. page 770 Chapter 3. page 652 Chapter 1." IsNumber." ClearKeyList." IsUserNumber." SetTraceSQL." %ClientTimeZone. page 438 28 Copyright © 1988." Secondary Pages." SetNextPage. page 646 Chapter 1. "PeopleCode Built-in Functions.PeopleCode Built-in Functions Chapter 1 Chapter 1. "System Variables. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. 2009. page 19 and Chapter 1. page 639 Chapter 3." AddKeyListItem. page 24 Type Checking Chapter 1." TransferPage. "PeopleCode Built-in Functions." IsAlpha. Oracle and/or its affiliates. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 442 Chapter 1. "System Variables. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 658 Chapter 1. "PeopleCode Built-in Functions. All Rights Reserved. "PeopleCode Built-in Functions." TransferExact. . page 601 Chapter 1. page 426 Chapter 1.

" Decrypt. "PeopleCode Built-in Functions. "System Variables. page 591 Chapter 1. "PeopleCode Built-in Functions. "System Variables. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 253 Chapter 1. page 453 Chapter 1. page 462 Chapter 1. page 58 Chapter 1. page 253 Chapter 1." %EmployeeId. "PeopleCode Built-in Functions. page 442 Chapter 1. page 793 Chapter 3. page 232 Chapter 1." %UserDescription." SwitchUser. page 441 Chapter 1. "PeopleCode Built-in Functions. page 433 Chapter 1." NumberToString. page 538 Chapter 1. page 793 User Security Chapter 1. page 251 Chapter 1." %NavigatorHomePermissionList. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." SetPasswordExpired. "PeopleCode Built-in Functions. All Rights Reserved. page 440 Chapter 1. "PeopleCode Built-in Functions." ExecuteRoleWorkflowQuery." SetAuthenticationResult. page 775 Chapter 3." IsMenuItemAuthorized. page 481 User Information Chapter 3." %AuthenticationToken." Min." %EmailAddress. "System Variables." IsTime." IsUserInPermissionList. "System Variables. page 774 Chapter 3." AllowEmplIdChg." ExecuteRolePeopleCode." IsUserInRole. page 774 Chapter 3. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." %UserId. "PeopleCode Built-in Functions. "System Variables. Oracle and/or its affiliates. page 780 Copyright © 1988. page 774 Chapter 3." ExecuteRoleQuery. page 629 Chapter 3. 29 . "PeopleCode Built-in Functions." RevalidatePassword. "System Variables." Max. page 189 Chapter 1. 2009. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "System Variables.Chapter 1 PeopleCode Built-in Functions Chapter 1. page 558 Chapter 1. page 769 Chapter 3." %EmployeeId." Hash. "PeopleCode Built-in Functions." Encrypt." %ExternalAuthInfo. page 403 Chapter 1. "System Variables. "PeopleCode Built-in Functions.

"System Variables. "System Variables. page 433 Chapter 1." IsMenuItemAuthorized. page 282 Chapter 1." %PasswordExpired. page 793 Validation Chapter 1. "PeopleCode Built-in Functions." %UserId. . "PeopleCode Built-in Functions." GenerateActGuideContentUrl." TriggerBusinessEvent. "System Variables. page 787 Chapter 3. "PeopleCode Built-in Functions. page 786 Chapter 3. "PeopleCode Built-in Functions." %SignonUserId. "PeopleCode Built-in Functions. page 784 Chapter 3. page 665 Chapter 3. page 279 Chapter 1. page 691 Workflow Chapter 1. "System Variables." Error. page 789 Chapter 3." %ProcessProfilePermissionList. "System Variables." Warning." SetReEdit. page 787 Chapter 3. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." GenerateActGuidePortalUrl." RevalidatePassword. "System Variables." SetCursorPos. "System Variables. "System Variables. page 452 Chapter 1. page 240 Chapter 1. "PeopleCode Built-in Functions. page 399 Chapter 1. page 786 Chapter 3. "PeopleCode Built-in Functions." %RowSecurityPermissionList." %Roles." %PSAuthResult.PeopleCode Built-in Functions Chapter 1 Chapter 3." %ResultDocument." %AllowRecipientLookup." GenerateActGuideRelativeUrl." MarkWLItemWorked." %AllowNotification. page 789 Chapter 3. page 788 Chapter 3. Oracle and/or its affiliates. "System Variables. page 280 Chapter 1. "System Variables. "System Variables." %PermissionLists. page 538 Chapter 1." %SignOnUserPswd. All Rights Reserved." GetWLFieldValue. "PeopleCode Built-in Functions." %PrimaryPermissionList. page 769 30 Copyright © 1988. "PeopleCode Built-in Functions. page 566 Chapter 1. page 785 Chapter 3. page 767 Chapter 3. page 595 Chapter 1." %BPName. "PeopleCode Built-in Functions. page 767 Chapter 3. "System Variables. "System Variables. 2009. "System Variables. page 788 Chapter 3.

"System Variables. page 537 Chapter 1." GetNRXmlDoc." CancelPubXmlDoc. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 532 Chapter 1." CancelPubHeaderXmlDoc. "PeopleCode Built-in Functions. Oracle and/or its affiliates. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 631 Chapter 1. "PeopleCode Built-in Functions. page 81 Chapter 1." CancelSubXmlDoc. page 531 Chapter 1." %SMTPBlackberryReplyTo. "System Variables." %WLName." Transform. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "System Variables." GetPubXmlDoc. "PeopleCode Built-in Functions. page 159 Chapter 1. page 393 Chapter 1.Chapter 1 PeopleCode Built-in Functions Chapter 3." ReSubmitPubXmlDoc. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 325 Chapter 1." UpdateXmlDoc. "PeopleCode Built-in Functions. "System Variables. "PeopleCode Built-in Functions." %SMTPGuaranteed. page 533 Chapter 1." InboundPublishXmlDoc. page 162 Chapter 1. "PeopleCode Built-in Functions. page 79 Chapter 1." GetSyncLogData. "PeopleCode Built-in Functions." GetPubHeaderXmlDoc. "PeopleCode Built-in Functions. page 678 Copyright © 1988." CreateXmlDoc." %WLInstanceID. page 377 Chapter 1. "PeopleCode Built-in Functions. page 789 Chapter 3." ReSubmitSubXmlDoc. page 498 Chapter 1. page 324 Chapter 1. "PeopleCode Built-in Functions. page 659 Chapter 1. page 793 XML Chapter 1." GetArchPubXmlDoc. page 790 Chapter 3. All Rights Reserved." ReValidateNRXmlDoc. page 790 Chapter 3." GetArchPubHeaderXmlDoc." GetMessageXmlDoc. "PeopleCode Built-in Functions. page 793 Chapter 3. 2009." PublishXmlDoc. "System Variables." %SMTPSender. 31 . page 357 Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." CreateSOAPDoc." ReSubmitPubHeaderXmlDoc. page 325 Chapter 1." SyncRequestXmlDoc. "PeopleCode Built-in Functions. page 80 Chapter 1. page 378 Chapter 1. page 415 Chapter 1. page 395 Chapter 1." GetSubXmlDoc." GetArchSubXmlDoc. page 366 Chapter 1.

"Meta-SQL. Abs Syntax Abs(x) Description Use the Abs function to return a decimal value equal to the absolute value of a number x. 2009. 32 Copyright © 1988. page 714 AccruableDays Syntax AccruableDays(StartDate. Oracle and/or its affiliates.EndDate. Example The example returns the absolute value of the difference between &NUM_1 and &NUM_2: &RESULT = Abs(&NUM_1 ." %Abs. See Also Chapter 1." Sign. All Rights Reserved. page 609 and Chapter 2. Parameters Parameter Description x Specify the number you want the decimal value for.PeopleCode Built-in Functions Chapter 1 PeopleCode Built-in Functions and Language Constructs The following are the PeopleCode Built-In functions.Accrual_Conv) Description Use the AccruableDays function to return the number of days during which interest can accrue in a given range of time according to the Accrual_Conv parameter. "PeopleCode Built-in Functions. .&NUM_2).

page 34 Copyright © 1988. 33 ." AccrualFactor. The end of the time period for determining the accrual. This parameter takes either a number or a constant value. Values for this parameter are: EndDate Accrual_Conv Numeric Value Constant Value Description 0 %Accrual_30DPM 30/360: all months 30 days long according to NASD rules for date truncation 30E/360: all months 30 days long according to European rules for date truncation 30N/360: all months but February are 30 days long according to SIA rules Act/360: months have variable number of days. buy years have fixed 365 days Act/Act: months and years have a variable number of days 1 %Accrual_30DPME 2 N/A 3 %Accrual_Fixed360 4 %Accrual_Fixed365 5 %Accrual_ActualDPY Returns An integer representing a number of days. This parameter takes a date value. See Also Chapter 1.Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description StartDate The beginning of the time period for determining the accrual. Oracle and/or its affiliates. 2009. but years have fixed 360 days Act/365: months have variable number of days. All Rights Reserved. The accrual convention. This parameter takes a date value. "PeopleCode Built-in Functions.

but years have fixed 360 days Act/365: months have variable number of days. The end of the time period for determining the accrual.PeopleCode Built-in Functions Chapter 1 AccrualFactor Syntax AccrualFactor(StartDate. according to Accrual_Conv parameter. The accrual convention. This parameter takes a date value. 2009. This parameter takes either a number or constant value. buy years have fixed 365 days Act/Act: months and years have a variable number of days 1 %Accrual_30DPME 2 N/A 3 %Accrual_Fixed360 4 %Accrual_Fixed365 5 %Accrual_ActualDPY 34 Copyright © 1988. Values for this parameter are: EndDate Accrual_Conv Numeric Value Constant Value Description 0 %Accrual_30DPM 30/360: all months 30 days long according to NASD rules for date truncation 30E/360: all months 30 days long according to European rules for date truncation 30N/360: all months but February are 30 days long according to SIA rules Act/360: months have variable number of days. Parameters Parameter Description StartDate The beginning of the time period for determining the accrual.Accrual_Conv) Description Use the AccrualFactor function to compute a factor that's equal to the number of years of interest accrued during a date range. This parameter takes a date value.EndDate. . Oracle and/or its affiliates. All Rights Reserved.

"PeopleCode Built-in Functions." Radians.110)"). Chapter 1. "PeopleCode Built-in Functions. 35 . Chapter 1. that is. page 509. page 632 Copyright © 1988. Oracle and/or its affiliates. See Also Chapter 1. "PeopleCode Built-in Functions." Sin. "PeopleCode Built-in Functions." AccruableDays. If the input value is outside this range.Chapter 1 PeopleCode Built-in Functions Returns A floating point number representing a number of years." Tan. "PeopleCode Built-in Functions." Asin." Atan. page 134. page 135. All Rights Reserved.00 and 1. Example The following example returns the size in radians of the angle whose cosine is 0. page 60. page 190. 2009. "PeopleCode Built-in Functions. Chapter 1." Degrees. Returns A value in radians between 0 and pi. page 61." Cot. (2. an error message appears at runtime ("Decimal arithmetic error occurred. Chapter 1. the size of the angle whose cosine is that value. page 32 Acos Syntax Acos(value) Description Use the Acos function to calculate the arccosine of the given value. Adjust your code to provide a valid input value.5: &MY_ANGLE = Acos(0. Chapter 1.5). "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. Parameters Parameter Description value Any real number between -1. the range of valid cosine values. Chapter 1. See Also Chapter 1. page 610 and Chapter 1.00 inclusive." Cos. "PeopleCode Built-in Functions.

See Also Enterprise PeopleTools 8. including deleted rows. "Referencing Data in the Component Buffer.50 PeopleBook: PeopleCode API Reference." Specifying Data with References Using Scroll Path Syntax and Dot Notation Parameters Parameter Description scrollpath A construction that specifies a scroll level in the component buffer.scrollname. where scrollname is the same as the scroll level's primary record name.PeopleCode Built-in Functions Chapter 1 ActiveRowCount Syntax ActiveRowCount(Scrollpath) Where scrollpath is: [RECORD. All Rights Reserved." ActiveRowCount Enterprise PeopleTools 8. Rows that have been marked as deleted are not affected in a For loop delimited by ActiveRowCount. Description Use the ActiveRowCount function to return the number of active (non-deleted) rows for a specified scroll area in the active page. If you want to loop through all the rows of a scroll area.50 PeopleBook: PeopleCode Developer's Guide. This function remains for backward compatibility only. performing an operation on each active row.level1_row.level2_row. [RECORD. use TotalRowCount. Note. Use the ActiveRowCount Rowset class property instead. This enables you to loop through the active rows of a scroll area. "Accessing the Data Buffer" Enterprise PeopleTools 8.level2_recname.level1_recname. target_recname To prevent ambiguous references. 2009. Use ActiveRowCount with CurrentRowNumber to determine whether the user is on the last row of a record.50 PeopleBook: PeopleCode Developer's Guide. ]] RECORD. 36 Copyright © 1988. Oracle and/or its affiliates. "Rowset Class. ActiveRowCount is often used to get a limiting value for a For statement. you can use SCROLL. .

PreserveCase[.ASGN_HOME_HOST. FTP Server Storage Considerations If your storage destination is a file server.ASSIGNMENT." CurrentRowNumber. RECORD.URLname Copyright © 1988.ASSIGNMENT. RECORD. page 640 and Chapter 1. End-If. &CURRENT_L1. &HOME_HOST = FetchValue(RECORD. Chapter 1.ASGN_HOME_HOST).UserFile[. All Rights Reserved. &CURRENT_L1. 37 . AllowLargeChunks]]]] ) Description Use the AddAttachment function to upload a file from an end-user machine to a specified storage destination (either an FTP server or a database table).Chapter 1 PeopleCode Built-in Functions Returns Returns a Number value equal to the total active (non-deleted) rows in the specified scroll area in the active page." For.ASSIGNMENT. page 169. ASGN_HOME_HOST. URLDestination will be either of the following: • A URL definition.FileType. Example In this example ActiveRowCount is used to delimit a For loop through a level-one scroll: &CURRENT_L1 = CurrentRowNumber(1)." TotalRowCount. 1). If All(&HOME_HOST) Then For &I = 1 To &ACTIVE_L2 DeleteRow(RECORD. "PeopleCode Built-in Functions.DirAndFileName. MaxSize [. in the form of: URL. End-For. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 273 AddAttachment Syntax AddAttachment(URLDestination. &CURRENT_L1. 1). UploadPageTitle[. &ACTIVE_L2 = ActiveRowCount(RECORD. Note that it is the responsibility of the calling PeopleCode program to store the returned file name for further use. Oracle and/or its affiliates. See Also Chapter 1. 2009.HOME_HOST.

and path is the path on the FTP server relative to the directory specified as the FTP server's root. in the form of: protocol://FTP_user_ID:FTP_password@FTP_server_address/path where protocol is "ftp" or "ftps".URLname • A string. If the file is transferred using secure FTP (FTPS). the process will be stopped and an error (%Attachment_Failed) will be returned to user. in the form of: record://MYRECORD where MYRECORD is the record associated with a storage destination table. • • * (asterisk) : (colon) 38 Copyright © 1988.peoplesoft. Database Storage Considerations If your storage destination is a database table." Adding Secure FTP (FTPS) URLs. ." Using Attachment Functions. SFTP is not supported. See Enterprise PeopleTools 8. The default FTP port is 21. All Rights Reserved. File Name Considerations If the local source file name has any of the following characters.50 PeopleBook: System and Server Administration. 2009. "Using PeopleTools Utilities. The actual error message can be found in the logs. The FTP password to is limited to 16 characters. The length of the full URL is limited to 254 characters. URLDestination will be either of the following: • A URL definition. "Using File Attachments and PeopleCode. If you want to use a different port you must specify it in the URL. If the specified subdirectories do not exist this function tries to create them.PeopleCode Built-in Functions Chapter 1 • A string. as part of FTP_server_address. in the form of: URL.com:6000/ Note.50 PeopleBook: PeopleCode Developer's Guide. See Enterprise PeopleTools 8. Oracle and/or its affiliates. FTP_server_address is the FTP server's name or its IP address. For example: ftp://user:password@ftpserver. URLDestination must be a URL definition. The following limitations apply to the FTP URL: • • The FTP user name to is limited to 30 characters.

It is the developer's responsibility to manage this issue in their environments. 2009. Warning! You may encounter problems when a text file is uploaded from one operating system or environment and then later viewed on another. the ':' character must to be used as a delimiter between the FTP user ID and the FTP password or just before the FTP port number (if one is specified). you should exercise caution when using an '@' or ':' character in the name of a file selected for uploading or in the value of the URLDestination or DirAndFileName parameter. and the '@' character must be used as a delimiter between the FTP password and the FTP server address. (semicolon) + (plus sign) % (percent sign) & (ampersand) ' (apostrophe) ! (exclamation point) # (pound sign) $ (dollar sign) Note. A number of text file conversion utilities are available for various platforms. it is always copied to the specified destination byte-for-byte. Similar issues can occur when two file systems have different character sets.Chapter 1 PeopleCode Built-in Functions • • • • " (quotation mark) < (less than symbol) > (greater than symbol) ? (question mark) When the file is transferred. Of course. Copyright © 1988. Considerations Attaching Text Files The PeopleCode file attachment functions do not provide text file conversions when files are attached or viewed. The @ sign is not changed to an underscore on files transferred with this function. For instance. when any file is uploaded. Oracle and/or its affiliates. or different line endings. A user viewing that file in a Windows environment might see garbled content because the text file viewer is expecting ANSI encoding. 39 . In fact. the following characters are replaced with an underscore: • • • • • • • • • • @ (at sign) (space) . All Rights Reserved. Some steps you can take to avoid conversion problems include: • Educate your users. such as Japanese JIS and Unicode. In general. suppose a text file on a DB2 system is encoded in EBCDIC.

xml These tags are mandatory in VirusScan.bat) to be uploaded. with functions that aren't think-time. or any of the ScrollSelect functions. <Providers disableAll="False" logFile=". If you do not want to permit specific file types (such as ./servers/PIA/logs/VirusScan%u.ear/ PORTAL. Weblogic: <ps_home>/webserv/<domain>/applications/peoplesoft/PORTAL. Restrictions on Use in PeopleCode Events AddAttachment is a "think-time" function. you must write PeopleCode to discern the name and file type of the attached file and delete it after the fact. Oracle and/or its affiliates. see the GetAttachment and PutAttachment functions. All Rights Reserved. open the file VirusScan. Enabling Virus Scanning To enable virus scanning. .xml and set the value of disableAll to "False".PeopleCode Built-in Functions Chapter 1 • • • Standardize on file formats and encodings.war/WEB-INF/ classes/psft/pt8/virusscan.log"> The location of VirusScan.war/WEB-INF/classes/psft/pt8/virusscan. Restrict attachments to file types that are known to be compatible across user platforms. By default. disableAll is "True".xml: 40 Copyright © 1988. Specifying it does not enforce specific file types. Make sure that the user's environment supports the files being transferred. Configuring VirusScan. If you want to transfer files in a "non-interactive" mode.xml on your system depends on which web server you use.exe or . which means that it should not be used in any of the following PeopleCode events: • • • • • SavePreChange SavePostChange Workflow RowSelect Any PeopleCode event that initiates as a result of a Select or SelectNew method. Websphere: <ps_home>/webserv/<domain>/installedApps/<domain>NodeCell/<domain>. 2009. Security Considerations The FileType parameter is only a suggestion.

" Enabling Virus Scanning.xls = INFECTED The result logged for CONNECTERROR and CONFIGERROR is in the form: Unable to connect to the Scan engine: REASON = result Copyright © 1988. Logging Virus Scans Detailed logging is configured in the logging properties file on the webserver.provider. IP address of Scan Engine host.properties Set the location of the log file in VirusScan.50 PeopleBook: PeopleSoft MultiChannel Framework. "Configuring the Email Channel". Oracle and/or its affiliates.xml.virusscan. SCANERROR is in the form: filename = result For example: finance. "Configuring the Email Channel. See Enterprise PeopleTools 8.provider. The result logged for CLEAN. 2009.pt8.log"> The following results are logged with the date and the filename that was scanned. Policy command used by the Scan Engine./servers/PIA/logs/VirusScan%u. See Enterprise PeopleTools 8. GenericVirusScanProviderImpl <class> Provider Class of the Scan Engine Default provider class is: psft.properties Websphere <ps_home>/webserv/<domain>/installedApps/<domain>NodeCell/<domain> . 41 .ear/logging.pt8. Only SCAN is supported. Weblogic : <ps_home>/webserv/<domain>/applications/peoplesoft/logging.virusscan. ICAP/1.50 PeopleBook: MultiChannel Framework. <Providers disableAll="False" logFile=". All Rights Reserved. GenericVirusScanProviderImpl <icapversion> <service-name> <policycommand> ICAP version Service name for the scan engine host.xml. for complete details on configuring VirusScan. INFECTED.Chapter 1 PeopleCode Built-in Functions Tag Description Example Value for Scan Engine psft.0 /SYMCScanResp-AV ?action=SCAN <address> IP address of the machine where the scan engine is running Port where the scan engine is running <port> IP port of Scan Engine host.

"Using Methods and Built-In Functions." Select Enterprise PeopleTools 8.PeopleCode Built-in Functions Chapter 1 For example: Unable to connect to the Scan engine: REASON = CONFIGERROR Virus Scan Error Handling and Returns If the file is uploaded successfully and no problems are found in the virus scan.50 PeopleBook: PeopleCode Developer's Guide." PutAttachment. "PeopleCode Built-in Functions. "Using File Attachments and PeopleCode. Virus scan engine error. AddAttachment returns one the following return codes: Numeric Value Constant Value Description 13 %Attachment_ViolationFound File violation detected by virus scan engine. All Rights Reserved. 14 15 16 %Attachment_VirusScanError %Attachment_VirusConfigError %Attachment_VirusConnectError See Also Chapter 1. Oracle and/or its affiliates. AddAttachment returns %Attachment_Succeeded." Using File Attachments in Applications 42 Copyright © 1988. Virus scan engine configuration error.50 PeopleBook: PeopleCode API Reference. page 326 and Chapter 1. . "Rowset Class. "Rowset Class. 2009. Virus scan engine connection error. "PeopleCode Built-in Functions. page 499 Enterprise PeopleTools 8. If a problem is found.50 PeopleBook: PeopleCode API Reference.50 PeopleBook: PeopleCode Developer's Guide." GetAttachment." Think-Time Functions Enterprise PeopleTools 8." SelectNew Enterprise PeopleTools 8.

Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description URLDestination A reference to a URL. URLName.]fieldname. The FileType parameter is used only in two-tier execution (through Application Designer). This is where the file is transferred to. If the value for the DirAndFileName parameter does not end with a slash. Copyright © 1988. or a string. If the value for the DirAndFileName parameter ends with a slash. FileType A string to use as a suggestion for the extension file type. The user-selected file name cannot be greater than 64 characters. DirAndFileName A directory and filename. Note. It is ignored in PeopleSoft Pure Internet Architecture. then it is very important whether the value passed into a call of AddAttachment for the DirAndFileName parameter ends with a slash or not. such as ". two double-quotes with no space ("")) invokes all files (*. Backward slashes ("\") are not supported for this parameter. then the portion of it prior to its right-most slash will be appended to the value of the URLDestination and used to indicate the relative path name of the directory in which the uploaded file will be stored.properties" and so on.*). The URLDestination parameter requires forward slashes ("/"). Backward slashes ("\") are not supported for this parameter. "Using PeopleTools Utilities. Oracle and/or its affiliates. This can be either a URL name. If the file is transferred using secure FTP (FTPS). You must supply the recordname only if the record field and your PeopleCode program are in different record definitions. Passing in a null string (that is.doc". AddAttachment returns the user-selected filename in this parameter. then it will be appended to the value of the URLDestination and used to indicate the relative path name of the directory in which the uploaded file will be stored. Note. Note. when the file transferred to a database table. All Rights Reserved. 43 . Note.50 PeopleBook: System and Server Administration. This is appended to the URLDestination to make up the full URL when the file is transferred to an FTP server or. ". 2009. to make the file name more unique. URLDestination must be a URL definition." Adding Secure FTP (FTPS) URLs. so its initial value is ignored and it must not be specified as a string constant. Oracle recommends that you do not use a URL of the form file://filename with the PeopleCode file processing functions. Because the DirAndFileName parameter is appended to the URL. Specify UserFile as a string variable or a field reference in the form of [ recordname. ". The value given for this parameter is not enforced.gif". in the form URL. Note. See Enterprise PeopleTools 8. If the destination location is an FTP server. it also requires forward slashes ("/"). The user may still type in a filename of a different extension. and the portion after the right-most slash will be prepended to the name of the file that will be created at the destination. UserFile The name of the file on the source system.

then the system breaks the file upload into the largest sized chunks allowed. Oracle and/or its affiliates. It has no impact on FTP attachments. then any file retrieval built-in function. All Rights Reserved. If AllowLargeChunks is set to True. The default value is False. will fail. If you specify 0. PreserveCase Specify a Boolean value to indicate whether the case of the extension of the specified file is preserved or not. This includes files with zero bytes. True. Note. The string passed into the function is the exact string embedded in the page. AllowLargeChunks Specify a Boolean value to indicate whether to allow large chunks. convert the filename extension to all lowercase letters.PeopleCode Built-in Functions Chapter 1 Parameter Description MaxSize Specify. This is the default value. as those attachments are never chunked. Note. Only simple HTML elements should be used. Note. so that it is possible for a user to upload a file in chunks that are too large for the system to retrieve. such as GetAttachment.50 PeopleBook: System and Server Administration. This is an optional parameter. If the chunks are too big to be retrieved. and these are visible on the page. This string is embedded in the HTML above the file input box." so any filesize can be added. Note. If the value specified in the Maximum Attachment Chunk Size field on the PeopleTools Options page is larger than is allowed for retrieval." PeopleTools Options. The default value is False. "Using PeopleTools Utilities. and they should only be incorporated to do basic formatting of the actual data in the string. UploadPageTitle Specify a string value to be displayed on the File Upload page. Note. it indicates "no limit. You and your application are responsible for any translation issues. The parameter does not automatically handle localization issues. The string can contain HTML elements. the maximum size of the attachment. The system cannot check the size of the file selected by the end-user until that file has been transferred to the web server. this behavior can be overridden. See Enterprise PeopleTools 8. If AllowLargeChunks is set to False the system will use the largest size chunk that is allowed for retrieval. preserve the case. Warning! If you use the PreserveCase parameter. in kilobytes. False. it is important that you use it in a consistent manner with all the relevant file-processing functions or you may encounter unexpected file-not-found errors. The AllowLargeChunks parameter is only applicable to attachments stored in the database. AddAttachment provides no indication of a conversion in the file name it returns. 44 Copyright © 1988. . 2009.

45 . All Rights Reserved. File transfer didn't complete because the operation was canceled by the user. Failed due to timeout. Oracle and/or its affiliates.Chapter 1 PeopleCode Built-in Functions Returns You can check for either an integer or a constant value: Numeric Value Constant Value Description 0 1 %Attachment_Success %Attachment_Failed File was transferred successfully. Failed due to unexpected or bad reply from server. Failed due to non-availability of space on FTP server. Failed to overwrite the file on remote server. The following are some possible situations where %Attachment_Failed could be returned: • • • • • • 2 %Attachment_Cancelled Failed to initialize the process due to some internal error. Failed to store the file on remote server. 2009. Failed to read local file to be uploaded No response from server. Failed to write to local file. Failed to close SSL connection. File transfer failed due to unspecified error during FTP attempt. File transfer failed due to unspecified error. Failed to allocate memory due to some internal error. The following are some possible situations where %Attachment_FileTransferFailed could be returned: 3 %Attachment_FileTransferFailed • • • • • • Failed due to mismatch in file sizes. Copyright © 1988.

. Failed due to problem in certificates used. The following are some possible situations where %Attachment_DestSysFailedLogin could be returned: • • • • • • • • Unsupported protocol mentioned. The following are some possible situations where %Attachment_DestSystNotFound could be returned: 5 6 7 %Attachment_DestSystNotFound • • Improper URL format. Failed to login with specified SSL level. 46 Copyright © 1988. All Rights Reserved. %Attachment_FileExceedsMaxSize File exceeds maximum size. Remote server denied logon. 2009. %Attachment_NoDiskSpaceWebServ No disk space on the web server. 8 %Attachment_DestSysFailedLogin Unable to login to destination system for FTP. Failed to connect using SSL Failed to verify the certificates.PeopleCode Built-in Functions Chapter 1 Numeric Value Constant Value Description 4 %Attachment_NoDiskSpaceAppServ No disk space on the application server. Access denied to server. Failed to connect to server mentioned. Could not authenticate the peer certificate. Problem reading SSL certificate . Oracle and/or its affiliates. Cannot locate destination system for FTP. if specified.

detach. Oracle recommends that you do not modify the delivered FILE_ATTACH_WRK record definition or the PeopleCode programs it contains. File transfer failed because name of selected file is too long. "Using File Attachments and PeopleCode. ATTACHSYSFILENAME. 0).50 PeopleBook: PeopleCode Developer's Guide. The PeopleTools Test Utilities page (PeopleTools. The page allows you to enter a storage location (an FTP site or a record) and upload a file to that storage location by clicking the Attach button on this page. All Rights Reserved. PSTESTUTIL. Utilities. These sample programs could possibly be changed in a future version of PeopleTools. ATTACHUSERFILE. or directly call those PeopleCode programs from any PeopleCode you implement. Once the selected file has been successfully uploaded. DeleteAttachment. The actual page definition involved. See Enterprise PeopleTools 8. These programs are provided as working examples of how to use the file attachment functions AddAttachment. 2009. Maximum is 64 characters. The following are some possible situations where %Attachment_FileNotFound could be returned: • • 11 %Attachment_NoFileName Remote file not found. DetachAttachment. You can clone the FILE_ATTACH_WRK record definition and customize the programs to fit your file processing requirements. Failed to read remote file. 12 %Attachment_FileNameTooLong 13 %Attachment_ViolationFound 14 15 16 %Attachment_VirusScanError %Attachment_VirusConfigError %Attachment_VirusConnectError Example &retcode = AddAttachment(URL. File violation detected by virus scan engine. 47 .MYFTP. Debug. File transfer failed because no file name was specified. Virus scan engine error. Oracle and/or its affiliates. Virus scan engine connection error. Virus scan engine configuration error. Note that this demonstration application only permits the user to enter a URL of up to 120 characters. contains buttons that execute FieldChange PeopleCode programs on the FILE_ATTACH_WRK record definition. "". Copyright © 1988." Using Attachment Functions.Chapter 1 PeopleCode Built-in Functions Numeric Value Constant Value Description 9 %Attachment_FileNotFound Cannot locate file. PeopleTools Test Utilities) contains a sample file attachment application. buttons appear that allow you to view. and ViewAttachment. and delete that file from its storage location. Note.

" DeleteAttachment. RTrim(LTrim(&OPERPSWD))). you receive an error. page 207. &OPERPSWD. End-If. &ftpaddress. page 499 and Chapter 1.50 PeopleBook: PeopleCode Developer's Guide. "PeopleCode Built-in Functions. . RTrim(LTrim(&WRKOPERPSWD))). The following code example shows how to access the password and enclose it in a URL: SQLExec("select ftpid. page 326. If you try to add an email address for a type that is already associated with an email address." Using File Attachments in Applications AddEmailAddress Syntax AddEmailAddress(Type." ViewAttachment. &ftpdirectory). End-If. page 682 Enterprise PeopleTools 8. operpswd. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." AddAttachment." GetAttachment." PutAttachment. Chapter 1. ftpaddress.PeopleCode Built-in Functions Chapter 1 The following example is how to specify a URL for use with AddAttachment. Chapter 1. Chapter 1. 2009. If All(&OPERPSWD) Then &OPERPSWD = Decrypt("some value". See Also Chapter 1. "PeopleCode Built-in Functions. ftpdirectory from PS_CDM_DIST_NODE⇒ where distnodename = 'HRFTP'". Parameters Parameter Description Type Specify the type of email address being added. "PeopleCode Built-in Functions. Chapter 1. Chapter 1. page 124. page 37. This parameter takes a string value. encrypting the password and de-referencing the parameter for use with AddAttachment: The following is for creating the password: If All(&OPERPSWD) Then &OPERPSWD = Encrypt("some value". &FTPID. The valid values are: 48 Copyright © 1988. Primary]) Description Use the AddEmailAddress function to add an email address for the current user. page 191." CopyAttachments." DetachAttachment.Address [. You can only add one email address of a specific type for a user. Oracle and/or its affiliates. "Using File Attachments and PeopleCode. All Rights Reserved. "PeopleCode Built-in Functions.

" ChangeEmailAddress. page 196 and Chapter 1. "PeopleCode Built-in Functions. False otherwise. Oracle and/or its affiliates. Specify whether this email address is the primary address for the user." DeleteEmailAddress. If not specified." MarkPrimaryEmailAddress. A common use of AddKeyListItem is to add a field to a key list and then transfer to a page which uses that field as a key. Chapter 1.value) Description Use the AddKeyListItem to add a new key field and its value to the current list of keys. this email address is the primary email address. 2009. This parameter takes a Boolean value: True. Copyright © 1988. "PeopleCode Built-in Functions. It enables PeopleCode to help users navigate through related pages without being prompted for key values. Returns None. All Rights Reserved. 49 .Chapter 1 PeopleCode Built-in Functions Value Description BB BUS HOME OTH WORK Blackberry email address Business email address Home email address Other email address Work email address Parameter Description Address Primary Specify the email address that you want to add as a string. See Also Chapter 1. "PeopleCode Builtin Functions. the default is False. page 451 AddKeyListItem Syntax AddKeyListItem(field. page 83.

ASSET_ACQ_DET. ASSET_ACQ_DET. . page 91." Transfer." ClearKeyList." TransferPage. Pause times are set up in the Message Monitor. The value of the added key field used in the search. "PeopleCode Built-in Functions. All Rights Reserved.PeopleCode Built-in Functions Chapter 1 Parameters Parameter Description field value The field to add to the key list. Oracle and/or its affiliates. 2009. AddKeyListItem(VNDR_INQ_VW_FS.BUSINESS_UNIT_AP). page 658 and Chapter 1. Chapter 1. Returns Returns a Boolean value indicating whether it completed successfully. This function is used in the PeopleCode for the Message Monitor. See Also Chapter 1. "PeopleCode Built-in Functions.EndDay.BUSINESS_UNIT. "PeopleCode Built-in Functions.VOUCHER_ID).VOUCHER_ID. 50 Copyright © 1988. page 642 AddSystemPauseTimes Syntax AddSystemPauseTimes(StartDay.StartTime.EndTime) Description Use the AddSystemPauseTimes function to set when pause times occur on your system by adding a row to the system pause-times tables. TransferPage("VOUCHER_INQUIRY_FS"). AddKeyListItem(VNDR_INQ_VW_FS. Example The following example creates a key list using AddKeyListItem and transfers the user to a page named VOUCHER_INQUIRY_FS.

Values are: Value Description 0 1 2 3 4 5 6 Sunday Monday Tuesday Wednesday Thursday Friday Saturday Parameter Description StartTime EndDay Specify a time. since midnight. Copyright © 1988. in seconds. Values are: Value Description 0 1 2 3 4 5 6 Sunday Monday Tuesday Wednesday Thursday Friday Saturday Parameter Description EndTime Specify a time.Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description StartDay Specify a number from 0-6. since midnight. Specify a number from 0-6. Oracle and/or its affiliates. 2009. All Rights Reserved. 51 . in seconds.

1. */ STARTDAY = "0". /* initialize. months. Value⇒ (ENDDAY). ENDDAY = "0". You could not just multiply 6 times 365 and add the result to today's date. "Understanding the Integration Broker Service Operations Monitor" AddToDate Syntax AddToDate(date. Function GetSecond(&time) Returns number ." DeleteSystemPauseTimes. for example. All Rights Reserved. that you want to find a date six years from now. AddToDate takes care of this for you.num_days) Description Use the AddToDate function to add the specified number of years. Suppose. AMM_STARTTIME = SetTime(0).1) = 1 Then If AddSystemPauseTimes(Value(STARTDAY). "PeopleCode Built-in Functions. because of leap years. DoSave(). Example Declare Function SetTime PeopleCode REFRESH_BTN FieldFormula. False otherwise. 117. See Also Chapter 1. 13. 52 Copyright © 1988. and days to the date provided. ""). Return Hour(&time) * 3600 + Minute(&time) * 60 + Second(&time). page 203 Enterprise PeopleTools 8. there may be one or two leap years in the next six years. . GetSecond(AMM_STARTTIME).50 PeopleBook: Integration Broker Service Operations Monitor. "").num_months. MsgGetText(117.PeopleCode Built-in Functions Chapter 1 Returns A Boolean value: True if the system pause time specified was added. MsgGetText(117. Else MessageBox(16. 2009.num_years. 14. AMM_ENDTIME = SetTime(0). 13. ""). Oracle and/or its affiliates. . End-Function.AMM_ADD_SPTIMES. . If DoModal(Panel. And. End-If. GetSecond(AMM_ENDTIME)) Then &spt_changed = True. End-If. Component Boolean &spt_changed. depending on the current year.

months. 0. 0) Parameters Parameter Description date num_years The input date to be adjusted. 1. and the next month is longer. 53 . For example. The number of months by which to adjust the specified date.Chapter 1 PeopleCode Built-in Functions You can subtract from dates by passing the function negative numbers. and the date provided is the last day of a month. The number of days by which to adjust the specified date. 1. 0). 0. 1. When you are adding one month to the date provided. Example The following example finds the date one year. in the following. All Rights Reserved. 16). The number of years by which to adjust the specified date. -2. the returned result is the last day of the next month. This example finds the date two months ago prior to BEGIN_DT: AddToDate(BEGIN_DT. 0). Considerations Using AddToDate When you are adding one month to the date provided. 2009. 0. 3. three months. &NewDate is 29/03/2004. and the date provided is the last day of a month.num_years can be a negative number. For example. This parameter can be a negative number. &NewDate is 29/02/2004: &NewDate = AddToDate("31/01/2004". and days passed to the function. num_months num_days Returns Returns a Date value equal to the original date plus the number of years. This parameter can be a negative number. and the next month is shorter. &NewDate = AddToDate("29/02/2004". and 16 days after a field called BEGIN_DT: AddToDate(BEGIN_DT. Copyright © 1988. Oracle and/or its affiliates. in the following. the returned result is not the last day of the next month.

page 183. "PeopleCode Built-in Functions. Example The following example postpones an interview scheduled in the INTRTime field by two days and two hours: 54 Copyright © 1988. page 694 AddToDateTime Syntax AddToDateTime(datetime. Chapter 1. 2009. Chapter 1." Day.days." DateValue. "PeopleCode Built-in Functions. All Rights Reserved. . page 182. and minutes to the datetime provided.PeopleCode Built-in Functions Chapter 1 See Also Chapter 1. page 464 and Chapter 1. page 181. hours." Days365. "PeopleCode Built-in Functions. An integer representing the number of minutes to add to datetime. An integer representing the number of hours to add to datetime. "PeopleCode Built-in Functions. An integer representing the number of months to add to datetime. Parameters Parameter Description datetime years months days hours minutes seconds The Datetime value to which you want to add." Days. Chapter 1.years. and seconds passed to the function. "PeopleCode Built-in Functions.minutes.hours. "PeopleCode Built-in Functions. An integer representing the number of days to add to datetime. days." Month. "PeopleCode Built-in Functions. seconds. Returns Returns a Datetime value equal to the original date plus the number of years. days.months. page 183. Chapter 1. months. minutes. hours." Days360. page 180. Chapter 1. An integer representing the number of years. An integer representing the number of seconds to add to datetime. You can subtract from datetimes by passing the function negative numbers.seconds) Description Use the AddToDateTime function to add the specified number of years. months. Oracle and/or its affiliates." Weekday.

0). page 55. minutes." TimeValue. The resulting value is always adjusted such that it represents an hour less than 24 (a valid time of day. &BREAKTime.minutes. "PeopleCode Built-in Functions. Copyright © 1988. Chapter 1. See Also Chapter 1.Chapter 1 PeopleCode Built-in Functions INTRTIME = AddToDateTime(INTRTIME. page 179 and Chapter 1. This function returns the result as a Time value.) Parameters Parameter Description time hours minutes seconds A time value that you want to subtract from or add to. 0. page 638 AddToTime Syntax AddToTime(time. -1. 0. page 180. All Rights Reserved. 0.minutes." DateValue. is 0:15:00. An integer representing the number of minutes to add to time. Oracle and/or its affiliates. "PeopleCode Built-in Functions. An integer representing the number of hours to add to time. Returns A Time value equal to time increased by the number of hours. "PeopleCode Built-in Functions. 2." AddToTime. 2009." DateTimeValue. The following moves the time &BREAKTime back by one hour. and seconds passed to the function.hours. and seconds. use negative numbers for hours.minutes. "PeopleCode Built-in Functions. Chapter 1. 55 . An integer representing the number of seconds to add to time. and seconds to time.seconds) Description Use the AddToTime function to add hours. To subtract from time. resulting in 23:15:00: &BREAKTime = AddToTime(&BREAKTime. 0). Example Assume that a time. 0. 2.

56 Copyright © 1988. . Checks if exactly one field in the set has a value. if the user can put a value into one field in a set of fields. page 179 and Chapter 1." DateValue.. Checks if either all the field parameters have values. or leave them all empty. Use this in examples where if the user fills in one field. Use this when the user must fill in only one of a set of mutually exclusive fields. page 54. Related Functions None AllOrNone Checks that a field or list of fields have no value. that is.]fieldname2] ." DateTimeValue. then All returns False. The All function returns True if all of the specified fields have a value. it returns False if any one of the fields does not contain a value." AddToDateTime. or a zero (0) numeric value in a required numeric field is considered a null value. "PeopleCode Built-in Functions. Use this in examples when a set of fields is both optional and mutually exclusive. OnlyOne OnlyOneOrNone Returns Returns a Boolean value based on the values in fieldlist. Oracle and/or its affiliates.PeopleCode Built-in Functions Chapter 1 See Also Chapter 1. Checks if no more than one field in the set has a value. Description Use the All function to verify if a field contains a value. page 638 All Syntax All(fieldlist) Where fieldlist is an arbitrary-length list of field names in the form: [recordname. or if all the fields in a list of fields contain values. Chapter 1. "PeopleCode Built-in Functions." TimeValue.. "PeopleCode Built-in Functions.]fieldname1 [. "PeopleCode Built-in Functions. or none of them have values. Chapter 1. All Rights Reserved. [recordname. she must fill in all the other related values. page 180. 2009. A blank character field. If any of the fields are Null.

" SetDefaultAll. For example." SetDefault. Chapter 1. and field3 = null. A blank character field. 1.." None. None of the fields has a value. BEGIN_DT) and 8 * (RETURN_DT .BEGIN_DT) (DURATION_DAYS * 8 + DURATION_HOURS) Then Warning MsgGet(1000. page 490. "PeopleCode Built-in Functions. if field1 = 5. See Also Chapter 1. page 579 and Chapter 1. If any of the fields is Null. AllOrNone returns False. page 580 AllOrNone Syntax AllOrNone(fieldlist) Where fieldlist is an arbitrary-length list of field references in the form: [recordname. "PeopleCode Built-in Functions. Chapter 1. and if any one of the fields contains a value. page 57. or a zero (0) numeric value in a required numeric field is considered a null value."). Copyright © 1988. 57 . "PeopleCode Built-in Functions. [recordname.]fieldname2] .Chapter 1 PeopleCode Built-in Functions Example The All function is commonly used in SaveEdit PeopleCode to ensure that a group of related fields are all entered. field2 = "Mary". then all of the other fields are required also. This function is useful. then All returns False." AllOrNone. "Duration of absence exceeds standard hours for number⇒ of days absent. page 489. where you have a set of page fields.. "PeopleCode Built-in Functions. Chapter 1." OnlyOne. Chapter 1. for example. page 475. Related Functions All Checks to see if a field contains a value. For example: If All(RETURN_DT. End-if. are not Null). "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. All Rights Reserved.]fieldname1 [. Oracle and/or its affiliates. Description The AllOrNone function takes a list of fields and returns True if either of these conditions is true: • • All of the fields have values (that is. or if all the fields in a list of fields contain values. 2009." OnlyOneOrNone.

though. See Also Chapter 1. 58 Copyright © 1988. page 490 AllowEmplIdChg Syntax AllowEmplIdChg(is_allowed) Description By default. All Rights Reserved." All. and its value matches the value of the user's EMPLID. For example. CITY. Checks if no more than one field in the set has a value." OnlyOne. "PeopleCode Built-in Functions. or leave them all empty.⇒ and Country. Chapter 1. Example You could use AllOrNone as follows: If Not AllOrNone(STREET1. OnlyOneOrNone Returns Returns a Boolean value: True if all of the fields in fieldlist or none of the fields in fieldlist has a value. State." OnlyOneOrNone. such changes are warranted. Oracle and/or its affiliates. End-if.")." None. Use this in cases when a set of fields is both optional and mutually exclusive. In some situations. The AllowEmplIdChg function enables the user to change records whose key matches the user's own EMPLID. Chapter 1. None is the opposite of All. "PeopleCode Built-in Functions. Use this when the user must fill in only one of a set of mutually exclusive fields. City. if the user can put a value into one field in a set of fields. or prevents the user from changing these records.PeopleCode Built-in Functions Chapter 1 None OnlyOne Checks that a field or list of fields have no value. page 475. page 56. 2009. STATE) Then WinMessage("Address should consist of at least Street (Line 1). page 489 and Chapter 1. "PeopleCode Built-in Functions. the employee is prevented from updating this data. When the parameter is set to False. Checks if exactly one field in the set has a value. . False otherwise. "PeopleCode Builtin Functions. The function takes a single Boolean parameter that when set to True allows the employee to update their own data. EMPLID is a required field. the Component Processor does not allow an user to make any changes to a record if a record contains an EMPLID key field. you would want employees to be able to change information about themselves when entering time sheet data. that is.

Principal balance at the beginning of the loan term (generally speaking. and the payment number pmtnbr. False otherwise. All Rights Reserved. 9) Then AllowEmplIdChg(true). based on the principal balance (pb) at the beginning of the loan term. Oracle and/or its affiliates. payprin. The remaining parameters are "invars" containing data the function needs to perform its calculation. 2009. Example If Substring (%Page. 1. Parameter Description intr pb Number indicating the percent of interest charged per payment period. the interest rate charged during one payment period (intr). the amount of one payment pmt. 59 .Chapter 1 PeopleCode Built-in Functions After permission is granted. Parameters Parameter Description is_allowed A Boolean value indicating whether the user is permitted to change the user's own data. and balance are "outvars": you must pass variables in these parameters. Copyright © 1988. Amortize Syntax Amortize(intr.pmtnbr. 9) = Substring(PAGE. Parameters Note that payintr.pb. the amount of the payment applied towards principal (payprin). Returns Optionally returns a Boolean value: True if the function executed successfully. End-if. the default value (not being able to make changes) is reapplied.TimeSHEET_PNL_A. which the Amortize function then fills with values. 1. not the page.pmt.payintr. After a user switches to another component. and the remaining balance balance.balance) Description Use the Amortize function to compute the amount of a loan payment applied towards interest (payintr). it stays through the life of the component. the amount of the loan).payprin.

Example Suppose you want to calculate the principal. All Rights Reserved. &PYMNT_AMNT=290. and a payment amount of $290. that is. &PYMNT_AMNT. &PYMNT_⇒ PRIN. Oracle and/or its affiliates. &LOAN_AMT. This example sets &RESULT equal to "Int=114 Prin=176 Bal=11223. &BAL). . Asin Syntax Asin(value) Description Use the Asin function to calculate the arcsine of the given value.PeopleCode Built-in Functions Chapter 1 Parameter Description pmt pmtnbr payintr payprin balance The amount of one loan payment. at an interest rate of 1% per loan payment period. The number of the payment.000. &PYMNT_NBR=24. The amount of the payment paid toward interest.72". and remaining balance after the 24th payment on a loan of $15. The amount of the payment paid toward principal. &PYMNT_INTRST. Returns None. interest. Amortize(&INTRST_RT. &RESULT = "Int=" | String(&PYMNT_INTRST) | " Prin=" | String(&PYMNT_PRIN) | " ⇒ Bal=" | String(&BAL). 2009. 60 Copyright © 1988. The remaining balance after the payment. &LOAN_AMT=15000. &INTRST_RT=1. the size of the angle whose sine is that value. &PYMNT_NBR.

Example The following example returns the size in radians of the angle whose sine is 0. 61 . "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. Adjust your code to provide a valid input value. page 632 Atan Syntax Atan(value) Description Use the Atan function to calculate the arctangent of the given value. page 61." Cos. "PeopleCode Built-in Functions.Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description value Any real number between -1. (2." Acos. See Also Chapter 1. "PeopleCode Built-in Functions. Chapter 1. the size of the angle whose tangent is that value. that is.00 and 1. page 35. Chapter 1. Chapter 1. 2009.110)"). All Rights Reserved. Returns A value in radians between -pi/2 and pi/2.00 inclusive. page 610 and Chapter 1. "PeopleCode Built-in Functions. the range of valid sine values." Radians.5: &MY_ANGLE = Asin(0." Tan. Chapter 1. page 509. Chapter 1." Cot." Degrees. "PeopleCode Built-in Functions. page 134. If the input value is outside this range. "PeopleCode Built-in Functions." Sin. Copyright © 1988. page 190.5). an error message appears at runtime ("Decimal arithmetic error occurred. Chapter 1. Oracle and/or its affiliates. Parameters Parameter Description value Any real number." Atan. page 135. "PeopleCode Built-in Functions.

5). "PeopleCode Built-in Functions." Tan. All Rights Reserved. "PeopleCode Built-in Functions. Chapter 1." Cos. 2009.Strike_Price. See Also Chapter 1.5: &MY_ANGLE = Atan(0." Asin." Cot. page 35.PeopleCode Built-in Functions Chapter 1 Returns A value in radians between -pi/2 and pi/2. page 190. Parameters Parameter Description Asset_Price Strike_Price Interest_Rate Years The asset price. page 632 BlackScholesCall Syntax BlackScholesCall(Asset_Price. "PeopleCode Built-in Functions.Interest_Rate. page 610 and Chapter 1. page 509. Oracle and/or its affiliates. "PeopleCode Built-in Functions. This parameter takes a decimal value. Chapter 1. The volatility of underlying. Chapter 1. This parameter takes a number value (decimal)." Degrees. "PeopleCode Built-in Functions. page 135. The risk-free interest rate. Volatility 62 Copyright © 1988. This parameter takes a decimal value. "PeopleCode Built-in Functions. The strike price." Radians. The number of years to option expiration.Volatility) Description Use the BlackScholesCall function to return the value of a call against an equity underlying according to the Black-Scholes equations." Sin. Example The following example returns the size in radians of the angle whose tangent is 0. This parameter takes a decimal value. Chapter 1. Chapter 1. page 60. "PeopleCode Built-in Functions. Chapter 1. This parameter takes a decimal value. page 134. ." Acos. "PeopleCode Built-in Functions.Years.

page 62 Copyright © 1988. The strike price. See Also Chapter 1." BlackScholesPut. This parameter takes a decimal value. "PeopleCode Built-in Functions. The risk-free interest rate. This parameter takes a decimal value.Years. Volatility Returns A number representing the value of a call against an equity. The volatility of underlying. The number of years to option expiration. "PeopleCode Built-in Functions.Strike_Price. page 63 BlackScholesPut Syntax BlackScholesPut(Asset_Price. 63 . Oracle and/or its affiliates. 2009." BlackScholesCall. See Also Chapter 1. All Rights Reserved.Interest_Rate. This parameter takes a decimal value. This parameter takes a number (decimal) value. This parameter takes a decimal value. Parameters Parameter Description Asset_Price Strike_Price Interest_Rate Years The asset price.Chapter 1 PeopleCode Built-in Functions Returns A number representing the value of a call against an equity.Volatility) Description Use the BlackScholesPut function to return the value of a put against an equity underlying according to the Black-Scholes equations.

This parameter takes an array of array of number.PeopleCode Built-in Functions Chapter 1 BootstrapYTMs Syntax BootstrapYTMs(Date. Parameters Parameter Description Date MktInst The trading date of the set of market issues. and 2 for years 7 coefficient a of a curve interpolating the dataset 8.Accrual_Conv) Description Use the BootstrapYTMs function to create a zero-arbitrage implied zero-coupon curve from a yield-tomaturity curve using the integrated discount factor method.10 coefficients b. This parameter takes a date value. The market instrument properties. based on the Accrual_-Conv. and d of a curve interpolating the dataset 64 Copyright © 1988. Oracle and/or its affiliates. .MktInst.c. 1 for months. 2009. The elements in the array specify the following: Elements Description 1 tenor in days 2 yield in percent 3 price per 100 par 4 coupon rate (zero for spot instruments) 5 frequency of coupon payments 6 unit of measure for coupon frequency.9. 0 for days. All Rights Reserved.

"Array Class" Break Syntax Break Description Use the Break statement to terminate execution of a loop or an Evaluate function. All Rights Reserved.Chapter 1 PeopleCode Built-in Functions Returns An array of array of number. End-if. If the loop or Evaluate is nested in another statement. "Demotion Action is chosen and Pay Rate has⇒ not been decreased. Break is used to terminate the Evaluate statement. WinMessage("This message appears after executing either of the BREAK⇒ statements or after all WHEN statements are false"). 27.50 PeopleBook: PeopleCode API Reference. End-if."). Copyright © 1988. 29. Break. Break. 2009. Oracle and/or its affiliates. Example In the following example. See Also Enterprise PeopleTools 8. The program resumes execution immediately after the end of the statement. Parameters None. only the innermost statement is terminated. When-other End-evaluate."). 65 . The elements in the array have the same type as the elements in the array for the MktInst parameter. End-if. "Pay Rate Change action is chosen and Pay⇒ Rate has not been changed. When = "DEM" If ANNUAL_RT >= PriorEffdt(ANNUAL_RT) Then Warning MsgGet(1000. while staying within the outermost If statement: If CURRENCY_CD = PriorEffdt(CURRENCY_CD) Then Evaluate ACTION When = "PAY" If ANNUAL_RT = PriorEffdt(ANNUAL_RT) Then Warning MsgGet(1000.

page 694 BulkDeleteField Syntax BulkDeleteField(ProjectName. If you specify a project that contains objects such as fields which have an upgrade action of delete. if the record is a subrecord. if the field is also used in a WHERE clause. In addition. "PeopleCode Builtin Functions. You must have the role Peoplesoft Administrator assigned to your UserId in order to use this function.txt 66 Copyright © 1988. Note. . The record should be examined and any additional changes made as necessary. page 245." For. page 254. If the function is run from an application server. "PeopleCode Built-in Functions. ExclProj]) Description Use the BulkDeleteField function to delete fields from records and pages. the log file is located at PS_CFG_HOME /BulkOps. the record isn't modified and is instead inserted into a project called BLK_FieldName. Chapter 1. Oracle and/or its affiliates." Evaluate. The field is removed from the page regardless of where the field exists on the page. 2009. Using the Log File Information about this operation is stored in a log field. All Rights Reserved." Exit. you must subsequently rebuild the project (alter tables). the log file is located at: PS_CFG_HOME /APPSERV/Domain_Name/LOGS/BulkOps. tool to search for the field name you deleted. "PeopleCode Built-in Functions. The directory where the log file is placed depends on where the function is run from: • • If the function is run in two-tier. However." While. This is also the default location if the system cannot find the other paths. page 273 and Chapter 1. Use the Find In. or message definitions.PeopleCode Built-in Functions Chapter 1 See Also Chapter 1. the removal is straightforward. . this function does not delete the references to the field in the PeopleCode. If the field is in the SELECT clause of the SQL. Because performing this operation changes records. as well as the associated PeopleCode programs and modify the SQL either on the record. Crystal Reports. those objects are ignored. whether on a grid or not.Field. . on the parent records. or.FieldName [. or if the field is the only item in the SELECT clause. You must manually remove the references to the deleted field. Note. such as Projects. Chapter 1. "PeopleCode Built-in Functions.txt. Deleting fields from records and pages does not remove the field definition itself and it does not remove the field from other areas.

These operations accommodate errors and continue processing. Oracle and/or its affiliates. Using this function during active runtime is not supported. therefore. logging the overall progress of the operation. This name must be prefixed with the reserved word Field. the following items that are both in ProjectName and ExclProj are not changed. Individual SQL or PeopleCode items are not ignored by themselves. Bulk operations are time consuming. the field specified is not removed from these items: • • • • pages records associated SQL with records of type View any PeopleCode associated with those items. referencing the log file to see the progress of an operation is recommended. 67 . 2009. even if the page is subsequently cancelled. the system ignores those definitions. that is. changes aren't recognized until the component is reloaded. The values are: Copyright © 1988. Considerations Using the Exclusion Project If you specify ExclProj. Note. In general. Parameters Parameter Description ProjectName The name of a project that is the source of records and pages to use. before active runtime usage is initiated.txt Considerations Using this Function This function is intended for use during configuration time only. if the project contains definitions with an upgrade action of delete. Changes to data definitions are not recognized on a currently loaded component. only as associated with records or pages. The name of a project that has pages that should be ignored by this function. the log file is written to the process' output log directory. When passing the project name as a parameter. ExclProj Returns A constant value. All Rights Reserved.Chapter 1 PeopleCode Built-in Functions • If the function is run from an Application Engine program. Warning! These operations take place in a separate transaction from the page's save status: the initiation of any of these operations immediately changes the definitions. that is: PS_CFG_HOME /APPSERV/prcs/Domain_Name/log_output/Process_Name_Instance/BulkOps. FieldName The name of the field to be deleted.

Field. 0. You must have the role Peoplesoft Administrator assigned to your UserId in order to use this function." BulkModifyPageFieldOrder.OrgId. See Also Chapter 1.ModelName. 2009. Note.50 PeopleBook: PeopleSoft Application Designer Developer's Guide. "BulkDeleteField failed"). . Example &pjm = "MYPROJ". "Metadata Fn Status". 0. those objects are ignored. &ret = BulkDeleteField(&pjm. "PeopleCode Built-in Functions. page 68 and Chapter 1. 0.FieldName. If (&ret = %MDA_Success) Then MessageBox(0. "Administering Data" BulkInsertField Syntax BulkInsertField(ProjectName. Bulk operation did not complete successfully. "EXCLPROJ"). page 71 Enterprise PeopleTools 8.50 PeopleBook: PeopleSoft Application Designer Developer's Guide. "Performing Bulk Operations" Enterprise PeopleTools 8. "BulkDeleteField succeeded"). "Metadata Fn Status". All Rights Reserved. "PeopleCode Built-in Functions.ClonePCode [. If you specify a project that contains objects such as fields which have an upgrade action of delete." BulkInsertField." Using the Find In Feature Enterprise PeopleTools 8. 0.50 PeopleBook: PeopleCode Developer's Guide. Else MessageBox(0. Oracle and/or its affiliates. "Debugging Your Application.Field. End-If. ExclProj]) Description Use the BulkInsertField function to insert a source field into records and pages in a project if and only if the model field specified by ModelName exists on those records and pages.PeopleCode Built-in Functions Chapter 1 Value Description %MDA_Success %MDA_Failure Bulk operation completed successfully. 68 Copyright © 1988.

however. the source field is assigned the same record field properties as the model field on each record.txt. You should examine this record and make any necessary changes.Chapter 1 PeopleCode Built-in Functions Using the Log File Information about this operation is stored in a log field. Because using this function changes records that are used to build application tables. If the system detects a questionable field position. so you should examine these pages by hand. the log file is written to the process' output log directory. with all references to the model field changed to refer to the new field. a prompt table is created for the source field using the name of the source field with TBL appended to it. the log file is located here: PS_CFG_HOME /APPSERV/Domain_Name/LOGS/BulkOps. the associated SQL is modified by having the SELECT clause expanded to include the new field. The page field name property isn't cloned if it exists on the model field. All Rights Reserved. Note. Considerations Inserting Fields into Pages If the model field is in a grid. 2009. The directory where the log file is placed depends on where the function is run from: • • If the function is run in two-tier. that is: PS_CFG_HOME /APPSERV/prcs/Domain_Name/log_output/Process_Name_Instance/BulkOps. If the record is either a SQL View or Dynamic View type. 69 . This is also the default location if the system cannot find the other paths. If the model field has PeopleCode associated with it on the record or in a component. it inserts the page into a project called BLK_FieldName. since the page field name should be a unique identifier for page elements. you must rebuild (alter) the specified project before these changes can be used. the associated record is inserted into a project called BLK_FieldName. the system inserts the new field into the grid next to the model field and assigns it the same page field properties. The page will work as-is. Instead. the log file is located at PS_HOME/BulkOps. If the SQL contains the model field in the WHERE clause. If the model field is not in a grid. or the SQL is complex. If the function is run from an application server.txt Considerations Inserting Fields into Records In records.txt • If the function is run from an Application Engine program. Copyright © 1988. If the record is a subrecord. If the model field has a prompt table. and is inserted directly after the model field. the GUI layout may not be optimal. the parent records of type SQL View or Dynamic View that contain this subrecord are updated. the system inserts the new field onto the page to the right of the model field (in the first open space) and assigns it the same page field properties. the field name of the new field is used. and ClonePCode has been set to True. this PeopleCode is cloned to the new field. Oracle and/or its affiliates.

Specify whether to clone the PeopleCode from the model to this field. even if the page is subsequently cancelled. . Warning! These operations take place in a separate transaction from the page's save status: the initiation of any of these operations immediately changes the definitions. All Rights Reserved. Changes to data definitions are not recognized on currently loaded component. ModelName ClonePCode ExclProj 70 Copyright © 1988. Considerations Using the Exclusion Project If you specify ExclProj. that is. When passing the project name as a parameter. In general. the field specified is not inserted to these items: • • • • pages records associated SQL with records of type View any PeopleCode associated with those items. The name of a project that has pages that should be ignored by this function. logging the overall progress of the operation. the system ignores those definitions. therefore. if the project contains definitions with an upgrade action of delete. 2009. This parameter takes a Boolean value: True. The name of a field on which to model the inserted field. Using this function during active runtime is not supported. False. only as associated with records or pages. If the project you specified only contained pages and not records. The changes take affect when the component containing the page is reloaded. you do not need to rebuild the project after using this function. Oracle and/or its affiliates. FieldName The name of the field to be inserted. Individual SQL or PeopleCode items are not ignored by themselves. referencing the log file to see the progress of an operation is recommended. and SQL inserted.PeopleCode Built-in Functions Chapter 1 Note. Attributes are cloned from it for records and pages. Bulk operations are time consuming. before active runtime usage is initiated. Parameters Parameter Description ProjectName The name of a project that is the source of records and pages to use. Considerations Using this Function This function is intended for use during configuration time only. This name must be prefixed with the reserved word Field. Note. These operations accommodate errors and continue processing. changes aren't recognized until the component is reloaded. clone the PeopleCode programs. the following items that are both in ProjectName and ExclProj are not changed. PeopleCode is modified. do not.

ColNames. page 66 Enterprise PeopleTools 8. [ ColWidths]) Description Use the BulkModifyPageFieldOrder function to reorder the grid columns as specified by ColNames. Note. "PeopleCode Built-in Functions. If (&ret = %MDA_Success) Then MessageBox(0. "Metadata Fn Status". True. Field. 0. Else MessageBox(0. If ColWidths is specified. Field. the columns are also resized. End-If. page 71 and Chapter 1. Oracle and/or its affiliates. 2009. "BulkInsertField failed")." BulkModifyPageFieldOrder. All Rights Reserved. &ret = BulkInsertField(&pjm. Example &pjm = "MYPROJ".OrgId. Copyright © 1988. This can also be used to modify a single columns width. 0. You must have the role Peoplesoft Administrator assigned to your UserId in order to use this function. The values are: Value Description %MDA_Success %MDA_Failure Bulk operation completed successfully. "Administering Data" BulkModifyPageFieldOrder Syntax BulkModifyPageFieldOrder({ProjectName | PageList}. 71 . See Also Chapter 1." BulkDeleteField.50 PeopleBook: PeopleSoft Application Designer Developer's Guide.DeptId. Bulk operation did not complete successfully. "Metadata Fn Status".Chapter 1 PeopleCode Built-in Functions Returns A constant value. "BulkInsertField succeeded"). "EXCLPROJ").50 PeopleBook: PeopleSoft Application Designer Developer's Guide. "PeopleCode Built-in Functions. 0.RequireAll. "Performing Bulk Operations" Enterprise PeopleTools 8. 0.

In general. that is: PS_CFG_HOME /APPSERV/prcs/Domain_Name/log_output/Process_Name_Instance/BulkOps.txt. . those objects are ignored. Using this function during active runtime is not supported. This function only reorders fields inside a grid.PeopleCode Built-in Functions Chapter 1 If you specify a project name as a parameter. These operations accommodate errors and continue processing. DURATION_DAYS ABS_HIST. such as work records. the two records ABS_HIST and PERSONAL_HISTORY both contain the fields DURATION_DAYS and DURATION_HOURS. before active runtime usage is initiated. logging the overall progress of the operation. the fields are bunched together in record groupings before being sorted into the order specified. This is also the default location if the system cannot find the other paths. Warning! These operations take place in a separate transaction from the page's save status: the initiation of any of these operations immediately changes the definitions. The following is an example of how the records are fields would be bunched together first: • • • • ABS_HIST. The directory where the log file is placed depends on where the function is run from: • • If the function is run in two-tier. The reordering algorithm "bunches" these fields together at the first instance of any of these fields in a target page grid. DURATION_DAYS PERSONAL_HISTORY. Bulk operations are time consuming. Oracle and/or its affiliates. and if that project contains objects such as fields which have an upgrade action of delete. the log file is located here: PS_CFG_HOME /APPSERV/Domain_Name/LOGS/BulkOps. 72 Copyright © 1988. even if the page is subsequently cancelled. DURATION_HOURS Note. from two or more records. These changes take affect after components are reloaded.txt Considerations Using this Function This function is intended for use during configuration time only. Changes to data definitions are not recognized on currently loaded component. therefore. and forces the remaining fields into the order specified.txt • If the function is run from an Application Engine program. DURATION_HOURS PERSONAL_HISTORY. If the fields occur twice or more in a grid. referencing the log file to see the progress of an operation is recommended. changes aren't recognized until the component is reloaded. the log file is located at PS_CFG_HOME /BulkOps. If the function is run from an application server. For example. Using the Log File Information about this operation is stored in a log field. the log file is written to the process' output log directory. 2009. All Rights Reserved.

0. This parameter takes a Boolean value: True. RequireAll ColWidths Returns A constant value. 2009. "BulkModifyPageFieldOrder⇒ succeeded"). True. &pjm = "MYPROJ". &ColOrder. Oracle and/or its affiliates. &ColWidth). "Metadata Fn Status". 0. &ret. End-If. Else MessageBox(0. Example Local Array of String &ColOrder. "PROJECT"). 0. "BulkModifyPageFieldOrder⇒ failed"). When passing the project name as a parameter. Bulk operation did not complete successfully. the system ignores those definitions. &ColWidth = CreateArray(50. 100. Note.Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description ProjectName | PageList Specify either the name of a project that is the source of pages to use or an array of page names. Use a 1 to indicate that the width of a column shouldn't change. all fields must be present. -1). ColNames Specify an array of string that indicate which fields and the desired order of those fields. Local String &pjm. All Rights Reserved. if the project contains definitions with an upgrade action of delete. The values are: Value Description %MDA_Success %MDA_Failure Bulk operation completed successfully. 0. If (&ret = %MDA_Success) Then MessageBox(0. "Metadata Fn Status". &ret = BulkModifyPageFieldOrder(&pjm. 73 . Local Array of Number &ColWidth. Copyright © 1988. Specify whether all the fields in ColNames must be present before changes are made or not. &ColOrder = CreateArray("DEPTID". Specify an array of number that gives the pixel widths of the grid columns. "ORGID".

Changes to data definitions are not recognized on currently loaded component. .50 PeopleBook: PeopleSoft Application Designer Developer's Guide. In general.PeopleCode Built-in Functions Chapter 1 See Also Chapter 1.OrgId. but the page returns an error message. page 68 and Chapter 1. Oracle and/or its affiliates. page 66 Enterprise PeopleTools 8. logging the overall progress of the operation. If you do call this function from a page the operation completes successfully.) Considerations Using this Function Do not invoke this function from runtime pages. Switching to a new component clears up this error." BulkDeleteField. before active runtime usage is initiated. The only way to modify a field's NotUsed setting is through an API call such as in the following example: SetDBFieldNotUsed(FIELD. Bulk operations are time consuming. referencing the log file to see the progress of an operation is recommended. "Performing Bulk Operations" Enterprise PeopleTools 8. "PeopleCode Built-in Functions. True). All Rights Reserved. 2009. any changes not saved to the database are lost. This function should be invoked from a Application Engine program. A field whose NotUsed flag has been set to True does not show up in indexes. These operations accommodate errors and continue processing. 74 Copyright © 1988. The indexes of records that contain this field need to be updated to reflect the new settings. Note. changes aren't recognized until the component is reloaded. "PeopleCode Built-in Functions.50 PeopleBook: PeopleSoft Application Designer Developer's Guide. as it modifies all records. "Administering Data" BulkUpdateIndexes Syntax BulkUpdateIndexes([StringFieldArray]) Description Use BulkUpdateIndexes to update indexes (PSINDEXDEFN table) for records that contain a field whose NotUsed setting has changed. however. including the records used to support the page it is invoked from." BulkInsertField. This function is intended for use during configuration time only. Using this function during active runtime is not supported. Information about this operation can be logged by turning on PeopleCode tracing of internal functions (value 256. therefore.

Copyright © 1988. "BulkUpdateIndexes succeeded"). If you do not specify a value for this parameter. even if the page is subsequently cancelled. The following example uses the function with an array of two field names passed to it: &ret = BulkUpdateIndexes(CreateArray("DEPTID". "BulkUpdateIndexes failed"). 2009. Oracle and/or its affiliates. such as DEPTID. "MetaData Fn Status". 0. "BulkUpdateIndexes succeeded"). 0. Else MessageBox(0. End-If. The values are: Value Description %MDA_Success %MDA_Failure Bulk operation completed successfully. Else MessageBox(0. 0. Only the records containing these fields are updated. only the affected records have their indexes updated. Returns A constant value. "BulkUpdateIndexes failed"). 0. Warning! These operations take place in a separate transaction from the page's save status: the initiation of any of these operations immediately changes the definitions. "MetaData Fn Status". reducing the time required to run this function. 0. End-If. Parameters Parameter Description StringFieldArray Specify an array of field names (as strings). an operation that may take hours.Chapter 1 PeopleCode Built-in Functions Calling this function without any parameter rebuilds the indexes for all records. By indicating a list of fields whose NotUsed flag has changed. 75 . Example The following example uses the function without the optional array of field names: &ret = BulkUpdateIndexes(). representing the fields whose NotUsed flag has been modified. 0."PROJECT")). "MetaData Fn Status". 0. "MetaData Fn Status". 0. If (&ret = %MDA_Success) Then MessageBox(0. If (&ret = %MDA_success) Then MessageBox(0. the indexes for all records are rebuilt. All Rights Reserved. Bulk operation did not complete successfully.

) Normally." Using PeopleCode in Application Engine Programs. (Prior to PeopleTools 8. Rather. The Refresh method. you won't run Application Engine programs from PeopleCode in this manner. the bulk of your Application Engine execution will be run using the Process Scheduler. on a rowset object. You must build your own PeopleSoft Pure Internet Architecture page to access or delete the messages. page 68 and Chapter 1. you could do only this using the RemoteCall function. . Note. page 71 CallAppEngine Syntax CallAppEngine(applid [.PeopleCode Built-in Functions Chapter 1 See Also Chapter 1. "PeopleCode Built-in Functions.processinstance ])." BulkModifyPageFieldOrder. statereclist. The staterecord can be the hard-coded name of a record. For more details see the Application Engine documentation. The processinstance allows you to specify the process instance used by the Application Engine runtime. and all online processing should be done as a single logical unit of work. . If you want only a particular scroll to be redrawn. "Using Meta-SQL and PeopleCode. Where statereclist is list of record objects in the form: &staterecord1 [. All Rights Reserved. Description Use the CallAppEngine function to start the Application Engine program named applid. and the exception would be done using CallAppEngine." BulkDeleteField. After you use CallAppEngine. Note. Additional record objects are ignored. If you use this function. This is how to start your Application Engine programs synchronously from a page. There can be only as many record objects in statereclist as there are state records for the Application Engine program. you shouldn't use the %TruncateTable or %Execute meta-SQL statement in any of your Application Engine steps. &staterecord2] . but generally you use a record object to pass in values to seed particular state fields. Chapter 1. page 66. GetLevel0(). This is because on some platforms an implicit commit occurs after these statements. reloads the rowset (scroll) using the current page keys. If you supply a non-zero process instance. Oracle and/or its affiliates. "PeopleCode Built-in Functions. This causes the page to be redrawn. you may want to refresh your page. all message logging is done under the process instance. "PeopleCode Built-in Functions.50 PeopleBook: Application Engine. you can refresh just that part. since there is no Process Monitor entry for the process instance you used. . In your PeopleCode program this parameter must be declared of type integer since that is the only way the runtime can tell whether the last parameter is to be interpreted as a process instance. 2009." BulkInsertField.Refresh() refreshes the entire page. See Enterprise PeopleTools 8. 76 Copyright © 1988. The record name must match the state record name exactly.

Temp tables are not shared between a batch application engine program and child program invoked using CallAppEngine. all database updates is rolled back. that grandchild shares the online temp instance with the caller. The lock on an online temp instance persists until the next commit. This is an important consideration. • Dedicated cursors are not supported inside a "nested application engine instance" (meaning an application engine program invoked using CallAppEngine from within another application engine program). This functionality must be used carefully. All Rights Reserved. All information the user entered into the component is lost. During SavePreChange. no commits are performed within the called application engine program. as if the user pressed ESC. Instead. resulting in contention with other processes. use the CallAppEngine function within a Save event. and you should only do this once you have a clear understanding of the following rules and restrictions. When you use CallAppEngine. not CallAppEngine. the child program is assigned an "online" temporary table instance. and that child program updated many rows of data. If the processing time of the called program is significant (greater than a few seconds). Copyright © 1988. you should keep the following items in mind: • • No commits occur during the entire program run. only one online temp instance is allocated to a process at any one time. 77 . those settings are ignored. If a nested application engine instance has any SQL actions with ReUse set to Yes or Bulk Insert. if that child program invokes another program using CallAppEngine. As a general rule. you're intending to perform database updates. Oracle and/or its affiliates. This includes the following PeopleCode events: • • • • SavePreChange (Page) SavePostChange (Page) Workflow FieldChange If CallAppEngine results in a failure. if you're calling Application Engine. In addition. In other words. If a batch application engine program called another program using CallAppEngine. 2009. • • • Save Events Considerations To execute the Application Engine program based on an end user Save. Application Engine Considerations You can use the CallAppEngine function in a Application Engine program. As in any other type of PeopleCode event. A batch application engine program should invoke such child programs using a Call Section action. the unit-of-work might become too large.Chapter 1 PeopleCode Built-in Functions PeopleCode Event Considerations You must include the CallAppEngine PeopleCode function within events that allow database updates because generally. no matter how many nested CallAppEngine's there might be. either directly (in a PeopleCode action) or indirectly (using a Component Interface). any modified rows in the page have not been written to the database. this would be unacceptable. not CallAppEngine. application engine programs that make use of temp tables and have a significant processing time should be called from other application engine programs using a Call Section action. which is used for all temp tables in that program.

78 Copyright © 1988. 2009. FieldChange Considerations If you don't want the CallAppEngine call to depend on a Save event. and passes initialization values. Specify an optional record object that provides initial values for a state record. &REC). Example The following calls the Application Engine program named MYAPPID. /* set the initial value for INIT_VALUES. keep the following items in mind: • • • • No commits occur within the program called by CallAppEngine.FIELD1. Specify the process instance used by the Application Engine runtime. Do not include a DoSave function in the same FieldChange event. The Page Process issues one commit at the end of the Save cycle. &REC. When having a FieldChange event initiate CallAppEngine. the modified rows have been written to the database. Parameters Parameter Description applid statereclist processinstance Specify the name of the Application Engine program you want to start.PeopleCode Built-in Functions Chapter 1 • During SavePostChange.FIELD1 */ CallAppEngine("MYAPPID". but not afterward. Oracle and/or its affiliates. .INIT_VALUES). You can use the DoSaveNow function in the same FieldChange event. The called program remains a synchronous execution in the same unit of work. All Rights Reserved. Not only is this not allowed. The Component Processor commits all updates done in a FieldChange at the end of the event. but it must be called prior to the first CallAppEngine function. Returns None. which frees any locks that the Application Engine program might have acquired.Value = "XYZ". you can also initiate CallAppEngine from a FieldChange event. but it also indicates that you should be including the CallAppEngine within a Save event. &REC = CreateRecord(RECORD.

"PeopleCode Built-in Functions.Chapter 1 PeopleCode Built-in Functions See Also Chapter 1. "Creating Application Engine Programs. much the same as you can do in the message monitor.50 PeopleBook: PeopleCode API Reference." Refresh Enterprise PeopleTools 8. "Using Meta-SQL and PeopleCode. The function is only available when the message has one of the following statuses: • • • • • Error New Retry Timeout Edited See Also Enterprise PeopleTools 8. ChannelName.50 PeopleBook: PeopleCode API Reference." Specifying Call Section Actions CancelPubHeaderXmlDoc Syntax CancelPubHeaderXmlDoc(PubID." Cancel Copyright © 1988. PubNode. page 225 Enterprise PeopleTools 8. also known as the message instance. 2009. 79 . Oracle and/or its affiliates. "Message Classes." DoSaveNow. This function has been deprecated and remains for backward compatibility only. "Rowset Class. VersionName) Description Use the CancelPubHeaderXmlDoc function to programmatically cancel the message header of a publication contract. "AESection Class" Enterprise PeopleTools 8.50 PeopleBook: Application Engine. is the published message before the system performs any transformations.50 PeopleBook: PeopleCode API Reference. The message header.50 PeopleBook: Application Engine. Use the IntBroker class Cancel method instead." Using PeopleCode in Application Engine Programs Enterprise PeopleTools 8. All Rights Reserved. Note.

False otherwise. Specify the version name of the message. SubNode[. Oracle and/or its affiliates. See Also Chapter 1. VersionName. MessageName. "PeopleCode Built-in Functions. Use the IntBroker class Cancel method instead. Specify the Pub Node Name of the message.PeopleCode Built-in Functions Chapter 1 Parameters Parameter Description PubID PubNode ChannelName VersionName Specify the PubID of the message. PubNode. Segment]) Description Use the CancelPubXmlDoc function to programmatically cancel a message publication contract. The function is only available when the message has one of the following statuses: • • • • Error New Retry Timeout 80 Copyright © 1988. ChannelName. 2009. Specify the channel name of the message. All Rights Reserved. much the same as you can do in the message monitor. This is the publication contract that exists after any transformations have been preformed. This function has been deprecated and remains for backward compatibility only. page 531 CancelPubXmlDoc Syntax CancelPubXmlDoc(PubID. . Note." ReSubmitPubHeaderXmlDoc. Returns A Boolean value: True if the function completed successfully.

All Rights Reserved. Oracle and/or its affiliates. Returns A Boolean value: True if the function completed successfully. PubNode." ReSubmitPubXmlDoc. VersionName. 2009. Specify the channel name of the message. "Message Classes. page 532 CancelSubXmlDoc Syntax CancelSubXmlDoc(PubID. SubscriptionName[. Specify the name of the message. False otherwise. which means that if you do not specify a segment. much the same as you can do in the message monitor.Chapter 1 PeopleCode Built-in Functions • Edited See Also Enterprise PeopleTools 8. "PeopleCode Built-in Functions. See Also Chapter 1. Specify the version name of the message. the first segment is accessed. 81 . Copyright © 1988. ChannelName." Cancel Parameters Parameter Description PubID PubNode ChannelName VersionName MessageName SubNode Segment Specify the PubID of the message. MessageName. Specify the Pub Node Name of the message.50 PeopleBook: PeopleCode API Reference. Specify an integer representing which segment you want to access. Specify the subnode of the message. Segment]) Description Use the CancelSubXmlDoc function to programmatically cancel a message subscription contract. The default value is one.

This function has been deprecated and remains for backward compatibility only.PeopleCode Built-in Functions Chapter 1 Note. Oracle and/or its affiliates. Specify the Channel name as a string. which means that if you do not specify a segment." ReSubmitSubXmlDoc. "PeopleCode Built-in Functions. The function is only available when the message has one of the following statuses: • • • • • Error New Retry Timeout Edited See Also Enterprise PeopleTools 8. Specify the subscription name as a string. Specify an integer representing which segment you want to access. Specify the version name as a string. "Message Classes. Use the IntBroker class Cancel method instead." Cancel Parameters Parameter Description PubID PubNode ChannelName VersionName MessageName SubscriptionName Segment Specify the PubID as a string. The default value is one. False otherwise. the first segment is accessed. . Returns A Boolean value: True if function completed successfully. Specify the message name as a string. page 533 82 Copyright © 1988.50 PeopleBook: PeopleCode API Reference. See Also Chapter 1. Specify the Pub Node name as a string. All Rights Reserved. 2009.

All Rights Reserved. "PeopleCode Built-in Functions. page 48." DeleteEmailAddress. If you try to use a type that already has an email address associated with it. you receive an error. Returns None. page 196 and Chapter 1. The valid values are: Value Description BB BUS HOME OTH WORK Blackberry email address Business email address Home email address Other email address Work email address Parameter Description Address Specify the email address that you want to add as a string. Chapter 1." AddEmailAddress. page 451 Copyright © 1988. "PeopleCode Built-in Functions.Chapter 1 PeopleCode Built-in Functions ChangeEmailAddress Syntax ChangeEmailAddress(Type. 83 . 2009. Parameters Parameter Description Type Specify the type that you want to change the email address to. Oracle and/or its affiliates. "PeopleCode Built-in Functions.Address) Description Use the ChangeEmailAddress function to change the type of an email address that you've already added for the current user. See Also Chapter 1. You can only have one email address of a specific type for a user. This parameter takes a string value." MarkPrimaryEmailAddress.

Parameters Parameter Description n The numeric value to be converted expressed as a decimal Unicode UTF-16 value.&STRING2 = Char(26085) | Char(26412). "PeopleCode Built-in Functions. &STRING3 = Char(55362) | Char(56697). &STRING2 to the Unified Han (Japanese. Chinese and Korean) string "&#x65e5&#x672c" (U+65E5. U+672C) and &STRING3 to the Unicode Plane 2 Han character "&#d842&#xdd79" (surrogate pair U+D842. . See Also Chapter 1." Code." String. U+DD79 which is equivalent to the UTF-32 scalar value U+20797).PeopleCode Built-in Functions Chapter 1 Char Syntax Char(n) Description Use the Char function to convert a decimal numeric value n to the corresponding Unicode character. page 625 Chapter 2. page 94 and Chapter 1. 2009. Example This example sets &STRING1 to the Latin string "PS" (U+0050." %Substring. All Rights Reserved. Returns Returns a String representing the Unicode character corresponding to the number n. "PeopleCode Built-in Functions. It should be noted that the single character in &STRING3 requires two calls to the Char function as it is a non-BMP Unicode character and therefore is represented by UTF-16 high and low surrogates. U+0053). page 750 84 Copyright © 1988. "Meta-SQL. &STRING1 = Char(80) | Char(83). Oracle and/or its affiliates.

Chapter 1 PeopleCode Built-in Functions CharType Syntax CharType(source_str. See Also Enterprise PeopleTools 8. You can specify either a Character Code or a Constant: Numeric Value Constant Character Set 0 %CharType_AlphaNumeric Basic Latin — Alphanumeric (printable range of 7-bit USASCII). the first character of which will be tested. 85 . A Number representing the character type to be tested for.char_code) Description Use the CharType function to determine whether the first character in source_str is of type char_code . The following table shows valid values for char_code. Unicode characters in the range U+00BF — U+07E 2 %CharType_HankakuKatakana Hankaku Katakana (half-width Japanese Katakana) Copyright © 1988. Unicode characters in the range U+0020 — U+007E 1 %CharType_ExtendedLatin1 Extended Latin-1 characters (ISO 8859-1 accents for Western European languages). The char_code parameter is a numeric value representing a character type (see the following Parameters section for details). All Rights Reserved. Most character types supported by this function equate to specific Unicode character blocks or are based on Unicode character properties. Oracle and/or its affiliates. "Selecting and Configuring Character Sets and Language Input and Output" Parameters Parameter Description source_str char_code A String.50 PeopleBook: Global Technology. 2009.

Includes Japanese Kanji.9 None Reserved for future use. All Rights Reserved. Oracle and/or its affiliates.and half-width punctuation. 11 None Greek 12 None Cyrillic 13 None Armenian 14 None Hebrew 15 None Arabic 16 None Devanagari 17 None Bengali 18 None Gurmukhi 86 Copyright © 1988. 8. primarily used for Japanese. including space (U+0020) and Fullwidth / Ideographic Space (U+3000). 2009. . 6 %CharType_DBAlphaNumeric Full-width Latin Alphanumeric characters. Excludes 7 None Korean Hangul syllables. Japanese and Korean ideographic characters. excluding Hangul Jamo. 10 %CharType_JapanesePunctuation Full.PeopleCode Built-in Functions Chapter 1 Numeric Value Constant Character Set 3 %CharType_ZenkakuKatakana Zenkaku Katakana (full-width Japanese Katakana) 4 %CharType_Hiragana Hiragana (Japanese) 5 %CharType_Kanji Chinese. Chinese Hanzi and Korean Hancha.

or was added in a version of Unicode greater than that supported by PeopleTools. Oracle and/or its affiliates. 2009.Chapter 1 PeopleCode Built-in Functions Numeric Value Constant Character Set 19 None Gujarati 20 None Oriya 21 None Tamil 22 None Telugu 23 None Kannada 24 None Malayalam 25 None Thai 26 None Lao 27 None Tibetan 28 None Georgian 29 None Bopomofo Returns CharType returns one of the following Number values. 87 . You can check for the constant values instead of the numeric values if you prefer: Numeric Value Constant Value Description 1 0 -1 %CharType_Matched %CharType_NotMatched %CharType_Unknown Character is of type char_code. This occurs if the character being checked is an unallocated Unicode codepoint. UNKNOWN: unable to determine whether character is of set char_code. Copyright © 1988. All Rights Reserved. Character is not of type char_code.

All Rights Reserved. page 107. End-If.PeopleCode Built-in Functions Chapter 1 Example This example tests to see if a character is Hiragana: &ISHIRAGANA = CharType(&STRTOTEST. This function has been deprecated. "PeopleCode Built-in Functions. Note. ChDrive Syntax ChDrive(str_dr) 88 Copyright © 1988." ContainsOnlyCharType. The drive and the directory are both specified in a path string. "Selecting and Configuring Character Sets and Language Input and Output" ChDir Syntax ChDir(path) Description Use the ChDir function to change the current directory on a drive.50 PeopleBook: Global Technology." ContainsCharType. See Also Chapter 1. "PeopleCode Built-in Functions. 2009. Else If &ISHIRAGANA = 0 Then WinMessage("Character type is not Hiragana"). page 110 and Chapter 1. "PeopleCode Built-in Functions. This is similar to the DOS ChDir command." ConvertChar. Else WinMessage("Character type is UNKNOWN"). %CharType_Hiragana). Chapter 1. page 114 Enterprise PeopleTools 8. . If &ISHIRAGANA = 1 Then WinMessage("Character type is Hiragana"). Oracle and/or its affiliates. End-If.

and they cannot be printed. Oracle and/or its affiliates. CheckMenuItem Syntax CheckMenuItem(BARNAME. Frequently. Clean Syntax Clean(string) Description Use the Clean function to remove all non-printable characters. This function has been deprecated. low-level characters appear at the beginning and end of each line of imported data.menubar_name. end of line marks.ITEMNAME. from a text string and returns the result as a String value. Copyright © 1988. All Rights Reserved.Chapter 1 PeopleCode Built-in Functions Description Use the ChDrive function to change the current disk drive to the drive specified by str_dr. for example "C:". such as control codes. This function has been deprecated. Note. which is a string consisting of a valid drive letter followed by a colon. Example Because Char(7) (U+0007) is a non-printable character. and unpaired Unicode combining marks. Returns Returns a String value purged of non-printable characters.menuitem_name) Description Use the CheckMenuItem function to change the menu state by placing a check mark beside the menu item. 89 . Note. the following Clean function returns a null string: &CLEANSTR = Clean(Char(7)). It is intended for use on text imported from other applications that contains characters that may not be printable. 2009.

" String. page 750 CleanAttachments Syntax CleanAttachments() Description The CleanAttachments function deletes the contents of all unreferenced files from the database. "PeopleCode Built-in Functions. . "PeopleCode Built-in Functions. and you invoke the CleanAttachments function. and how it determines which tables contain file contents. Any file not in this list is considered not referenced (orphaned). Warning! There is no way to roll back changes made by the CleanAttachments function. then all the files uploaded to the database through that application will be deleted. If an application has stored file references in tables that do not contain the FILE_ATTACH_SBR subrecord. Returns An integer value. page 84 and Chapter 1. You can check for either an integer or a constant value: 90 Copyright © 1988. In this case CleanAttachments does not find any files to clean and does nothing at all. Oracle and/or its affiliates. CleanAttachments compiles these lists: • A list of file references compiled by pulling the distinct values of the ATTACHSYSFILENAME column from each table associated with a record containing the FILE_ATTACH_SBR subrecord (at any level)." Char. All Rights Reserved. because the system regards them as not referenced (orphaned). Note. Oracle recommends that you perform a database backup before invoking this functionality." %Substring. the FILE_ATTDET_SBR subrecord must be at the top level of the record associated with the table that contains the actual attachments or it will not be recognized by CleanAttachments. It is important that you understand how the system determines that a file is unreferenced. Similarly. • The system deletes any file that appears in the second list. but not in the first.PeopleCode Built-in Functions Chapter 1 See Also Chapter 1. A list of files with stored contents compiled by pulling the distinct values of the ATTACHSYSFILENAME column from each table associated with a record containing the FILE_ATTDET_SBR subrecord at the top level. "Meta-SQL. page 625 Chapter 2. A table is only considered to contain file references if its associated record contains the FILE_ATTACH_SBR subrecord (at any level). 2009.

Failed to allocate memory due to some internal error.50 PeopleBook: PeopleCode Developer's Guide.50 PeopleBook: System and Server Administration. See Also Enterprise PeopleTools 8." Using File Attachments in Applications Enterprise PeopleTools 8. Failed due to non-availability of space on FTP server. File was not successfully transferred." Removing Orphan File Attachments from the Database ClearKeyList Syntax ClearKeyList() Description Use the ClearKeyList function to clear the current key list. Oracle and/or its affiliates. Failed to close SSL connection. Failed due to timeout. Failed due to unexpected/bad reply from server. "Using File Attachments and PeopleCode. 91 . All Rights Reserved. 2009. This function is useful for programmatically setting up keys before transferring to another component. "Using PeopleTools Utilities. Copyright © 1988. The following are some possible situations where %Attachment_Failed could be returned: • • • • • • Failed to initialize the process due to some internal error. Example &retcode = CleanAttachments().Chapter 1 PeopleCode Built-in Functions Numeric Value Constant Value Description 0 1 %Attachment_Success %Attachment_Failed File was transferred successfully.

SetNextPage("PAGE_2"). OPRID).50 PeopleBook: PeopleCode Developer's Guide. reversing the effects of a previous call to the SetSearchDefault function.]fieldname) Description Use the ClearSearchDefault function to disable default processing for the specified field. page 49 ClearSearchDefault Syntax ClearSearchDefault([recordname. ClearKeyList( ). "Accessing the Data Buffer" 92 Copyright © 1988. This function is effective only when used in SearchInit PeopleCode. See Also Chapter 1. All Rights Reserved." AddKeyListItem. the default value specified in the record field properties for that field will not be assigned when the field appears in a search dialog box. Oracle and/or its affiliates. Use the SearchDefault Field class property instead. This function remains for backward compatibility only. .50 PeopleBook: PeopleCode API Reference. Example The following example sets up a key list and then transfers the user to a page named PAGE_2. "PeopleCode Built-in Functions. TransferPage( ). If search default processing is cleared for a record field. AddKeyListItem(OPRID. AddKeyListItem(REQUEST_ID.PeopleCode Built-in Functions Chapter 1 Returns Optionally returns a Boolean value indicating whether the function succeeded. Note." SearchDefault Enterprise PeopleTools 8. "Field Class. REQUEST_ID). See Also Enterprise PeopleTools 8. 2009.

50 PeopleBook: PeopleCode API Reference. Chapter 1. Chapter 1. You must supply the recordname only if the record field and your PeopleCode program are in different locations. See Also Enterprise PeopleTools 8. See Also Chapter 1. Returns Optionally returns a Boolean value indicating whether the function succeeded. "PeopleCode and the Component Processor. "PeopleCode Built-in Functions. If ClearSearchEdit is called for a specific field. "Field Class.]fieldname) Description Use the ClearSearchEdit function to reverse the effects of a previous call to the SetSearchEdit function. "PeopleCode Built-in Functions. 2009. Use the SearchEdit Field class property instead. which is a search key or alternate search key that is about to appear in a search dialog box.]fieldname The name of the target field. "PeopleCode Built-in Functions." SetSearchDialogBehavior. page 598 and Chapter 1." ClearSearchEdit. page 93. page 597 Enterprise PeopleTools 8. "PeopleCode Built-in Functions. All Rights Reserved. the edits specified in the record field properties will not be applied to the field when it occurs in a search dialog." Search Processing in Update Modes ClearSearchEdit Syntax ClearSearchEdit([recordname. "Accessing the Data Buffer" Copyright © 1988." SetSearchDefault. Note.50 PeopleBook: PeopleCode Developer's Guide." SetSearchEdit. This function remains for backward compatibility only.50 PeopleBook: PeopleCode Developer's Guide.Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description [recordname. 93 . Oracle and/or its affiliates." SearchEdit Enterprise PeopleTools 8. page 596.

page 596." Char. "PeopleCode Built-in Functions. which is a search key or alternate search key about to appear in a search dialog box.) If the string starts with a non-BMP Unicode character." SetSearchDefault. "PeopleCode and the Component Processor." ClearSearchDefault. page 625 Chapter 2. the value returned will be that of the Unicode high surrogate of the character (the first value of the surrogate pair). "PeopleCode Built-in Functions.]fieldname The name of the target field. See Also Chapter 1. See Also Chapter 1.PeopleCode Built-in Functions Chapter 1 Parameters Parameter Description [recordname. "Meta-SQL. All Rights Reserved. "PeopleCode Built-in Functions. Returns Optionally returns a Boolean value indicating whether the function succeeded. Oracle and/or its affiliates." %Substring.50 PeopleBook: PeopleCode Developer's Guide. "PeopleCode Built-in Functions. page 598. page 92 and Chapter 1. 2009. . page 84 and Chapter 1. (Normally you would pass this function a single character. page 597 Enterprise PeopleTools 8. Chapter 1. Returns Returns a Number value equal to the character code for the first character in str. page 750 94 Copyright © 1988." SetSearchDialogBehavior." Search Processing in Update Modes Code Syntax Code(str) Description Use the Code function to return the numerical Unicode UTF-16 value for the first character in the string str. "PeopleCode Built-in Functions. Chapter 1." String." SetSearchEdit. "PeopleCode Built-in Functions. The recordname prefix is not required if the program that calls ClearSearchEdit is on the recordname record definition.

"PeopleCode Built-in Functions. it is possible that a long-running batch job could grow in memory usage over time as these unreferencable Application Objects accumulate. 95 . This function is automatically invoked by the application server as part of its end-of-service processing. 2009. Returns None." Code. Copyright © 1988. so generally you do not need to call it for online applications. but which have not been reclaimed and so are still taking up computer memory. Parameters None. Generally this situation arises only if you have application objects that form into loops of references. The solution to such a problem is to call CollectGarbage periodically to reclaim these objects. page 94 CollectGarbage Syntax CollectGarbage() Description Use the CollectGarbage function to remove any unreachable application objects created by the Application Classes.Chapter 1 PeopleCode Built-in Functions Codeb Syntax Codeb(str) Description Note. Oracle and/or its affiliates. See Also Chapter 1. Sometimes there may be unrecoverable application objects that are can no longer be referenced from PeopleCode. However. This function has been deprecated and is no longer supported. All Rights Reserved. in Application Engine (batch).

"PeopleCode Built-in Functions. When CommitWork is called in the context of a component interface (such as. or any other think-time action. during a SavePreChange PeopleCode program that's associated with the component). the FieldChange and SavePreChange events. • 96 Copyright © 1988. 2009. . When used with an Application Engine program.50 PeopleBook: PeopleCode API Reference. page 76. a single transaction was represented by a page or a component. All Rights Reserved. So it is possible for an application to update the database in FieldChange. you'll receive a runtime error. by preceding the think-time action with a call to CommitWork. you'll receive a runtime error. If you use it anywhere else. • • This function is available in Application Engine PeopleCode. • • • See Chapter 1. updates. this function only applies to those Application Engine programs that run in batch (not online). This is a fundamental change: previously. FieldChange and SavePreChange Considerations The following are the FieldChange and SavePreChange considerations: • All updates done in FieldChange (including those using CallAppEngine) should be considered a single database transaction. "Application Classes" CommitWork Syntax CommitWork() Description Use the CommitWork function to commit pending changes (inserts. A consequence of this is that a message requiring a reply. Component interfaces that rely on CommitWork to save data cannot be used in the Excel to Component Interface utility. The same is true for commit settings at the section or step level. causes a fatal error if located in FieldChange after a database update that has not been committed to the database using the CommitWork function. Oracle and/or its affiliates. This function can only be used in an Application Engine program that has restart disabled. but only when the last cursor is closed." CallAppEngine.PeopleCode Built-in Functions Chapter 1 See Also Enterprise PeopleTools 8. if the caller of the component interface already has an open cursor (such as an active SQL object) the Commit does not take effect immediately. then do a think-time action. and deletes) to the database. If you try to use this function in a program that doesn't have restart disabled. Considerations for Using CommitWork The following are the considerations for using CommitWork. If the program is invoked using the CallAppEngine function. the CommitWork call is ignored.

" FieldChange Event. and you must commit without exiting the program. Oracle and/or its affiliates. "PeopleCode and the Component Processor. is the process being restarted from the top after an abend?). Restart Considerations Disabling restart on a particular program means that the application itself is intrinsically self-restartable: it can be re-run from the start after an abend. Consider the following points to managing restarts in a self-restarting program: • Locking input transactions (optional). such as any open PeopleCode SQL objects.Chapter 1 PeopleCode Built-in Functions • CommitWork commits the updates and closes the database transaction (that is. When using CommitWork in the Component Processor environment (as opposed to using it in an Application Engine program) CommitWork produces an error if there are any open cursors. If the input data can change. In a typical Application Engine program. there should be logic to lock transactions at the start of the initial run (such as updating rows with current Process Instance). SQL commands are split between multiple Application Engine actions that fetch. If no rows found.50 PeopleBook: Application Engine. so that locking is not necessary. cleanup. if you do not lock transactions. and it performs any initialization. This is the recommended approach. In some cases it is acceptable for a restarted process to pick up new rows. and that upon successful completion. Only row-by-row applications that have restart built into them can benefit from disabling Application Engine's restart. It depends on your application. 97 . Copyright © 1988. you would use the section or step level commit settings to manage the commits. All Rights Reserved. with some types of Application Engine programs that are PeopleCode intensive. the database is in the same state it would have been if no abend occurred. or delete application data. the unit of work). and filtering of input data to ensure that everything gets processed once and only once. it can be difficult to exit the PeopleCode in order to perform a commit. "Managing Application Engine Programs. This is the only time when the CommitWork function should be used. any subsequent rollback calls will not rollback the committed updates. you must provide some other way to manage concurrent processing of the same program. 2009. The program should first check whether any rows have the current Process Instance (that is. do the update. and if it's important not to pick up new data during a restart.50 PeopleBook: PeopleCode Developer's Guide." Restarting Application Engine Programs. However. Therefore. update. See Enterprise PeopleTools 8. The consequence of using CommitWork is that because it closes the database transaction. You do not want two simultaneous runs of the same program to use the same data. Set-based applications should always use Application Engine's restart. Just as any database updates in FieldChange required careful application design to ensure that the transaction model is appropriate. insert. • • See Enterprise PeopleTools 8. Application Engine Considerations The CommitWork function is useful only when you are doing row-at-a-time SQL processing in a single PeopleCode program. Also. so too does the use of CommitWork. so you must have some strategy for dividing up the data such that there is no overlap.

/* update transaction as "processed" */ &REC..Update(). the row should be updated accordingly (that is.TRANS_TBL). setting a "processed" flag). While &SQL. &REC = CreateRecord(RECORD. each have the following syntax: 98 Copyright © 1988.PROCESSED. Example The following example fetches rows and processes them one at a time. After an input transaction is processed.Fetch(&REC) If (&COUNT > 99) Then &COUNT = 0. The SELECT statement that drives the main processing loop should include a WHERE condition to filter out rows that have already been processed. "Using Meta-SQL and PeopleCode. &SQL = CreateSQL("%SelectAll(:1) WHERE PROCESSED <> 'Y'"). 2009.PeopleCode Built-in Functions Chapter 1 • Filtering input transactions (required). &REC.50 PeopleBook: Application Engine. End-While. Local SQL &SQL. &SQL. Returns A Boolean value.Execute(&REC). Because restart is disabled. False otherwise. CommitWork().. True if data was successfully committed. you must have a marker indicating which rows have been processed. All Rights Reserved. . /* commit work once per 100 iterations */ End-if." Using PeopleCode in Application Engine Programs CompareLikeFields Syntax CompareLikeFields(from. /* do processing */ . &COUNT = 0. Local Number &COUNT.Value = 'Y'. and use it in a conditional clause that filters out those rows. committing every 100 iterations. &COUNT = &COUNT + 1.to) where from and to are constructions that reference rows of data on specific source and target records in the component buffer. Oracle and/or its affiliates. Local Record &REC. See Also Enterprise PeopleTools 8.

"Referencing Data in the Component Buffer.level1_row.scrollpath.scrollpath.level2_recname.50 PeopleBook: PeopleCode API Reference. Copyright © 1988. to level scrollpath target_row Returns Returns a Boolean value indicating whether all of the like-named fields in the two records have the same data value. target_row) that references the second row in the comparison. you can use SCROLL. target_row and where scrollpath is: [RECORD.50 PeopleBook: PeopleCode Developer's Guide. Specifies the scroll level for the target level scroll. target_recname To prevent ambiguous references. Specifies the row number of each target row on its scroll level.scrollname. Use the CompareFields record class method instead. Oracle and/or its affiliates. This function remains for backward compatibility only. "Record Class. 2009. otherwise it returns False.50 PeopleBook: PeopleCode Developer's Guide. "Accessing the Data Buffer" Enterprise PeopleTools 8.level2_row. A placeholder for a construction (level.level1_recname. Note. All Rights Reserved. CompareLikeFields returns True. Description Use the CompareLikeFields function to compare fields in a row on a specified source record to similarly named fields on a specified target record. where scrollname is the same as the scroll level's primary record name. [RECORD. A construction that specifies a scroll level in the component buffer. ]] RECORD. See Also Enterprise PeopleTools 8." CompareFields Enterprise PeopleTools 8. scrollpath." Specifying Data with References Using Scroll Path Syntax and Dot Notation Parameters Parameter Description from A placeholder for a construction (level. If all of the like-named fields have the same data value. 99 .Chapter 1 PeopleCode Built-in Functions level.target_row) that references the first row in the comparison.

A change in a line shows as an Insert in new_text and a Delete in old_text. See Also Chapter 1. &L2_ROW = 1. Parameters Parameter Description new_text Specify a string that you want to compare with the initial string.BUS_EXPENSE_DTL. 2009. All Rights Reserved. Oracle and/or its affiliates. based on the delimiter.BUS_EXPENSE_⇒ PER.BUS_EXPENSE_PER. &L1_ROW = 1. if CompareLikeFields(1. &L1_ROW. RECORD. RECORD. page 129 CompareStrings Syntax CompareStrings(new_text. as shown in the following table: Notation Description None Insert Delete Change Both lines are the same A line is present in new_text that is not in old_text. A line is absent in new_text that is present in old_text. RECORD. "PeopleCode Built-in Functions. &L2_ROW) then WinMessage("The fields match. The XML string indicates the type of change for each line or text segment. delimiter]]) Description Use the CompareStrings function to compare the content of new_text with the content of old_text and return an XML-formatted text string detailing the differences between the two strings." CopyFields. 2. end-if. 100 Copyright © 1988.PeopleCode Built-in Functions Chapter 1 Example The following example compares the like-named fields in two rows on levels 1 (&L1_ROW) and 2 (&L2_ROW) and returns True if all of the like-named fields in the two rows have the same value.old_text [. content_type [. ."). 1.

Copyright © 1988.2. 2. "</pre>". the delimiter array is populated by default with the following values: ["</p>". "</h1>". &OldText. The following PeopleCode statement compares the two ASCII-formatted text strings. "<br ⇒ />" . "</tr>". Example This example shows a comparison of two text strings. 6. 8. This parameter is optional. Oracle and/or its affiliates.1. "</h6>". Specify "Text" or "HTML". All Rights Reserved. &NewText and &OldText. 3. If content_type is "HTML" and delimiter is not specified. "</h3>". "<⇒ /h5>". If "HTML" is specifed then HTML tags are stripped and are not included in the comparison. "</div>". 5. "<⇒ /blockquote>"] Returns Returns a String in XML format showing the differences between the two input strings. The variable &OldText contains the following string: Line Line Line Line Line 1. This parameter is optional. If content_type is "Text" and delimiter is not specified. 2009. "Text"). 2. "</caption>"."<br/>". "</address>". "</h4>". 101 . "</h2>". 7. If content_type is not specified it is set by default to "Text". 2. &OutputXML = CompareStrings(&NewText. 3. The variable &NewText contains the following string: Line Line Line Line Line Line Line 2. the delimiter is set to "/n" (end of line) by default. "</br>". 4.Chapter 1 PeopleCode Built-in Functions Parameter Description old_text content_type Specify the initial string for comparison. delimiter An Array of String specifying the delimiters to be used to split the content for comparison.

</LineContent> </Line> <Line Num="3"> <LineContent>Line 2."> <FileContent Difference="Deleted"> <Line Num="1"> <LineContent>Line 1.</LineContent> </Line> </FileContent> <FileContent Difference="Inserted"> <Line Num="7"> <LineContent>Line 8.6 and &gt. The variable &NewHTML contains the following string: <p><H1>peoplesoft<B>file<B> difference utility <I>Peopletools<I> Release &lt. 2009.BOLD&gt.</LineContent> </Line> </FileContent> <FileContent Difference="Changed"> <OldLine Num="4"> <LineContent>Line</LineContent> <LineContent Changed="Deleted">4. All Rights Reserved.1.</LineContent> </OldLine> <Line Num="4"> <LineContent>Line</LineContent> <LineContent Changed="Inserted">5.</LineContent> </Line> </FileContent> <FileContent Difference="None"> <Line Num="1" OldLineNum="2"> <LineContent>Line 2.Hello world<ITALIC></p> The variable &OldHTML contains the following string: 102 Copyright © 1988.</LineContent> </Line> </FileContent> <FileContent Difference="None"> <Line Num="4" OldLineNum="3"> <LineContent>Line 3.</LineContent> </Line> <OldLine Num="5"> <LineContent>Line</LineContent> <LineContent Changed="Deleted">7.5 </H1></p> <p> &lt.</LineContent> </OldLine> <Line Num="5"> <LineContent>Line</LineContent> <LineContent Changed="Inserted">6.</LineContent> </Line> </FileContent> </CompareReport> This example shows a comparison of two HTML strings.0" encoding="UTF-8" standalone="no" ?> <CompareReport ContentType="text" Delimitter="&#xA.PeopleCode Built-in Functions Chapter 1 The string variable &OutputXML contains the following text: <?xml version="1.</LineContent> </Line> </FileContent> <FileContent Difference="Inserted"> <Line Num="2"> <LineContent>Line 2. . Oracle and/or its affiliates.2.

&OutputXML = CompareStrings(&NewHTML.</H1>" ContentType ="html"> <FileContent Difference="Changed"> <OldLine Num="1"> <LineContent Changed="Deleted">peoplesoftfile difference</LineContent> <LineContent>utility Peopletools Release</LineContent> <LineContent Changed="Deleted ">&lt.Chapter 1 PeopleCode Built-in Functions <p><H1>peoplesoft<B>file<B>difference utility <I>Peopletools<I> Release &lt. You receive a design time error if you try. &OldHTML. 2009.BOLD&gt. Copyright © 1988. Declarations appear at the beginning of the program.7 and &gt.lt.6</LineContent> <LineContent>and &gt. Note.Hello world<ITALIC></p> The following PeopleCode statement compares the two HTML-formatted text strings.Hello world</LineContent> </Line> <Line Num="3" OldLineNum="3"> <LineContent></LineContent> </Line> </FileContent> </CompareReport> Component Syntax Component data_type &var_name Description Use the Component statement to declare PeopleCode component variables. A component variable. &NewHTML and &OldHTML.5 </LineContent> </Line> </FileContent> <FileContent Difference="None"> <Line Num="2" OldLineNum="2"> <LineContent>&amp. you cannot declare any variables within a function. 103 . The variable must be declared with the Component statement in every PeopleCode program in which it is used.0" encoding="UTF-8" standalone="no" ?> <CompareReport Delimitter="</p>. after being declared in any PeopleCode program.5 </H1></p> <p> &lt.BOLD&amp.5 </LineContent> </OldLine> <Line Num="1"> <LineContent Changed="Inserted">peoplesoftfiledifference</LineContent> <LineContent>utility Peopletools Release</LineContent> <LineContent Changed="Inserted ">&lt. The string variable &OutputXML contains the following text: <?xml version="1. intermixed with function declarations. remains in scope throughout the life of the component. "HTML"). Oracle and/or its affiliates.7</LineContent> <LineContent>and &gt. Because a function can be called from anywhere.gt. All Rights Reserved.

All Rights Reserved. 2009. Returns Returns a Boolean value: True if the component has changed. page 400 Enterprise PeopleTools 8. Not all PeopleCode data types can be declared as Component." Data Types ComponentChanged Syntax ComponentChanged() Description Use the ComponentChanged function to determine whether a component has changed since the last save. Example If ComponentChanged() Then /* do some stuff */ End-if. A legal variable name.50 PeopleBook: PeopleCode Developer's Guide. See Also Chapter 1." Local. 104 Copyright © 1988. "PeopleCode Built-in Functions. Declared variables always have values appropriate to their declared type. "Understanding the PeopleCode Language. Oracle and/or its affiliates. Parameters Parameter Description data_type &var_name Specify a PeopleCode data type. Example Component string &PG_FIRST. "PeopleCode Built-in Functions. page 446 and Chapter 1. . whether by the user or by PeopleCode." Global.PeopleCode Built-in Functions Chapter 1 The system automatically initializes temporary variables. Undeclared variables are initialized as null strings.

Chapter 1 PeopleCode Built-in Functions ConnectorRequest Syntax ConnectorRequest(&Message) Description Use the ConnectorRequest function to send data to the connector using a message. Use the IntBroker class ConnectorRequest method instead. 2009. See Also Chapter 1. Use the GetXmlDoc message class method to retrieve the content data. In general. The data is wrapped in the CDATA tag. You do not need to set up any transaction or relationship when you use this function. 105 . "PeopleCode Built-in Functions. The response to the message is returned as a nonrowset-based message. then use ConnectorRequest. See Also Enterprise PeopleTools 8.50 PeopleBook: PeopleCode API Reference. Returns A nonrowset-based message object. when the connector properties are assigned in the message. Note. you would build a message. Oracle and/or its affiliates. All Rights Reserved. add the specific connector properties." ConnectorRequest Parameters Parameter Description &Message Specify an already instantiated message. This function has been deprecated and remains for backward compatibility only." ConnectorRequestURL. It is a direct call to the gateway. page 106 Copyright © 1988. "Message Classes.

50 PeopleBook: PeopleCode API Reference. page 105 106 Copyright © 1988.com/d/quotes. . See Also Enterprise PeopleTools 8. Use the IntBroker class ConnectorRequestURL method instead. All Rights Reserved. This is a fully formed URL.txt/?symbols=PSFT&format=l1c1d1t1 See Also Chapter 1. Oracle and/or its affiliates.yahoo. 2009. "Message Classes." ConnectorRequest. This function has been deprecated and remains for backward compatibility only." ConnectorRequestUrl Parameters Parameter Description ConnectorStringURL Specify the URL of the gateway as a string. "PeopleCode Built-in Functions. Example The following is the type of URL that could be returned if you were trying to get a PSFT stock quote: http://finance. Returns A string containing the URL information returned from the message. Note.PeopleCode Built-in Functions Chapter 1 ConnectorRequestURL Syntax ConnectorRequestURL(ConnectorStringURL) Description Use the ConnectorRequestURL function to go directly to the gateway for accessing information.

Unicode characters in the range U+00BF — U+07E 2 %CharType_HankakuKatakana Hankaku Katakana (half-width Japanese Katakana) 3 %CharType_ZenkakuKatakana Zenkaku Katakana (full-width Japanese Katakana) 4 %CharType_Hiragana Hiragana (Japanese) Copyright © 1988. A number value representing the character type to be tested for. Unicode characters in the range U+0020 — U+007E 1 %CharType_ExtendedLatin1 Extended Latin-1 characters (ISO 8859-1 accents for Western European languages). Oracle and/or its affiliates. 2009. The following table shows valid values. Parameters Parameter Description source_str char_code String to be examined. Most character types supported by this function equate to specific Unicode character blocks or are based on Unicode character properties. You can specify either a character code numeric value or a constant: Numeric Value Constant Character Set 0 %CharType_AlphaNumeric Basic Latin — Alphanumeric (printable range of 7-bit USASCII).Chapter 1 PeopleCode Built-in Functions ContainsCharType Syntax ContainsCharType(source_str.char_code) Description Use the ContainsCharType function to determine if any of the characters in source_str are of type char_code. 107 . The char_code is a numerical value representing a character type (see the following Parameters section for details). All Rights Reserved.

Excludes 7 None Korean Hangul syllables. 2009. Includes Japanese Kanji. 6 %CharType_DBAlphaNumeric Full-width Latin Alphanumeric characters. . Chinese Hanzi and Korean Hancha.and half-width punctuation. 8. All Rights Reserved. 11 None Greek 12 None Cyrillic 13 None Armenian 14 None Hebrew 15 None Arabic 16 None Devanagari 17 None Bengali 18 None Gurmukhi 19 None Gujarati 20 None Oriya 21 None Tamil 108 Copyright © 1988. 10 %CharType_JapanesePunctuation Full.PeopleCode Built-in Functions Chapter 1 Numeric Value Constant Character Set 5 %CharType_Kanji Chinese. including space (U+0020) and Fullwidth / Ideographic Space (U+3000). primarily used for Japanese. Oracle and/or its affiliates. excluding Hangul Jamo.9 None Reserved for future use. Japanese and Korean ideographic characters.

109 . You can check for the constant instead of the numeric value if you prefer: Numeric Value Constant Value Description 1 %CharType_Matched String contains at least one character of set char_code. All Rights Reserved. 2009. UNKNOWN: unable to determine whether character is of set char_code. 0 %CharType_NotMatched -1 %CharType_Unknown Example This example tests to see if the string contains any Hiragana: Copyright © 1988.Chapter 1 PeopleCode Built-in Functions Numeric Value Constant Character Set 22 None Telugu 23 None Kannada 24 None Malayalam 25 None Thai 26 None Lao 27 None Tibetan 28 None Georgian 29 None Bopomofo Returns ContainsCharType returns one of the following Number values. This occurs if the character being checked is an unallocated Unicode codepoint. String contains no characters of set char_code. Oracle and/or its affiliates. or was added in a version of Unicode greater than that supported by PeopleTools.

page 107. Else WinMessage("UNKNOWN"). or a constant. "PeopleCode Built-in Functions. . Oracle and/or its affiliates. Either a Number value identifying a character set.50 PeopleBook: Global Technology. You can specify either a character code numeric value or a constant: 110 Copyright © 1988. page 114 Enterprise PeopleTools 8.PeopleCode Built-in Functions Chapter 1 &ANYHIRAGANA = ContainsCharType(&STRTOTEST. Else If &ANYHIRAGANA = 0 Then WinMessage("There are no Hiragana characters"). char_code_2]. Description Use the ContainsOnlyCharType function to determine whether every character in source_str belongs to one or more of the character types in char_code_list. See the following Parameters section for a list of valid character code values. "Selecting and Configuring Character Sets and Language Input and Output" ContainsOnlyCharType Syntax ContainsOnlyCharType(source_str." ContainsCharType. "PeopleCode Built-in Functions. . Parameters Parameter Description Source_str char_code_list char_code_n String to be examined. . See Also Chapter 1. "PeopleCode Built-in Functions." ConvertChar. The following table shows valid values. Chapter 1. If &ANYHIRAGANA = 1 Then WinMessage("There are Hiragana characters"). End-If. A comma-separated list of character set codes. 4). page 110 and Chapter 1." ContainsOnlyCharType.char_code_list) Where char_code_list is a list of character set codes in the form: char_code_1 [. All Rights Reserved. Most character types supported by this function equate to specific Unicode character blocks or are based on Unicode character properties. 2009. End-If.

Chapter 1 PeopleCode Built-in Functions Numeric Value Constant Character Set 0 %CharType_AlphaNumeric Alphanumeric (7-bit ASCII codes. 111 . You can check for the constant instead of the numeric value. 2009. Oracle and/or its affiliates. String contains one or more characters that do not belong to sets listed in char_code_list. All Rights Reserved. a-z. A-Z. punctuation) 1 %CharType_ExtendedLatin1 Extended Latin-1 characters (ISO8859-1 accents for Spanish. French. 1-9.8. 0 %CharType_NotMatched Copyright © 1988.9 Reserved for future use 10 %CharType_JapanesePunctuation Japanese punctuation Returns ContainsOnlyCharType returns one of the following Number values.) 2 %CharType_HankakuKatakana Hankaku Katakana (single-byte Japanese Katakana) 3 %CharType_ZenkakuKatakana Zenkaku Katakana (double-byte Japanese Katakana) 4 %CharType_Hiragana Hiragana (Japanese) 5 %CharType_Kanji Kanji (Japanese) 6 %CharType_DBAlphaNumeric Double-byte Alphanumeric (Japanese) 7. etc. if you prefer: Numeric Value Constant Value Description 1 %CharType_Matched String contains only characters belonging to the sets listed in char_code_list.

How the statement performs depends on the type of loop: • In For loops. the return value is UNKNOWN. 10). All Rights Reserved." CharType. If &ONLYHIRAGANA = 1 Then WinMessage("There are only Hiragana and Punctuation characters"). This occurs if the character being checked is an unallocated Unicode codepoint. or was added in a version of Unicode greater than that supported by PeopleTools. page 107 and Chapter 1. Chapter 1. "PeopleCode Built-in Functions. Else WinMessage("UNKNOWN"). End-If End-If See Also Chapter 1.50 PeopleBook: Global Technology. Else If &ONLYHIRAGANA = 0 Then WinMessage("Mixed characters"). Oracle and/or its affiliates. Example This example tests to see is the string is only Hiragana or Punctuation: &ONLYHIRAGANA = ContainsOnlyCharType(&STRTOTEST. . page 85. Note." ContainsCharType. If any character in the string is determined to be UNKNOWN. 4.PeopleCode Built-in Functions Chapter 1 Numeric Value Constant Value Description -1 %CharType_Unknown UNKNOWN: unable to determine whether character is of set char_code. this statement continues to do the next step of the iteration 112 Copyright © 1988." ConvertChar. "PeopleCode Built-in Functions. 2009. "Selecting and Configuring Character Sets and Language Input and Output" Continue Syntax Continue Description Use the Continue statement to continue execution in a loop. page 114 Enterprise PeopleTools 8. "PeopleCode Built-in Functions.

&K = &K + 2. &J = &I + 1. MessageBox(0." Exit. End-For. "". For &A = 0 To 5. &K = &K + 1. 2009. If &I < 2 Then Continue. &K = 0. &N = &N + 1. "". If &Barf = 1 Then Continue. 113 . Example The following are tests of the continue statement in various types of loops: SetTracePC(%TracePC_List). End-If. "PeopleCode Built-in Functions. If &J = 7 Then Continue. For &I = 1 To 10. /* tests of continue statement */ &N = 0. 0. All Rights Reserved. "PeopleCode Built-in Functions. Oracle and/or its affiliates. Repeat &Barf = &Barf." Break. End-If. this statement continues to the Until check at the bottom of the loop. &J = &J + 1. 0. 0. End-If. /* now a while loop in here */ While &J <= 10. End-If. End-While. 0. /* no continue statement */ &Barf = 2. page 65 and Chapter 1. MessageBox(0. End-For. If &I > 5 Then Continue. Parameters None.Chapter 1 PeopleCode Built-in Functions • • In While loops. "K=" | &K). "N=" | &N). page 254 Copyright © 1988. this statement continues to the top of the loop and the test of the condition In Repeat-Until loops. See Also Chapter 1. Until &Barf = &Barf.

. or not supported. Conversion of full-width alphanumeric characters to their half-width equivalents. Parameters Parameter Description Source_str Source_str_category String to be converted. the function returns a value of UNKNOWN (-1). If source_str can be partially converted. See the Supported Conventions section later in this reference entry for details. French etc. Oracle and/or its affiliates. Language category of input string. and Hiragana .target_char_code) Description Use the ConvertChar function to convert every character in source_str to type target_char_code. All Rights Reserved.source_str_category. Conversion of Japanese Hankaku (half-width) Katakana. Conversion of full-width punctuation characters to their half-width equivalents. Zenkaku (full-width) Katakana.output_str. Character types 0 and 1 (alphanumeric and extended Latin-1) are always passed through to output_str without conversion. if possible. and place the converted string in output_str. echo the remaining characters to the output string as-is.PeopleCode Built-in Functions Chapter 1 ConvertChar Syntax ConvertChar(source_str. and Hiragana to Hepburn Romaji (Latin representation). ConvertChar will partially convert string. Numeric Value Constant Value Description 0 1 %ConvertChar_AlphaNumeric %ConvertChar_ExtendedLatin1 Half-width AlphaNumeric Extended Latin-1 Characters (ISO8859-1 accents. 2009. You can specify either a number or a constant. Other source_str and target_char_code combinations are either passed through without conversion. If ConvertChar is unable to determine whether the characters in source_str belong to the specified character set.) Japanese (any) 2 %ConvertChar_Japanese 114 Copyright © 1988. Zenkaku (full-width) Katakana. Spanish. ConvertChar supports the following conversions: • • • • Conversion among Japanese Hankaku (half-width) Katakana. and return a value of -2 (Completed with Issues).

if the source string is of the same type as any of these values.) Chinese.and half-width punctuation. which are passed through without conversion. You can specify either a character code numeric value or a constant: Numeric Value Constant Value Description 0 %CharType_AlphaNumeric Half-width AlphaNumeric — results in a Hepburn Romaji conversion when the input string contains Hiragana or Katakana Hankaku Katakana (half—width Japanese Katakana) Zenkaku Katakana (full-width Japanese Katakana) Hiragana (Japanese) Full-width AlphaNumeric (Japanese) 2 %CharType_HankakuKatakana 3 %CharType_ZenkakuKatakana 4 6 %CharType_Hiragana %CharType_DBAlphaNumeric The following target values are not supported. 5 %CharType_Kanji 10 %CharType_JapanesePunctuation Supported Conversions The following table shows which conversions are supported. including space (U+0020) and Fullwidth / Ideographic Space (U+3000). and which are not supported: Source Target Conversion 0 (Alphanumeric US-ASCII) 0-6 (All supported character types) Pass through without conversion Copyright © 1988. All Rights Reserved. Oracle and/or its affiliates. Numeric Value Constant Value Description 1 %CharType_ExtendedLatin1 Extended Latin-1 characters (ISO8859-1 accents for Spanish.Chapter 1 PeopleCode Built-in Functions Parameter Description Output_str Target_char_code A String variable to receive the converted string. etc. 115 . Japanese and Korean ideographic characters. 2009. French. Either a Number or a constant representing the conversion target character type. Full. then the string is passed through without conversion.

Hepburn Romaji) Conversion supported 1 (Extended Latin) Not supported 2 (Hankaku Katakana) Conversion supported 116 Copyright © 1988. Oracle and/or its affiliates.PeopleCode Built-in Functions Chapter 1 Source Target Conversion 1 (Extended Latin-1 characters) 0-6 (All supported character sets) 0 (Alphanumeric — Hepburn romaji) Pass through without conversion 2 (Hankaku Katakana) Conversion supported 1 (Extended Latin) Not supported 2 (Hankaku Katakana) Pass through without conversion 3 (Zenkaku Katakana) Conversion supported 4 (Hiragana) Conversion supported 5 (Kanji) Not supported 6 (Full-width alphanumeric) Not supported 3 (Zenkaku Katakana) 0 (Alphanumeric) Conversion supported 1 (Extended Latin) Not supported 2 (Hankaku Katakana) Conversion supported 3 (Zenkaku Katakana) Pass through without conversion 4 (Hiragana) Conversion supported 5 (Kanji) Not supported 6 (Full-width alphanumeric) Not supported 4 (Hiragana) 0 (Alphanumeric. All Rights Reserved. 2009. .

117 . String not converted. 6 Not supported 5 (Kanji) Pass through without conversion 6 (Full-width alphanumeric) 0 (Alphanumeric) Conversion supported 1-5 Not supported 6 (Full-width alphanumeric) Pass through without conversion 10 (Japanese punctuation) 0 (Alphanumeric) Conversion supported 1 (Extended Latin) Not supported 3-6. depending on what you're checking for: Numeric Value Constant Value Description 1 0 %ConvertChar_Success %ConvertChar_NotConverted String successfully converted. 10 Pass through without conversion Returns Returns either a Number or a constant with one of the following values. Copyright © 1988. All Rights Reserved. Oracle and/or its affiliates. 2009.Chapter 1 PeopleCode Built-in Functions Source Target Conversion 3 (Zenkaku Katakana) Conversion supported 4 (Hiragana) Pass through without conversion 5 (Kanji) Not supported 6 (Full-width alphanumeric) Not supported 5 (Kanji) 0-4.

If any character cannot be translated. Conversion executed but there were one or more characters encountered that were either not recognized. or whose conversion is not supported. or was added in a version of Unicode greater than that supported by PeopleTools. 4). 2. -2 %ConvertChar_Issues Note. Example This example attempts to convert a string to Hiragana: &RETVALUE = ConvertChar(&INSTR. This occurs if the character being checked is an unallocated Unicode codepoint. &OUTSTR." ContainsOnlyCharType. End-If End-If End-If See Also Chapter 1.output_str could therefore be a mixture of converted and non-converted characters. ."). page 110 Enterprise PeopleTools 8. it is echoed as-is to output_str. page 85. Else If &RETVALUE = . "PeopleCode Built-in Functions. Oracle and/or its affiliates." CharType. Else WinMessage("Some characters could not be converted. Completed with issues. page 107 and Chapter 1." ContainsCharType.50 PeopleBook: Global Technology. "PeopleCode Built-in Functions.1 Then WinMessage("Input string is UNKNOWN character type. If &RETVALUE = 1 Then WinMessage("Conversion to Hiragana successful"). 2009.PeopleCode Built-in Functions Chapter 1 Numeric Value Constant Value Description -1 %ConvertChar_Unknown UNKNOWN: unable to determine whether character is of set char_code. Chapter 1. Else If &RETVALUE = 0 Then WinMessage("Conversion to Hiragana failed"). "PeopleCode Built-in Functions."). "Selecting and Configuring Character Sets and Language Input and Output" 118 Copyright © 1988. All Rights Reserved.

50 PeopleBook: Global Technology. If a conversion rate cannot be found. exchng_rt_type. contains one of the following values: Effdt Converted_amt Error_process • • • "F" . rt_index]]) Description Use the ConvertCurrency function to convert between currencies.Or other−return without producing a message box If error_process is not specified.Chapter 1 PeopleCode Built-in Functions ConvertCurrency Syntax ConvertCurrency(amt.currency_cd. See Also Enterprise PeopleTools 8. "W" . round defaults to False. The currency in which the amt is currently expressed. error_process [. if specified.exchng_to_currency.Produce a fatal error if a matching conversion rate is not found. This is the value of the RT_TYPE field in the RT_RATE table of RT_DFLT_VW. If omitted. converted_amt [. round] [.effdt. You must supply a variable for this parameter. An optional string that. The effective date of the conversion to be used. The currency exchange rate to be used. "I" . 2009. The currency to which the amt should be converted. The result of the conversion is placed in a variable passed in converted_amt. All Rights Reserved. Copyright © 1988. 119 . converted_amt is set equal to amt. Oracle and/or its affiliates. "Controlling Currency Display Format" Parameters Parameter Description Amt Currency_cd Exchng_to_currency Exchng_rt_type The currency amount to be converted.Produce a warning message box if a matching conversion rate is not found. Round Optional Boolean value indicating whether to round converted_amt to the smallest currency unit. The resulting converted amount. it defaults to Fatal ("F").

"F").COST. this change will not be reflected in an already open page until the user closes the page. then further converts it to the base time. &FROM_CUR. &COST_ROW_CUR. &COST_COST). 2009. &PROFILE_CUR_CD. . &CON_COST_TO). ConvertCurrency(&CON_COST_FROM. UpdateValue(COST_NON_CAP. This function automatically calculates whether daylight savings time is in effect for the given textdatetime. &PROFILE_CUR_CD). rem **-----------------------------------------------**. &COST_ROW_CUR.TRANS_⇒ DT.COST. &CON_ACC_DEPR_FROM = &COST_ACCUM. rem * Convert the cost & accum_depr fields if books *. If the currency exchange rate is changed in a PeopleSoft table. %UserIdId). Oracle and/or its affiliates. the Default Exchange Rate index (as specified on the Market Rate index definition) is used. End-If. UpdateValue(COST_NON_CAP. Else UpdateValue(COST_NON_CAP. *. &COST_ROW_CUR. All Rights Reserved. Returns ConvertCurrency returns a Boolean value where True means a conversion rate was found and converted_amt calculated. and False means a conversion rate was not found and a value of one (1) was used. RT_TYPE.PeopleCode Built-in Functions Chapter 1 Parameter Description rt_index An optional string to indicate which exchange rate index should be used to retrieve the exchange rate. rem. Note. If &FROM_CUR <> &PROFILE_CUR_CD Then &CON_COST_FROM = &COST_COST. &COST_ROW_CUR. ConvertDatetimeToBase Syntax ConvertDatetimeToBase(textdatetime. Example rem **-----------------------------------------------**. &CON_COST_TO. Description Use the ConvertDatetimeToBase function to convert the text value textdatetime to a datetime value. 120 Copyright © 1988. UpdateValue(COST_NON_CAP. The system's base time zone is specified on the PSOPTIONS table. then opens it again. If omitted. rem * use different currencies.OPRID.FROM_CUR. {timezone | "Local" | "Base"}).

See Also Chapter 1. Chapter 1." TimeToTimeZone. "PeopleCode Built-in Functions. Values are: • • • timezone . &DATETIMEVAL would have a datetime value of "01-01-199907:00:00.50 PeopleBook: System and Server Administration.In_Frequency." DateTimeToTimeZone.Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description textdatetime timezone | Local | Base Specify a datetime value represented as text (for example." ConvertTimeToBase. 2009." FormatDateTime. Chapter 1. All Rights Reserved. page 274. "EST"). Copyright © 1988. page 639 Enterprise PeopleTools 8. 121 . Base .use the base time zone for converting textdatetime. page 123. Chapter 1. page 637 and Chapter 1." IsDaylightSavings." TimeZoneOffset. page 429. "01/01/1999 3:00 PM") Specify a value for converting textdatetime. assuming the Base time (as defined in PSOPTIONS) was PST. "Using PeopleTools Utilities" ConvertRate Syntax ConvertRate(Rate. page 178.a time zone abbreviation or a field reference to be used for converting textdatetime Local . "PeopleCode Built-in Functions. "PeopleCode Built-in Functions.use the local time zone for converting textdatetime. Returns Returns a datetime value in the base time zone.000000". Oracle and/or its affiliates. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. Chapter 1. &DATETIMEVAL= ConvertDateTimeToBase("01/01/1999 10:00:00AM". Out_Frequency) Description Use the ConvertRate function to convert a rate between various compounding frequencies. Example In the following example.

This parameter takes an array of number. . 1 would represent daily while 7 would represent weekly. The frequency of the rate to be converted from. The values for the second element are: Value Description 0 1 2 3 continuous compounding daily compounding monthly compounding yearly compounding Parameter Description Out_Frequency The frequency of the rate to be converted to. with two elements. The values for the second element are: Value Description 0 1 2 3 continuous compounding daily compounding monthly compounding yearly compounding Returns A number representing the converted rate. Oracle and/or its affiliates. 1 would represent daily while 7 would represent weekly.) The second element is the unit of measure of frequency.PeopleCode Built-in Functions Chapter 1 Parameters Parameter Description Rate In_Frequency The rate to be converted. The first element is periodicity. Example The following example converts the specified values from days to years. with two elements. This parameter takes a number value. All Rights Reserved. The first element is periodicity. if you chose daily compounding. (for example. (for example.) The second element is the unit of measure of frequency. 122 Copyright © 1988. 2009. This parameter takes an array of number. if you chose daily compounding.

See Also Chapter 1. Base . taking into account daylight savings time. 0). &Out[1] = 1. "3:00 PM") Specify a value for converting textdatetime. 2009. ConvertTimeToBase does this conversion. 123 .use the local time zone for converting textdatetime. &NewRate.. /* compound_years */ &NewRate = ConvertRate(&rate. Oracle and/or its affiliates. Description Use the ConvertTimeToBase function to convert the text value texttime to a Time value and converts it to the base time. /* one year */ &Out[2] = 3.Chapter 1 PeopleCode Built-in Functions Local array of number &In.use the base time zone for converting textdatetime. &In = CreateArray(0. "PeopleCode Built-in Functions. &In." RoundCurrency.g. there is a deadline for completing Federal Funds transfers by 3:00 PM Eastern Time. Copyright © 1988. Values are: • • • timezone . Parameters Parameter Description texttime timezone | Local | Base Specify a time value represented as text (e. &rate = 0. /* daily */ &In[2] = 1. The date used to calculate whether daylight savings time is in effect is the current date. &Out. This function automatically calculates whether daylight savings time is in effect for the given texttime. 0).a time zone abbreviation or a field reference to be used for converting textdatetime Local .01891. The system's base time zone is specified on the PSOPTIONS table.{timezone | "Local" | "Base"}). All Rights Reserved. &Out). /* compound_days */ &Out = CreateArray(0. page 542 ConvertTimeToBase Syntax ConvertTimeToBase(texttime. For example. This function is useful for users to convert constant times in specific time zones into database time. &In[1] = 1. Local number &rate.

. 2009. All Rights Reserved. page 639 Enterprise PeopleTools 8." ConvertDatetimeToBase. FTP Server Storage Considerations If your storage destination is a file server. Oracle and/or its affiliates. CopyAttachments looks for the field ATTACHSYSFILENAME in the record that stores the file references. CopyAttachments will only copy the file but will not in any way change its corresponding file reference. &TEXTTIME = ConvertTimeToBase("01/01/99 10:00:00AM". URLDestination will be either of the following: 124 Copyright © 1988. Example In the following example. "PeopleCode Built-in Functions. assuming the Base time (as defined in PSOPTIONS) was PST. Record_Names [. For each specified file that is copied. "PeopleCode Built-in Functions." FormatDateTime. &TIMEVAL would have a time value of "07:00:00. "Using PeopleTools Utilities" CopyAttachments Syntax CopyAttachments(URLSource.000000". "EST"). Chapter 1. See Also Chapter 1. page 429. "PeopleCode Built-in Functions. AllowLargeChunks]]]) Description Use the CopyAttachments function to copy files having specified file references from one storage location to another. "PeopleCode Built-in Functions. Chapter 1. "PeopleCode Builtin Functions. Chapter 1.URLDestination [. page 178. in your record definition. which includes the fields ATTACHSYSFILENAME and ATTACHUSERFILE." IsDaylightSavings. "PeopleCode Built-in Functions." TimeZoneOffset. not just the fields.PeopleCode Built-in Functions Chapter 1 Returns Returns a time value in the base time zone. If the specified subdirectories do not exist this function tries to create them." DateTimeToTimeZone. page 120. Note. Chapter 1. page 637 and Chapter 1. PreserveCase[.50 PeopleBook: System and Server Administration. page 274. Oracle recommends that you include the subrecord FILE_ATTACH_SBR." TimeToTimeZone.

See Enterprise PeopleTools 8.50 PeopleBook: System and Server Administration." Using Attachment Functions.Chapter 1 PeopleCode Built-in Functions • A URL definition.URLname • A string. All Rights Reserved. The default FTP port is 21." Adding Secure FTP (FTPS) URLs. in the form of: protocol://FTP_user_ID:FTP_password@FTP_server_address/path where protocol is "ftp" or "ftps". in the form of: URL. and path is the path on the FTP server relative to the directory specified as the FTP server's root. If the file is transferred using secure FTP (FTPS). Copyright © 1988. See Enterprise PeopleTools 8. URLDestination must be a URL definition.URLname • A string. Oracle and/or its affiliates. Database Storage Considerations If your storage destination is a database table. If you want to use a different port you must specify it in the URL. "Using File Attachments and PeopleCode. 2009. URLDestination will be either of the following: • A URL definition. If the specified subdirectories do not exist this function tries to create them. The following limitations apply to the FTP URL: • • The FTP user name to is limited to 30 characters.peoplesoft. For example: ftp://user:password@ftpserver.50 PeopleBook: PeopleCode Developer's Guide. The FTP password to is limited to 16 characters. in the form of: record://MYRECORD where MYRECORD is the record associated with a storage destination table. FTP_server_address is the FTP server's name or its IP address. 125 .com:6000/ Note. SFTP is not supported. The length of the full URL is limited to 254 characters. "Using PeopleTools Utilities. as part of FTP_server_address. in the form of: URL.

every file at the specified storage location that has some valid corresponding file reference will be copied). or a string. URLDestination must be a URL definition.URLName. Backward slashes ("\") are not supported for this parameter. This parameter can either be a URL name in the form URL. then CopyAttachments should be similarly invoked (with the value of PreserveCase unspecified or explicitly specified as False). if the files to be copied were originally uploaded with the value of the PreserveCase explicitly specified as True. then CopyAttachments should be similarly invoked (with the value of PreserveCase explicitly specified as True). it is possible to explicitly specify which groups of file references will be considered during a call to CopyAttachments and.URLName. 2009. This parameter can either be a URL name in the form URL. further restrict the scope of that call. Record_Names Specify an array of record names each of which is associated with a table containing valid file references. all the records that contain the FILE_ATTACH_SBR subrecord as a field will be considered to have been implicitly specified (that is.50 PeopleBook: System and Server Administration. On the other hand. The source directory specified by a full FTP URL will be taken to be relative to the FTP root directory (which may not be the same as the root directory of the FTP server machine). ." Adding Secure FTP (FTPS) URLs. If you do not specify this parameter.PeopleCode Built-in Functions Chapter 1 Considerations Using PreserveCase with CopyAttachments If the files to be copied were originally uploaded with the value of the PreserveCase optional parameter unspecified or explicitly specified as False. or a string. The destination directory specified by a full FTP URL will be taken to be relative to the FTP root directory (which may not be the same as the root directory of the FTP server machine). and then again with the value of PreserveCase explicitly specified as True. URLDestination Specify the destination storage location for the files to be copied. By using this parameter. All Rights Reserved. URLSource must be a URL definition. "Using PeopleTools Utilities. Oracle and/or its affiliates. 126 Copyright © 1988." Adding Secure FTP (FTPS) URLs. See Enterprise PeopleTools 8. once with the value of PreserveCase unspecified or explicitly specified as False. Parameters Parameter Description URLSource Specify the source storage location of the files to be copied. The URLSource parameter requires forward slashes ("/"). If the file is transferred using secure FTP (FTPS). See Enterprise PeopleTools 8. If the files to be copied fall into both categories. The URLDestination parameter requires forward slashes ("/").50 PeopleBook: System and Server Administration. Backward slashes ("\") are not supported for this parameter. "Using PeopleTools Utilities. in this way. If the file is transferred using secure FTP (FTPS). then CopyAttachment will need to be run twice .

All Rights Reserved. The AllowLargeChunks parameter is only applicable to attachments stored in the database. If the value specified in the Maximum Attachment Chunk Size field on the PeopleTools Options page is larger than is allowed for retrieval. so that it is possible for a user to upload a file in chunks that are too large for the system to retrieve. 127 . when searching the source storage locations for the file specified by each file reference and when naming that file at the destination. preserve the case of the filename extension. The default value is False. as those attachments are never chunked. See Enterprise PeopleTools 8.50 PeopleBook: System and Server Administration. If AllowLargeChunks is set to True. "Using PeopleTools Utilities. this behavior can be overridden. If the chunks are too big to be retrieved. 2009. Warning! If you use the PreserveCase parameter. convert the filename extension to all lower case letters. Because CopyAttachments is designed to work with multiple files. False." PeopleTools Options. such as GetAttachment. Numeric Value Constant Value Description 0 %Attachment_Success File was transferred successfully. it is important that you use it in a consistent manner with all the relevant file-processing functions or you may encounter unexpected file-not-found errors. AllowLargeChunks Specify a Boolean value to indicate whether to allow large chunks. Copyright © 1988. It has no impact on FTP attachments. If AllowLargeChunks is set to False the system will use the largest size chunk that is allowed for retrieval. Returns You can check for either an integer or a constant value: Note. will fail.Chapter 1 PeopleCode Built-in Functions Parameter Description PreserveCase Specify a Boolean value to indicate whether. then any file retrieval built-in function. to track errors when using CopyAttachments set your PeopleCode trace to 2112 and your SQL trace to 15 so that errors will be written to the appropriate trace files. This is an optional parameter. its filename extension will be preserved or not. Oracle and/or its affiliates. True. The default value is False. Note. then the system breaks the file upload into the largest sized chunks allowed. Note.

Failed due to non-availability of space on FTP server." AddAttachment. Oracle and/or its affiliates. "PeopleCode Built-in Functions. page 326. page 499 and Chapter 1. ftp://user:passwd@ftpaddress/")." DetachAttachment. Else MessageBox(0.UrlID. "Using File Attachments and PeopleCode. See Also Chapter 1." PutAttachment. Here is another example." ViewAttachment. 2009. "PeopleCode Built-in Functions. Failed to allocate memory due to some internal error. page 191. page 207. "Copy Archive Status". 0. "Copy Archive Status". &aRecs). "PeopleCode Built-in Functions. The following are some possible situations where %Attachment_Failed could be returned: • • • • • • Failed to initialize the process due to some internal error. . Failed due to unexpected/bad reply from server. Chapter 1. &aRecs = CreateArray("HRATTS".PeopleCode Built-in Functions Chapter 1 Numeric Value Constant Value Description 1 %Attachment_Failed File transfer failed due to unspecified error. "CopyAttachmentArchivefailed"). page 37. Failed due to timeout. If (&ret = %Attachment_Success) Then MessageBox(0. "PeopleCode Built-in Functions. Failed to close SSL connection. "CRMATTS"). "MFGATTS". "CopyAttachmentArchive succeeded"). 0. &ret = CopyAttachments("ftp://user:pass@system/HR/". Chapter 1. 0. End-If.50 PeopleBook: PeopleCode Developer's Guide. Chapter 1. All Rights Reserved. "record://HRARCHIVE". Chapter 1. "PeopleCode Built-in Functions. Example &retcode = CopyAttachments(URL. "PeopleCode Built-in Functions." Using File Attachments in Applications 128 Copyright © 1988. page 682 Enterprise PeopleTools 8." GetAttachment." DeleteAttachment. 0.

"Accessing the Data Buffer" Enterprise PeopleTools 8. This function remains for backward compatibility only.level1_recname.50 PeopleBook: PeopleCode Developer's Guide. [RECORD." CopyFieldsTo. 129 . Description Use the CopyFields function to copy like-named fields from a row on the specific source record to a row on the specific target record. ]] RECORD. Note." CopyChangedFieldsTo and Enterprise PeopleTools 8.scrollname.level2_recname. target_recname To prevent ambiguous references. "Record Class.level1_row.50 PeopleBook: PeopleCode API Reference.target_row) that references the first row in the comparison.50 PeopleBook: PeopleCode API Reference. each have the following syntax: level.scrollpath. "Referencing Data in the Component Buffer. "Record Class. you can also use SCROLL.level2_row. See Also Enterprise PeopleTools 8. Oracle and/or its affiliates.scrollpath. "Rowset Class. to Copyright © 1988. 2009. Use the CopyFieldsTo or CopyChangedFieldsTo record class methods instead." CopyTo Enterprise PeopleTools 8. where scrollname is the same as the scroll level's primary record name.to) where from and to are constructions that reference rows of data on specific source and target records in the component buffer. A placeholder for a construction (level.50 PeopleBook: PeopleCode API Reference. Enterprise PeopleTools 8.Chapter 1 PeopleCode Built-in Functions CopyFields Syntax CopyFields(from. scrollpath.50 PeopleBook: PeopleCode Developer's Guide." Specifying Data with References Using Scroll Path Syntax and Dot Notation Parameters Parameter Description from A placeholder for a construction (level. target_row and where scrollpath is: [RECORD. All Rights Reserved. target_row) that references the second row in the comparison.

PeopleCode Built-in Functions Chapter 1 Parameter Description level scrollpath target_row Specifies the scroll level for the target level scroll. A construction that specifies a scroll level in the component buffer. If &RestrictionArray is not specified. RECORD. &ROW. page 98 Enterprise PeopleTools 8. 130 Copyright © 1988. 5 and 7. and they are copied to the elements 3.50 PeopleBook: PeopleCode Developer's Guide. &LOC_ROW). Note. only elements 3. See Also Chapter 1. a complete array copy is done. "PeopleCode Built-in Functions. 5 and 7 in the PeopleCode array are copied to the Java array.PO_RECEIVED_INV. All Rights Reserved.PO_RECV_INV_VW.&PeopleCodeArray [. row &LOC_ROW: CopyFields(1. ." Specifying Data with References Using Scroll Path Syntax and Dot Notation CopyFromJavaArray Syntax CopyFromJavaArray(JavaArray. The optional &RestrictionArray parameter is a PeopleCode array that contains the index elements of the elements to copy. Returns Optionally returns a Boolean value indicating whether the function succeeded. For example if &RestrictionArray contains the indexes 3." CompareLikeFields. "Referencing Data in the Component Buffer. 5 and 7. Example The following example copies fields from PO_RECEIVED_INV (level 1 scroll) from row &ROW to PO_RECV_INV_VW (level 1 scroll). The Java array must be at least the same size as the PeopleCode array. 1. Specifies the row number of each target row on its scroll level. RECORD. This allows you to minimize the copying when you have arrays that don't require a full element by element copy. 2009. Oracle and/or its affiliates. &RestrictionArray]) Description Use the CopyFromJavaArray function to copy the array specified by JavaArray into one-dimensional PeopleCode array &PeopleCodeArray.

Local array of number &selection = CreateArray(1. Copyright © 1988. All Rights Reserved. &Jarray). /* Full copy to a Java array */ CopyToJavaArray(&x. /* Full copy from Java array to PeopleCode array */ Local array of any &y = CreateArrayAny(). &y).Push("First bit").Push(%Date).50 PeopleBook: PeopleCode API Reference. &x. &x. Local JavaObject &Jarray = CreateJavaArray("java. 2009. For example.Push(%Datetime). Example Local array of any &x = CreateArrayAny().Push(1).Push("Final bit"). &y [5] = Null. Specify the name of an already instantiated PeopleCode array that you want to copy the data into. "Java Class" Enterprise PeopleTools 8. 3. &RestrictionArray Returns None.Len).50 PeopleBook: PeopleCode API Reference. See Also Enterprise PeopleTools 8.Object[]". Oracle and/or its affiliates. 5). 131 .Chapter 1 PeopleCode Built-in Functions The array types between the PeopleCode array and the Java array must match the standard type mapping between Java and PeopleCode types. &x. /* make sure it's the right length */ CopyFromJavaArray(&Jarray." PeopleCode and Java Data Types Mapping Parameters Parameter Description JavaArray &PeopleCodeArray Specify the name of the Java array that you want to copy data from. "Java Class.lang. trying to copy a PeopleCode array of Any into a Java array of int will fail because the Any PeopleCode type doesn't map onto the Java int type. &x. &x. This array should be of type number. &x. Specify an already instantiated and populated PeopleCode array that contains the set of elements the copy is restricted to.

page 133 and Chapter 1. Enterprise PeopleTools 8. All Rights Reserved.50 PeopleBook: PeopleCode Developer's Guide. Oracle and/or its affiliates. "Row Class. "Java Class" CopyRow Syntax CopyRow(destination_row." CopyTo.source_row) Description Use the CopyRow function to copy data from one row to another row. .50 PeopleBook: PeopleCode API Reference. "Record Class. Use the CopyTo row class method instead." CopyChangedFieldsTo Enterprise PeopleTools 8. page 145 Enterprise PeopleTools 8. "PeopleCode Builtin Functions. must all be located on the same scroll level. This function remains for backward compatibility only." CopyFieldsTo and Enterprise PeopleTools 8. and the PeopleCode function call. Note. "Record Class.PeopleCode Built-in Functions Chapter 1 See Also Chapter 1.50 PeopleBook: PeopleCode API Reference.50 PeopleBook: PeopleCode API Reference. See Also Enterprise PeopleTools 8.50 PeopleBook: PeopleCode API Reference. "Accessing the Data Buffer" Parameters Parameter Description destination_row source_row Row number of row to which to copy data. 2009. "Array Class" Enterprise PeopleTools 8. "PeopleCode Built-in Functions." CopyToJavaArray. The two rows." CreateJavaArray.50 PeopleBook: PeopleCode API Reference. Row number of row from which to read data. Example This example uses CopyRow to give an inserted row the same values as the previous row: 132 Copyright © 1988. destination_row is the row number to which you want the source _row data values copied.

"Java Class" Enterprise PeopleTools 8. Oracle and/or its affiliates.JavaArray [.50 PeopleBook: PeopleCode API Reference. 2009. &LAST_ROW_NUM = &NEW_ROW_NUM . /* Copy the data from the previous row into the inserted row */ CopyRow(&NEW_ROW_NUM. For example if &RestrictionArray contains the indexes 3. 5 and 7. Specify an already instantiated and populated PeopleCode array that contains the set of elements the copy is restricted to. CopyToJavaArray Syntax CopyToJavaArray(&PeopleCodeArray. The optional &RestrictionArray parameter is a PeopleCode array that contains the index elements of the elements to copy." PeopleCode and Java Data Types Mapping Parameters Parameter Description &PeopleCodeArray Specify an already instantiated and populated one-dimentional PeopleCode array that contains the information you want to copy to a Java array. &LAST_ROW_NUM). For example. 5 and 7. Specify the Java array that you want to copy information into. The array types between the PeopleCode array and the Java array must match the standard type mapping between Java and PeopleCode types.1. &RestrictionArray]) Description Use the CopyToJavaArray function to copy the one-dimensional array specified by &PeopleCodeArray into the Java array JavaArray.Chapter 1 PeopleCode Built-in Functions /* Get the row number of the inserted row and the previous row */ &NEW_ROW_NUM = CurrentRowNumber(). See Also Enterprise PeopleTools 8. "Java Class. a complete array copy is done. This allows you to minimize the copying when you have arrays that don't require a full element by element copy. If &RestrictionArray is not specified. only elements 3. and they are copied to the elements 3. This array should be of type number. JavaArray &RestrictionArray Copyright © 1988. 133 . The Java array must be at least as large as the PeopleCode array. trying to copy a PeopleCode array of Any into a Java array of int will fail because the Any PeopleCode type doesn't map onto the Java int type. 5 and 7 in the PeopleCode array are copied to the Java array.50 PeopleBook: PeopleCode API Reference. All Rights Reserved.

Local array of number &selection = CreateArray(1.Push("First bit"). "PeopleCode Built-in Functions. &x. "PeopleCode Built-in Functions. &x." CreateJavaArray. then shows both copying the full array.Push("Final bit").50 PeopleBook: PeopleCode API Reference. &x. See Also Chapter 1. as well as only copying elements of it. Example The following example creates an array. &x. 3.lang. Local array of any &x = CreateArrayAny().Push(%Date). &Jarray). 134 Copyright © 1988. &x." CopyFromJavaArray. /* Full copy to a Java array */ CopyToJavaArray(&x.Push(1). 5). page 145 Enterprise PeopleTools 8. Oracle and/or its affiliates. 3 and 5 */ CopyToJavaArray(&x. Local JavaObject &Jarray = CreateJavaArray("java.PeopleCode Built-in Functions Chapter 1 Returns None.Len). &Jarray. .Push(%Datetime). All Rights Reserved.Object[]". /* Only copy elements 1. &x. page 130 and Chapter 1. "Java Class" Cos Syntax Cos(angle) Description Use the Cos function to calculate the cosine of the given angle (adjacent / hypotenuse).50 PeopleBook: PeopleCode API Reference. 2009. &selection). "Array Class" Enterprise PeopleTools 8.

" Radians. "PeopleCode Built-in Functions. Adjust your code to provide a valid input value. page 135. If the input value is 0. Chapter 1. the reciprocal of the tangent). "PeopleCode Built-in Functions." Acos. Returns A real number between -1. Copyright © 1988. Chapter 1. Chapter 1. "PeopleCode Built-in Functions. you receive an error message at runtime ("Decimal arithmetic error occurred. Oracle and/or its affiliates. Chapter 1.00 and 1. "PeopleCode Built-in Functions." Sin.Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description angle A value in radians. "PeopleCode Built-in Functions. Chapter 1. All Rights Reserved. Parameters Parameter Description angle A value in radians. 135 . Example The following example returns the cosine of an angle measuring 1. page 190. page 60.2). excluding 0. that is. See Also Chapter 1. page 35. Chapter 1." Degrees.00.110)")." Tan. (2." Cot. page 610 and Chapter 1." Asin. page 509. 2009. "PeopleCode Built-in Functions." Atan. page 632 Cot Syntax Cot(angle) Description Use the Cot function to calculate the cotangent of the given angle (adjacent / opposite. page 61.2 radians: &MY_RESULT = Cos(1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions.

Returns A real number. all values of angle such that mod(angle. page 35. and Copy. This function only creates the metadata for the ID. It doesn't load the instance into an analytic server. page 509. In theory. "PeopleCode Built-in Functions. Oracle and/or its affiliates." Atan. the existing analytic instance is deleted and the new one is created.PeopleCode Built-in Functions Chapter 1 Note." Tan." Acos." Asin. Chapter 1. because inputs approaching such values produce results that tend toward infinity. page 61. "PeopleCode Built-in Functions.ForceDelete) Description Use the CreateAnalyticInstance function to create an analytic instance as identified by the analytic ID.&RecordRef. All Rights Reserved. "PeopleCode Built-in Functions. Chapter 1. Chapter 1. 2009. Every analytic type definition is defined with an application package that contains three methods: Create. page 632 CreateAnalyticInstance Syntax CreateAnalyticInstance(AnalyticType. "PeopleCode Built-in Functions.ID. page 60. . page 190. pi) equals 0 are not valid for this function. Example The following example returns the cotangent of an angle measuring 1. The values in &RecordRef are passed to the Create method. "PeopleCode Built-in Functions. If this analytic instance already exists in the system.Descr." Radians." Sin. Chapter 1. Chapter 1. rather than an error. See Also Chapter 1. Chapter 1. page 134. no computer system can represent such values exactly.2 radians: &MY_RESULT = Cot(1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. the analytic instance is not created. 136 Copyright © 1988. however." Degrees. the statement Cot(Radians(180)) produces a number close to the largest value PeopleCode can represent." Cos. page 610 and Chapter 1. Thus. for example. If ID is an empty string.2). the system automatically generates a unique ID. and you specify ForceDelete as false. If you specify ForceDelete as true. In practice. Delete.

50 PeopleBook: PeopleSoft Optimization Framework. If ForceDelete is set to false and the specified ID exists. If you do not want to specify a record. Specify the analytic instance identifier as a string. Specify an already instantiated record object to pass values to the application package Create method that's associated with the analytic type definition." Creating Analytic Type Definitions Copyright © 1988. All Rights Reserved. you can specify NULL. "Test". /* Create a brand new analytic instance */ &pi = CreateAnalyticInstance("BusinessPlanning". the analytic instance is deleted and then recreated. Specify the behavior if the specified analytic ID already exists. This parameter must be 20 characters or less. This parameter takes a boolean value." GetAnalyticInstance. Specify a description for this analytic instance as a string. If ForceDelete is set to true and the specified ID exists. Descr &RecordRef ForceDelete Returns An AnalyticInstance object if successful." Understanding the Analytic Calculation Engine Classes Enterprise PeopleTools 8. "Application Classes" Enterprise PeopleTools 8. "PeopleCode Built-in Functions. null otherwise. 2009. "Analytic Calculation Engine Classes. "Designing Analytic Type Definitions. "PopulateTables".50 PeopleBook: PeopleCode API Reference. True). Oracle and/or its affiliates.50 PeopleBook: PeopleCode API Reference.Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description AnalyticType ID Specify the name of the analytic type definition to be used.⇒ &argrec. 137 . page 324 Enterprise PeopleTools 8. See Also Chapter 1. Example Local AnalyticInstance &pi. this function terminates without creating a new analytic instance.

Local Array of Number &AN. &AAN[1]). and 2. 1. 2). The CreateArray function uses flattening and promotion as required to convert subsequent values into suitable elements of the array. If there is no first parameter an empty array of ANY is built. Oracle and/or its affiliates.. if the first parameter is of type NUMBER. &AN = CreateArray(6. &AN is a one-dimensional array with 3 elements: 6. 138 Copyright © 1988. Example Local Array of Array of Number &AAN. A one-dimensional array with 3 and 4. 4). The last parameter to Array was promoted to a one-dimensional array. param2] . A one-dimensional array with only the element 5. Description Use the CreateArray function to construct an array and returns a reference to it. The last parameter to Array in the last line was flattened into its two elements.. Parameters Parameter Description paramlist Specify a list of values to be used as the elements of the array. The type of the first parameter determines the type of array that is built. 2009. Returns Returns a reference to the array. 5). That is. &AAN = CreateArray(CreateArray(1. CreateArray(3. . All Rights Reserved. an array of number is built.PeopleCode Built-in Functions Chapter 1 CreateArray Syntax CreateArray(paramlist) Where paramlist is an arbitrary-length list of values in the form: param1 [. &AAN is a two dimensional array with three elements: • • • A one-dimensional array with 1 and 2 as elements.

The CreateArrayAny function uses flattening and promotion as required to convert subsequent values into suitable elements of the array. If you do not specify any parameters with CreateArrayAny. Description Use the CreateArrayAny function to construct an array whose elements are of data type ANY and returns a reference to it." CreateArrayRept. Oracle and/or its affiliates." Using Flattening and Promotion CreateArrayAny Syntax CreateArrayAny([paramlist]) Where paramlist is an arbitrary-length list of values in the form: param1 [. it's the same as using the CreateArray function without any parameters. page 613 Enterprise PeopleTools 8. "hi".50 PeopleBook: PeopleCode API Reference. "PeopleCode Built-in Functions.. param2] . 139 . 2. "there").50 PeopleBook: PeopleCode API Reference. All Rights Reserved." Split.. "Array Class. Copyright © 1988. "Array Class" Enterprise PeopleTools 8.Chapter 1 PeopleCode Built-in Functions See Also Chapter 1. page 140 and Chapter 1. If you do not know how many values are needed in a SQL statement until runtime. Parameters Parameter Description paramlist Specify a list of values to be used as the elements of the array. "PeopleCode Built-in Functions. you can use an array of any to supply the values. 2009. Example local Array of Any &ArrayAny = CreateArrayAny(1. Returns Returns a reference to an array of ANY.

page 613 Enterprise PeopleTools 8. The last parameter to the array was promoted to a one-dimensional array. "PeopleCode Built-in Functions. page 140. Parameters Parameter Description val A value of any type.50 PeopleBook: PeopleCode API Reference. Oracle and/or its affiliates.Clone(). 2.50 PeopleBook: PeopleCode API Reference." CreateArray. "PeopleCode Built-in Functions. "Array Class" Enterprise PeopleTools 8. That is. CreateArray⇒ Any("hi"). the created array has one higher dimension. using the val parameter for the type. . and a one-dimensional array with only the element "there". &ArrayAny is a two dimensional array with four elements: 1. use the Clone method. an array of number is built." CreateArrayRept. If count is zero. "there"). page 138 and Chapter 1. All the elements have the data type Any. To make the subarrays distinct. if the first parameter is of type NUMBER. &AAAny is a two-dimensional array with three elements: a one-dimensional array with 1 and 2 as elements. All Rights Reserved. Chapter 1. See Also Chapter 1." Using Flattening and Promotion Enterprise PeopleTools 8. "SQL Class" CreateArrayRept Syntax CreateArrayRept(val. 4). If val is itself an array. and each element (sub-array) is the array reference val. 2). For example: &A = CreateArrayRept(&AN. count) Description Use the CreateArrayRept function to create an array that contains count copies of val. 2009. If you are making an array that is multi-dimensional. a one-dimensional array with "hi" as its element. "Array Class. CreateArrayRept creates an empty array. 140 Copyright © 1988. val will be the subarray used as the elements. "hi" and "there"." Split.PeopleCode Built-in Functions Chapter 1 local Array of Array of Any &AAAny = CreateArray(CreateArrayAny(1. The type of the first parameter (val) determines the type of array that is built.50 PeopleBook: PeopleCode API Reference. "PeopleCode Built-in Functions.

0).Chapter 1 PeopleCode Built-in Functions Parameter Description count The number of copies of val contained in the array. 10). and changing the value of an element in one of them changes it in both of them. &Dim2)).Push(CreateArrayRept("". Local array of array of string &ValueArray. For &I = 1 To &Dim1 &ValueArray. In addition. with two subarrays: &AAS = CreateArrayRept(CreateArray("one". page 138 and Chapter 1. both elements (rows) of &AAS contain the same subarray. The following code sets &A to a new array of ten zeroes: &A = CreateArrayRept(0. 2). End-For." Clone Copyright © 1988. 2009.50 PeopleBook: PeopleCode API Reference. Note that in this case. Oracle and/or its affiliates. 141 .50 PeopleBook: PeopleCode API Reference. "PeopleCode Built-in Functions. &Dim2 = 5. See Also Chapter 1. 2). 0). "Array Class. To get distinct subarrays. "two"). page 613 Enterprise PeopleTools 8." CreateArray. All Rights Reserved. it shows how to randomly assigns values to the cells in a two-dimension array. &ValueArray[1][1] = "V11"." Split. &ValueArray[2][1] = "V21". The following code sets &AAS to a new array of array of strings. "Array Class" Enterprise PeopleTools 8. Returns Returns a reference to the array. WinMessage("&ValueArray[1][1] = " | &ValueArray[1][1] | " " | "&ValueArray[2][1] =⇒ " | &ValueArray[2][1]. &Dim1 = 10. "two"). "PeopleCode Built-in Functions. Example The following code sets &A to a new empty array of string: &A = CreateArrayRept("". The following example shows how to create a two-dimension array using CreateArrayRept and Push. use the Clone method: &AAS = CreateArrayRept(CreateArray("one".Clone(). 0). &ValueArray = CreateArrayRept(CreateArrayRept("". 0).

depending on whether the machine where the code is running is an application server or not. This means if the first environmental variable in order is found. in a particular order. If the code is running on an application server. you must set it yourself.PeopleCode Built-in Functions Chapter 1 CreateDirectory Syntax CreateDirectory(path. Your system security should verify if a user has the correct permissions before allowing access to a drive (for example. the following environmental variables are valid. read-write-execute permission for the owner. is used. To use this environmental variable. and are searched for in the following order: 1. PS_FILEDIR[\relative_path] 2. and are searched for in the following order: 1. 2009. All Rights Reserved. and so on. that is the one that's used. PS_FILEDIR[\relative_path] 2. while group and other have only read and execute permission. pathtype]) Description Use the CreateDirectory function to create the directory specified by path and any non-existent directories specified in path. Note. On UNIX systems. the directory has the mode 755. if the variable exists. The environmental variables that get used are different. PS_SERVDIR\Files[\relative_path] 3. [. if a user changes their TEMP environmental variable to a network drive they don't normally have access to. PS_SERVDIR\Files[\relative_path] If the code is not running on an application server. that is. your system security should detect this. and if found. the next one is searched for. drwxr-xr-x Working with Relative Paths If you specify a relative path. . the following environmental variables are valid. TEMP[\relative_path] The PS_FILEDIR environmental variable is not initialized and set to a path automatically. If it isn't found.) 142 Copyright © 1988. Oracle and/or its affiliates. that path is appended to the path specified by an environmental variable.

"PeopleCode Built-in Functions. The syntax of the path only depends on the platform where your PeopleCode is executing." PutAttachment. UNIX "/" separators are converted to "\". page 326. Example CreateDirectory("D:\Resumes\New_Hires". "PeopleCode Built-in Functions. Oracle and/or its affiliates. You can't use any wildcards when specifying a path." GetAttachment. See Also Chapter 1. Chapter 1. "PeopleCode Built-in Functions.message_num. "PeopleCode Built-in Functions.50 PeopleBook: PeopleCode API Reference.subslist]) Copyright © 1988. %FilePath_Absolute). page 265. page 521 Enterprise PeopleTools 8.default_txt [. "PeopleCode Built-in Functions. On a WIN32 system.Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description path pathtype Specify the path to be created." FileExists. WIN32 "\" separators are converted to "/". page 270. 143 . and on a UNIX system. "PeopleCode Built-in Functions. Chapter 1. Chapter 1." RemoveDirectory. Returns None. You must specify a drive letter and the complete path. Note." GetFile. The PeopleCode runtime automatically converts platform-specific separator characters to the appropriate form for where your PeopleCode program is executing. If pathtype is an absolute path. 2009. All Rights Reserved. page 341." FindFiles. Chapter 1. whatever path you specify is used verbatim. "File Class" CreateException Syntax CreateException(message_set. page 499 and Chapter 1. Specify whether the path is an absolute or relative path. The values for this parameter are: • • %FilePath_Relative (default) %FilePath_Absolute If you don't specify pathtype the default is %FilePath_Relative.

Specify the text you want associated with the exception if the message specified by message_set and message_num isn't found. substitution2]. You can use this in your exception handling. NULL otherwise. Example Function t2 throw CreateException(2.⇒ "SomeClass". the number of substitutions in the list is arbitrary. message_num default_txt subslist Returns A reference to an exception object if successful.PeopleCode Built-in Functions Chapter 1 where subslist is an arbitrary-length list of substitutions of undetermined (Any) data type to be substituted in the resulting text string. See Also Enterprise PeopleTools 8. 160. All Rights Reserved. The number of substitutions specified with this parameter are what get counted with the exception class SubsitutionCount property. Oracle and/or its affiliates. . A comma-separated list of substitutions. Description Use the CreateException function to create an exception object with the given properties. End-Function. Use this function either in conjunction with the Throw statement. 2009. "Exception Class" 144 Copyright © 1988. Specify the message number of the message you want associated with this exception. in the form: substitution1 [.50 PeopleBook: PeopleCode API Reference. Parameters Parameter Description message_set Specify the message set number of the message you want associated with this exception. "'%1' doesn't support property or method '%2'". . or on its own to get more information of a message. The substitutions are referenced in the message text using the % character followed by an integer corresponding to the position of the substitution in the subslist. . "SomeMethod").

NumberOfElements) Description Use the CreateJavaArray function to create a Java array without knowing the number or value of the elements. This parameter takes a number value. This parameter takes a string value. All Rights Reserved. page 352 Enterprise PeopleTools 8. Specify the number of elements in the array. PeopleCode arrays start at 1." GetJavaClass. but you want to use a Java array. "Java Class" Copyright © 1988. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. The first index in a Java array is 0." CreateJavaObject. and you can pass in the number of elements that are to be in the array. 145 .Chapter 1 PeopleCode Built-in Functions CreateJavaArray Syntax CreateJavaArray(ElementClassName[]. Parameters Parameter Description ElementClassName[] NumberOfElements Specify the array class name. page 146 and Chapter 1. use the CreateJavaArray function in PeopleCode. you already know the number of elements in the array.50 PeopleBook: PeopleCode API Reference. This creates a Java object that is a Java array. 2009. Returns A Java object See Also Chapter 1. When you create an array in Java. If you do not know the number of elements in the array. Do the following to specify this type of array in Java: new ElementClassName[NumberOfElements]. Oracle and/or its affiliates.

"Java Class. 3. 1. In Java. Oracle and/or its affiliates. 5. . The PeopleCode API Reference provides details on where you can place custom and third-party Java classes.PeopleCode Built-in Functions Chapter 1 CreateJavaObject Syntax CreateJavaObject(ClassName [ConstructorParams]) Where ConstructorParams has the form argument1 [. Parameters Parameter Description ClassName ConstructorParams Specify the name of an already existing class. use the CreateJavaArray function. 3. Constructors are matched by construction parameter type and placement. . Description Use the CreateJavaObject function to create a Java object that can be manipulated in PeopleCode. Specify any construction parameters required for the class. it can be located in a directory specified in the PS_CLASSPATH environment variable or in other specified locations. 8. Note. Use the CreateJavaObject function to create a Java array when you know how many values it should contain. 146 Copyright © 1988. 13)." System Setup for Java Classes. argument2] . 2009. To initialize a Java array without knowing the number of parameters until runtime. 5. Do the following to initialize such a Java array from PeopleCode: &IntArray = CreateJavaObject("int[]". All Rights Reserved. Returns A Java object. 8. 2. See Enterprise PeopleTools 8. . If you create a class that you want to call using GetJavaClass. 2. do the following to initialize an array: intArray = new int[]{1.50 PeopleBook: PeopleCode API Reference. If ClassName is the name of an array class (ending with [ ]). 13}. ConstructorParams are used to initialize the array.

Value.50 PeopleBook: PeopleCode API Reference. 2009. Oracle and/or its affiliates. "PeopleCode Built-in Functions.Value. See Also Chapter 1." System Setup for Java Classes Enterprise PeopleTools 8.GetField(&java_newdate). All Rights Reserved. page 352 Enterprise PeopleTools 8. &NUMBER.Value = CreateJavaObject(&java_path). Specify which network to use for instant messaging. Parameters Parameter Description UserID Specify the PeopleSoft user as a string. "Java Class" CreateMCFIMInfo Syntax CreateMCFIMInfo(UserID.GetField(&java_newnum). 147 ." GetJavaClass. This is used to initiate the instant messaging session. "Java Class. &CHARACTER.Value. page 145 and Chapter 1. &DATE.Chapter 1 PeopleCode Built-in Functions Example The following is an example of using dot notation and CreateJavaObject. The values are: NetworkID • • AOL Yahoo Returns An MCFIMInfo object if successful. This is the source user.50 PeopleBook: PeopleCode API Reference. or the user issuing the presence requests.Value = CreateJavaObject(&java_path).Network) Description Use the CreateMCFIMInfo function to create an instance of the MCFIMInfo class.GetField(&java_newchar).Value = CreateJavaObject(&java_path). Copyright © 1988. a null value otherwise. "PeopleCode Built-in Functions." CreateJavaArray.

) or are dynamically generated at other times (Size. If CreateMessage is called from a PeopleSoft Application Engine program. If the message is being published from a component. 2009. Valid values are: message_type Value Description %IntBroker_Request %IntBroker_Response %IntBroker_Fault A request message. A response message. "MCFIMInfo Class" CreateMessage Syntax CreateMessage(OPERATION. CreateMessage also sets the LANGUAGE_CD field in the level 0 PSCAMA record for a message based on the USERID default language group. EditError.messagename Specify the name of the message definition you want to create a message object for. A fault message. and so on. message_type]) Description Use the CreateMessage function to instantiate a message object that refers to a message definition associated with a service operation.) For rowset-based messages. Parameters Parameter Description OPERATION.messagename [. Oracle and/or its affiliates. All Rights Reserved.50 PeopleBook: PeopleCode API Reference. based on the values set for the message definition: • • • Name QueueName Active Other properties are set when the message is published or subscribed to (TransactionID and so on. the language code of the user who started the batch process is used. The CreateMessage function sets the following properties for the resulting message object. the language code is set to the USERID language code for the component. . This is the default. 148 Copyright © 1988. Specify the type of message that you want to create.PeopleCode Built-in Functions Chapter 1 See Also Enterprise PeopleTools 8.

Example The following example creates a request message &MSG assocaited with the service operation PURCHASE_ORDER. "PeopleCode Built-in Functions. page 377 and Chapter 1. You must specify a fully-qualified class name. use the create_par parameters to supply them.50 PeopleBook: PeopleCode API Reference. the class name is case-sensitive. 2009." GetSubContractInstance. a PeopleCode built-in object (like a chart). "PeopleCode Built-in Functions.PURCHASE_ORDER). or an OLE Automation object. 149 ." GetPubContractInstance. In addition. If the class you are creating requires values to be passed. You can use this function to access an Application Class. . . or use the CreateObjectArray function.) Where str_class_name either: —identifies a class by class name —identifies a class of OLE Automation object in the form: app_name. page 356. All Rights Reserved. page 393 Enterprise PeopleTools 8. See Also Chapter 1. create_par. You would want to do this when you were programming at a high-level. Chapter 1. when you might not know the name of the class you wanted to access until runtime. Considerations Using Application Classes You can use the CreateObject function to access an Application Class. "Message Classes" CreateObject Syntax CreateObject(str_class_name.Chapter 1 PeopleCode Built-in Functions Returns Returns a reference to a message object." GetMessage.object_name Description Use the CreateObject function to return an instance of a class. &MSG = CreateMessage(OPERATION. Oracle and/or its affiliates. Local message &MSG. Copyright © 1988. . "PeopleCode Built-in Functions.

Note. &WORKSHEET = CreateObject("Excel.PeopleCode Built-in Functions Chapter 1 The returned object has the type of class you specified. If an object has registered itself as a single-instance object. a spreadsheet application may provide an application object. and a toolbar object. For example. 150 Copyright © 1988. Any application that supports OLE Automation exposes at least one type of object. Specify the parameters required by the class for instantiating the object. you can reference it using the object variable. you access properties and methods of the new object using the ObjectGetProperty. In the previous example. Oracle and/or its affiliates. To create an OLE Automation object. which consists of: app_name (the name of the application providing the object) and object_type (the class or type of the object to create). The only way to instantiate a crypt object is using the CreateObject function. the scope and lifetime of the global is the same as the scope and lifetime of the instance of PeopleTools in which the object was created. Note. All Rights Reserved. to generate a PeopleSoft chart object without using a chart control (that is. a worksheet object. and ObjectDoMethod functions. The returned object has the type of class you specified. separated by a period (dot). After an object is created. ObjectSetProperty. you assign the object returned by CreateObject to a variable of type Object: local object &WORKSHEET. . 2009. The str_class_name argument uses the syntax app_name. only one instance of the object can be created. Considerations Using PeopleCode Built-in Objects For example.object_type. Considerations Using OLE Automation Objects CreateObject returns an instance of an OLE Automation object as a variable of type Object. without using the GetChart function) you could use: &MyChart = CreateObject("Chart"). even if CreateObject is executed more than once. Parameters Parameter Description str_class_name create_par Specify the name of the class that you want to instantiate an object from.Sheet"). Note also that an object assigned to a global variable is not valid across processes: that is.

XLT"). "Visible". &mbobj = CreateObject(&ClassName).Width = 400. %Response. and displays its name. &oChart.HasLegend = True.Chapter 1 PeopleCode Built-in Functions Example This example instantiates an Excel worksheet object. &oChart.SetDataSeries(QE_CHART_RECORD. makes it visible.Application object.Height = 300. &oChart. &oRowset = CreateRowset(Record. "C:\TEMP\TEST1. This following example illustrates the creation of an application class object.Write("<HTML><IMG SRC=").SetDataXAxis(QE_CHART_RECORD. &oChart. string &sURL. Note the use of ObjectGetProperty in the example to return the Excel. Rowset &oRowset.QE_CHART_RECORD). "C:\TEMP\INVOICE. Oracle and/or its affiliates. &WORKAPP = CreateObject("COM".XLS"). %Response. string &sMap. local MyBaseClass &mbobj. %Response.QE_CHART_PRODUCT). ObjectSetProperty(&WORKAPP. names it. "Workbooks"). &oChart. &oChart. local String &ClassName = "MySubclass1". End-Function. "Save". All Rights Reserved. &oRowset. &oChart. Function IScript_GetChartURL() Local Local Local Local Chart &oChart. 2009. end-if.GetChartURL(&oChart).QE_CHART_REGION). saves it. using the CreateObject function to generate a reference to a chart object. This code assumes that MyBaseClass is the superclass of both MySubclass1 and MySubclass2 classes. 151 .Application"). "Add". &sMap = &oChart.Write(" USEMAP=#THEMAP></IMG><MAP NAME=THEMAP>").Write(&sMap). ObjectDoMethod(&WORKBOOKS. The following example creates a chart in an iScript.SetDataYAxis(QE_CHART_RECORD. %Response.Write(&sURL).SetData(&oRowset). "Excel.LegendPosition = %ChartLegend_Right.Sheet.Write("</MAP></HTML>"). &sURL = %Response. /* This associates the⇒ INVOICE template w/the workbook */ ObjectDoMethod(&WORKAPP. "MIDWEST"). True). Copyright © 1988. &WORKBOOKS = ObjectGetProperty(&WORKAPP.Fill("where QE_CHART_REGION= :1". %Response. if &test then &ClassName = "MySubclass2". &oChart. &oChart = CreateObject("Chart").ImageMap.QE_CHART_SALES).

152 Copyright © 1988." ObjectDoMethodArray. page 485 Enterprise PeopleTools 8. or if you know how many parameters are required. You cannot pass in field references. you cannot pass in an array of array of Any. page 484. Oracle and/or its affiliates.PeopleCode Built-in Functions Chapter 1 See Also Chapter 1. Specify an Array of Any containing all parameters for creating an instance of the class. It must be a one-dimensional array. "Internet Script Classes (iScript)" Enterprise PeopleTools 8. "Using Methods and Built-In Functions. you cannot pass in references of the form: RECORD. If you can create the object without passing in additional values. "Charting Classes" Enterprise PeopleTools 8. All Rights Reserved.FIELDNAME If you do not want to supply any parameters.50 PeopleBook: PeopleCode Developer's Guide. use the CreateObject function instead. Returns A reference to newly created object. page 152 and Chapter 1. The array of parameters is an array of Any." ObjectGetProperty." ObjectDoMethod. Use this function when you must pass in parameters to create the object and you don't know when you write the code how many parameters are required. 2009. "PeopleCode Built-in Functions. Chapter 1. Chapter 1. Parameters Parameter Description Class_Name Array_Of_Args Specify the name of the class you want to create an instance of. that is. as a string. that is. "PeopleCode Built-in Functions. or a reference to a Null array. "PeopleCode Built-in Functions.50 PeopleBook: PeopleCode API Reference. page 488. you can use an empty array.Array_of_Args) Description Use the CreateObjectArray function to return an instance of a class. Chapter 1." ObjectSetProperty." Using OLE Functions CreateObjectArray Syntax CreateObjectArray(Class_Name.50 PeopleBook: PeopleCode API Reference. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." CreateObjectArray. . page 486.

"PeopleCode Built-in Functions." ObjectDoMethod. page 486. &Params). Oracle and/or its affiliates. "Using Methods and Built-In Functions. "Array Class" Enterprise PeopleTools 8. &RecName. &ClassName. */ local MyPackage:BaseClass &Obj = CreateObjectArray(&ClassName.ProcessName]) Description Use the CreateProcessRequest function to create a ProcessRequest object.⇒ &RecName). local Record &Rec = CreateRecord(@ ("RECORD. page 485 Enterprise PeopleTools 8. */ SQLExec("SELECT CLASSNAME." ObjectDoMethodArray. &Rec." CreateObject. SQLExec("%SelectAll(:1)". depending on data in the database. page 149. After you've created this object.50 PeopleBook: PeopleCode API Reference." ObjectSetProperty." | &RecName)).CLASSDATA)".Chapter 1 PeopleCode Built-in Functions Example The following is an example of the creation of an Application Class object where the number of parameters used to create the object varies. 2009. local String &ClassName. Chapter 1." ObjectGetProperty. the ProcessRequest object contains all the items of the job. "PeopleCode Built-in Functions." Using OLE Functions CreateProcessRequest Syntax CreateProcessRequest([ProcessType. "PeopleCode Built-in Functions.50 PeopleBook: PeopleCode Developer's Guide. "PeopleCode Built-in Functions. RECNAME FROM %TABLE(RECORD. Copyright © 1988. local Record &Rec. page 488 and Chapter 1. */ local Array of Any &Params = CreateArrayAny(). 153 . See Also Chapter 1. Chapter 1. Chapter 1. /* Read the parameters from the database. /* Create the object. If you specify PSJob for the process type. "PeopleCode Built-in Functions. you can assign values to its properties then use the Schedule method to submit the process request for scheduling. &Params). page 484. /* Read class name and parameter record name from the database. All Rights Reserved.

No data associated with the record definition's SQL table is brought in: only the record definition. &MyJobName). Specify the name of the process as a string.PeopleCode Built-in Functions Chapter 1 Parameters Parameter Description ProcessType Specify the process type as a string. ProcessName Returns A reference to a ProcessRequest object.50 PeopleBook: PeopleCode API Reference. Default processing is not performed.50 PeopleBook: PeopleCode API Reference. The record and field objects are automatically deleted when there are no remaining references to them stored in any variables. All Rights Reserved. See Also Enterprise PeopleTools 8. "ProcessRequest Class." Schedule CreateRecord Syntax CreateRecord(RECORD. The fields created by this function are initialized to null values. Values depend on the process types defined for your system. the record does not have to be included on the current page. 154 Copyright © 1988. if you are calling this function from PeopleCode associated with a page. Example Local ProcessRequest &MYRQST. "ProcessRequest Class" Enterprise PeopleTools 8. They can be used with any of the record and field object methods and properties. The record and field objects created by this function are accessible only within PeopleCode. 2009. it must have a record definition. However. The specified record must have been defined previously. Oracle and/or its affiliates.recname) Description Use the CreateRecord function to create a standalone record definition and its component set of field objects. . that is. &MYRQST = CreateProcessRequest("PSJOB".

&DST.PSBATREPREQRES). The following code creates a corresponding record object: &RECNAME = "RECORD. &PSBATREPREQRES. The following example uses SQLExec to select into a record object. You can also select into it using the SQLExec function. Parameters Parameter Description RECORD. Oracle and/or its affiliates.PubNodeName.CHNLNAME. To create a PeopleCode record object for a record whose name is unknown when the PeopleCode is written.ChannelName.Pubid. 2009. &PSBATREPREQRES. &DST = CreateRecord(RECORD. &PUBHDR = CreateRecord(RECORD.OPC_METH).DST_CODE_TBL). All Rights Reserved. do the following.recname Specify a record definition that already exists. &DST.Value = &BATREPID.MSGNAME.Value = &MSG.PSAPMSGPUBHDR). Values are assigned to the fields associated with the record.CopyFieldsTo(&PUBHDR).Value = GetSetId(FIELD. RECORD. &REC2 = CreateRecord(RECORD. SQLExec("%SelectByKeyEffDt(:1.PUBNODE.Value = &MSG. %Date." | Upper(&RECNAME). and the values from the first record are used to populate the second record.Value = &MSG.Value = &MSG.:2)". Returns This function returns a record object that references a new record buffer and set of fields. &REC = CreateRecord(@ &RECNAME). 155 .DST_ID.Name. Example Local Record &REC2. Suppose a record name is in the PeopleCode variable &RECNAME. a free-standing record is created (&PSBATREPREQRES).BUSINESS_UNIT. &PSBATREPREQRES. Local Record &DST.PUBID. Use the @ operator to convert the string to a component name.BATREPID.SETID. &PSBATREPREQRES.Value = DST_ID_AR.⇒ ""). &PSBATREPREQRES. Then a second record is created (&PUBHDR). &DST). &PSBATREPREQRES = CreateRecord(RECORD.DST_CODE_TYPE. DRAFT_BU. based on the effective date.Chapter 1 PeopleCode Built-in Functions You can select into a record object created this way using the SelectByKey record class method. In the following example. /* do further processing using record methods and properties */ Copyright © 1988. &DST. &PSBATREPREQRES.

but is not tied to any data (that is. you create a rowset containing one row. Oracle and/or its affiliates. page 380 and Chapter 1. "Accessing the Data Buffer" CreateRowset Syntax CreateRowset({RECORD. it's used as the primary level 0 record.RECORD. .50 PeopleBook: PeopleCode Developer's Guide. Use Fill or FillAppend instead. If you specify a record as the first parameter." GetRecord. page 340 Enterprise PeopleTools 8." GetField. You should not use the rowset Select or SelectNew methods for populating rowsets created using CreateRowset.recname | &Rowset}] . . Restrictions on Using CreateRowset The following methods and properties don't work with a rowset created using CreateRowset: • • Select SelectNew 156 Copyright © 1988. and so on. When you fill it with data.) Description Use the CreateRowset function to create an unpopulated. It will not contain any data.) The first parameter determines the structure of the rowset to be created. you are creating a new rowset based on the structure of the specified rowset object. 2009.) In addition. standalone rowset.PeopleCode Built-in Functions Chapter 1 See Also Chapter 1. All Rights Reserved. Note. If you don't specify any other parameters. a standalone rowset isn't tied to the Component Processor.recname | &Rowset} [.fieldname.50 PeopleBook: PeopleCode API Reference. including any child rowsets. FieldDefault. To populate this type of rowset with data. If you want to populate this type of rowset with data. you should only use: • • • the Fill or FillAppend rowset class methods a record method (SelectByKey) the SQLExec function If you specify a rowset object. A standalone rowset is a rowset that has the specified structure. no PeopleCode runs (like RowInsert. to the component buffer or to a message. use the CopyTo method or a SQL statement. with one unpopulated record. . "PeopleCode Built-in Functions. {FIELD. "Record Class" Enterprise PeopleTools 8. "PeopleCode Built-in Functions.

RECORD. Example The following creates a simple rowset of just a single record per row: &RS = CreateRowset(RECORD. The following example reads all of the QA_MYRECORD records into a rowset. Parameters Parameter Description RECORD. 157 .QA_MYRECORD). This must be an existing rowset object.fieldname. standalone rowset object. &RS = CreateRowset(RECORD. QA_INVEST_HDR QA_INVEST_LN QA_INVEST_TRANS QA_INVEST_DTL Note that you have to start at the bottom of the hierarchy. This means if you insert or delete rows. The following code creates a rowset structure composed of four records in an hierarchical structure. recname | &Rowset Specify either a record name or an existing rowset object.recname refers to the related display record.QA_INVEST_DTL). you are adding a child rowset object to the newly created rowset. &RS2).Fill(). &RS2. rowsets created using CreateRowset are not automatically tied to the database. &RS_FINAL. Copyright © 1988. 2009. &RS2 = CreateRowset(RECORD. EffSeq. &RS_FINAL = CreateRowset(RECORD.recname | &Rowset FIELD. Returns An unpopulated. The following creates a rowset with the same structure as the specified rowset: &RS2 = CreateRowset(&RS). (not the related display field) while RECORD. the rows will not be inserted or deleted in the database when you save the page. Oracle and/or its affiliates. If you specify &rowset.QA_MYRECORD).fieldname refers to the controlling field.QA_INVEST_TRANS. &RS2 = CreateRowset(RECORD.Chapter 1 PeopleCode Built-in Functions • • Any GUI methods (like HideAllRows) Any effective date methods or properties (like EffDt. or GetCurrEffRow) In addition. &RS). Local Rowset &RS.RECORD. not the other way around.QA_INVEST_LN. &RS2). &NUM_READ = &RS.recname to specify a related display record. FIELD. and add the upper levels. All Rights Reserved.fieldname. that is.QA_INVEST_HDR. Use FIELD. and returns the number of rows read: &RS = CreateRowset(RECORD.

PeopleCode Built-in Functions Chapter 1 To make a clone of an existing rowset. &rsBOCMRel). &RS. &rsBOCMUse. page 380 and Chapter 1. Record. &rsBOCMUse = CreateRowset(Record.Name Description 158 Copyright © 1988." GetLevel0. .BO_CM_USE). Chapter 1.BO_CM_REL). "PeopleCode Built-in Functions." GetRecord. Specify a description of the RowsetCache as a string. If you just specify name. 2009.Description) Description Use the CreateRowsetCache function to create a new RowsetCache object with the given name if it doesn't already exist. "Using Methods and Built-In Functions. The following code example is used for creating multiple children in a standalone rowset: Local Rowset &rsBOCMRole." GetRowset. &rsBOCMRel. Chapter 1. Parameters Parameter Description &Rowset Specify an already instantiated and populated rowset that you want to use for creating a RowsetCache object." GetField. "PeopleCode Built-in Functions. &rsBOCMRel = CreateRowset(Record. &rsBOCMRole = CreateRowset(Record. "PeopleCode Built-in Functions. page 340 Enterprise PeopleTools 8. Oracle and/or its affiliates.BO_CM. See Also Chapter 1. you must enclose the name in quotation marks. to make two distinct copies." Using Standalone Rowsets CreateRowsetCache Syntax CreateRowsetCache(&Rowset. Specify the name of the created RowsetCache object. &rsBOCM = CreateRowset(Record. All Rights Reserved. [Rowset. you can do the following: &RS2 = CreateRowset(&RS).50 PeopleBook: PeopleCode Developer's Guide.]Name. &rsBOCMUse. page 353. "PeopleCode Built-in Functions. The RowsetCache object will have the same format and data as &Rowset.BO_CM_ROLE). that is.CopyTo(&RS2). &rsBOCMRole. page 384.

Fill(). page 385 Enterprise PeopleTools 8.Chapter 1 PeopleCode Built-in Functions Returns A reference to the new RowsetCache object if there is not already a RowsetCache object of the given name. All Rights Reserved. &Cache = CreateRowsetCache(&RS. "PeopleCode Built-in Functions. Returns A reference to a SOAPDoc object. Oracle and/or its affiliates. Then use the SOAPDoc class methods and properties. See Also Chapter 1. "RowsetCache Class" CreateSOAPDoc Syntax CreateSOAPDoc() Description Use the CreateSOAPDoc function to create an empty SOAPDoc object. &MyDoc = CreateSOAPDoc(). &RS = CreateRowset(Record. Local Rowset &RS. 159 . Copyright © 1988. 2009. Example Local RowsetCache &Cache.PSLANGUAGES). as well as the XmlDoc class methods and properties to populate the SOAPDoc object.50 PeopleBook: PeopleCode API Reference. "AAROWSET1". Example Local SOAPDoc &MyDoc." GetRowsetCache. Parameters None. &NUM_READ = &RS. "ROWSET_AAROWSET1").

If you want to fetch only a single row. This is particularly useful when fetching an unknown number of results. This means that there is nothing further to be done with the SQL statement and the IsOpen property of the returned SQL object will be False.. If sqlstring is not a SELECT statement. the statement is immediately bound and executed. "SOAPDoc Class" Enterprise PeopleTools 8. If you want to fetch a single row into a PeopleCode record object. using the SQLExec function would generally be better. insert or update a record object. 2009.PeopleCode Built-in Functions Chapter 1 See Also Enterprise PeopleTools 8. Description Use the CreateSQL function to instantiate a SQL object from the SQL class and opens it on the given sqlstring and input values. and there are bind placeholders in the SQL statement. In this case. If sqlstring is not a SELECT statement. it is immediately bound with the inval input values and executed.. All Rights Reserved.50 PeopleBook: PeopleCode API Reference. use the record Select method. paramlist]]) Where paramlist is an arbitrary-length list of values in the form: inval1 [. and either there are some inval parameters. Opening and Processing sqlstring If sqlstring is a SELECT statement. The SQL object should subsequently be the subject of a series of Fetch method calls to retrieve the selected rows. there are no inval parameters. The resulting SQL object should subsequently be the subject of a series of Execute method calls to affect the desired rows. Any errors in the SQL processing cause the PeopleCode program to be terminated with an error message. 160 Copyright © 1988. sqlstring is a PeopleCode string value giving the SQL statement. or there are no bind placeholders in the SQL statement. or Update methods. Oracle and/or its affiliates.SqlName}[. use the SQLExec function instead.50 PeopleBook: PeopleCode API Reference. inval2] . the statement is neither bound nor executed. Using Arrays with paramlist You can use a parameter of type "Array of Any" in place of a list of bind values or in place of a list of fetch result variables. . use the record Delete. "XmlDoc Class" CreateSQL Syntax CreateSQL([{sqlstring | SQL. Insert. You can use CreateSQL with no parameters to create an empty SQL object that can be used to assign properties before being populated and executed. If you want to delete.

This SQL object has been opened. Example This SQL object should be used in a series of Fetch method calls: Local SQL &SQL.). &Sql. Oracle and/or its affiliates.. and meta-SQL. This string can include bind variables.. 2009.. paramlist Returns None. &EMPLID). End-While. as it is expected to supply all the bind values needed.Open(. While &Sql1.SqlName Specify either a SQL string containing the SQL command to be created or a reference to an existing SQL definition. 161 . &Sql.ABSENCE_HIST. RECORD.Tracename = "SQL1". &SQL = CreateSQL("%SelectAll(:1) where EMPLID = :2".Fetch(&AAny) /* Process the row in &AAny.. Parameters Parameter Description sqlstring| SQL. it must be the last parameter for the SQL object Fetch method or (for results) SQLExec. This SQL object is created as an empty object in order to set properties before being executed: &Sql = CreateSQL(). bound. /* do the deed */ Copyright © 1988.. This SQL object should be used in a series of Execute method calls: &SQL = CreateSQL("Delete from %Table(:1) where EMPLID = :2").. inline bind variables. For binding.ABSENCE_HIST. Because the Array of Any promotes to absorb any remaining select columns. */ . Specify input values for the SQL string.ReuseCursor = True.⇒ &EMPLID). &AAny = CreateArrayAny(). and is already closed again: &SQL = CreateSQL("Delete from %Table(:1) where EMPLID = :2". it must be the only bind parameter..Chapter 1 PeopleCode Built-in Functions &Sql1 = CreateSql("Select * from " | &TableName). RECORD. &Sql. All Rights Reserved.

" FetchSQL. 2009. All Rights Reserved. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." StoreSQL." GetSQL. "PeopleCode Built-in Functions.ChannelName) Description Use the CreateWSDLMessage function to create an unstructured message. If you specify a Null string for XmlString (""). "PeopleCode Built-in Functions. Chapter 1.50 PeopleBook: PeopleCode API Reference.50 PeopleBook: PeopleSoft Integration Broker. page 201. See Also Enterprise PeopleTools 8." DeleteSQL." SQLExec. you create an empty XmlDoc object. page 614 and Chapter 1. It is no longer supported. page 623 Enterprise PeopleTools 8. Oracle and/or its affiliates." Open CreateWSDLMessage Syntax CreateWSDLMessage(MessageName. "SQL Class" Enterprise PeopleTools 8. "SQL Class.DTDValidation) Description Use the CreateXmlDoc function to create an XmlDoc object. page 260. This function creates both the message as well as the channel. page 389. . "PeopleCode Built-in Functions. Chapter 1. "Consuming Services" CreateXmlDoc Syntax CreateXmlDoc(XmlString.PeopleCode Built-in Functions Chapter 1 See Also Chapter 1.50 PeopleBook: PeopleCode API Reference. This function has been deprecated. Considerations Using CreateXmlDoc The following coding is either ignored or removed from the XmlDoc object that is created with this function: 162 Copyright © 1988. Chapter 1.

• version attributes Regardless of what version is specified in XmlString.Chapter 1 PeopleCode Built-in Functions • encoding attributes PeopleSoft only supports UTF-8 encoding.Left_Constraint. In the case of application messaging. the DTD validation occurs if a DTD is provided. if a DTD is provided. False is the default value. If the XML cannot be validated against a DTD. Example The following creates an empty XmlDoc object. "XmlDoc Class" CubicSpline Syntax CubicSpline(DataPoints. Parameters Parameter Description XmlString Specify an XML string that you want to convert into an XmlDoc object that you can then manipulate using PeopleCode. Local XmlDoc &MyDoc. All Rights Reserved. an error is thrown saying that there was an XML parse error. 2009.50 PeopleBook: PeopleCode API Reference. See Also Enterprise PeopleTools 8. and if a DTD is provided. Any specified encoding statement is removed.Control_Option. &MyDoc = CreateXmlDoc(""). If you specify true. it is ignored and the XML isn't validated against the DTD. DTDValidation Returns A reference to the newly created XmlDoc object. Specify whether a DTD should be validated. as all XmlDoc objects are considered UTF-8. 163 .Right_Constraint) Copyright © 1988. You can also specify a Null string ("") to generate an empty XmlDoc object.0. This parameter takes a boolean value. If you specify false. the version attribute in the generated XmlDoc object is 1. Oracle and/or its affiliates. it's always ignored and the XML isn't validated against the DTD.

PeopleCode Built-in Functions Chapter 1 Description Use the CubicSpline function to compute a cubic spline interpolation through a set of at least four datapoints. a is the coefficient of the x0 term. Oracle and/or its affiliates. and d is the coefficient of the x3 term. Parameters Parameter Description DataPoints This parameter takes an array of array of number. and generate an estimate for the rightmost point Use the user-specified value for the curvature of the rightmost point. c is the coefficient of the x2 term. The first two of these six numbers are the x and y points to be fit. 2009.b. The last four are the four coefficients to be returned from the function: a. . and generate an estimate for the rightmost point Use the user-specified value for the slope of the rightmost point. Specifies the control option. and generate an estimate for the leftmost point 1 %SplineOpt_SlSetEst 2 %SplineOpt_SlEstSet 3 %SplineOpt_SlSetSet 4 %SplineOpt_CvEstEst 5 %SplineOpt_CvSetEst 6 %SplineOpt_CvEstSet 164 Copyright © 1988. b is the coefficient of the x1 term.c and d. and generate an estimate for the leftmost point Use the user-specified values for the slopes of the leftmost and rightmost points Generate an internal estimate of the beginning and ending curvature of the cubic piecewise equations Use the user-specified value for the curvature of the leftmost point. The array's contents are an array of six numbers. All Rights Reserved. The values are: Control_Option Numeric Value Constant Value Description 0 %SplineOpt_SlEstEst Generate an internal estimate of the beginning and ending slope of the cubic piecewise equations Use the user-specified value for the slope of the leftmost point. This parameter takes either a number or constant value.

A single number for the constraint for the right point. page 445 Copyright © 1988. 165 . 8 %SplineOpt_ClEstEst 9 %SplineOpt_ClSetEst 10 %SplineOpt_ClEstSet 11 %SplineOpt_ClSetSet 12 13 %SplineOpt_Natural %SplineOpt_ContCurl Parameter Description Left_Constraint A single number for the constraint for the left point. "PeopleCode Built-in Functions. and generate an estimate for the leftmost point Use the user-specified values for the curls of the leftmost and rightmost points Generate a "natural" spline Generate a spline wherein the equation for the first segment is the exact same equation for the second segment. Specify a zero if this parameter isn't needed. All Rights Reserved. The elements in the array correspond to the elements in the array used for DataPoints. See Also Chapter 1.Chapter 1 PeopleCode Built-in Functions Numeric Value Constant Value Description 7 %SplineOpt_CvSetSet Use the user-specified values for the curvatures of the leftmost and rightmost points Generate an internal estimate of the beginning and ending curl of the cubic piecewise equations Use the user-specified value for the curl of the leftmost point. Right_Constraint Returns A modified array of array of numbers." HermiteCubic. Oracle and/or its affiliates. 2009. "PeopleCode Built-in Functions. page 404 and Chapter 1." LinearInterp. and where the equation for the penultimate segment is the same as the equation for the last segment. Specify a zero if this parameter isn't needed. and generate an estimate for the rightmost point Use the user-specified value for the curl of the rightmost point.

End-if. "Accessing the Data Buffer" Returns Returns a Date value equal to the current effective date of the specified scroll level. "Rowset Class. Enterprise PeopleTools 8.50 PeopleBook: PeopleCode Developer's Guide. page 167." CurrEffSeq. "Rowset Class. See Also Chapter 1. "PeopleCode Built-in Functions. 2009." CurrEffRowNum. Chapter 1. Oracle and/or its affiliates. "PeopleCode Built-in Functions. page 167 and Chapter 1. All Rights Reserved. End-if. ." EffSeq Enterprise PeopleTools 8. Use the EffDt rowset class property instead. If no level is specified. See Also Enterprise PeopleTools 8.50 PeopleBook: PeopleCode API Reference. Note.POSITION_MGMT = "P" Then If All(POSITION_NBR) Then If (EFFDT = CurrEffDt(1) and EFFSEQ >= CurrEffSeq(1)) or (EFFDT > CurrEffDt(1) and EFFDT = %Date) Then Gray_employment( ).50 PeopleBook: PeopleCode API Reference. This function remains for backward compatibility only. CurrEffDt returns the effective date of the current scroll level." CurrentLevelNumber." GetCurrEffRow and Enterprise PeopleTools 8." EffDt. "PeopleCode Built-in Functions. "Rowset Class. Example If INSTALLATION. End-if.50 PeopleBook: PeopleCode API Reference.PeopleCode Built-in Functions Chapter 1 CurrEffDt Syntax CurrEffDt([level_num]) Description Use the CurrEffDt function to return the effective date of the specified scroll level as a Date value. page 168 166 Copyright © 1988.

"Rowset Class. Note.50 PeopleBook: PeopleCode API Reference. page 167 CurrEffSeq Syntax CurrEffSeq([level_num]) Description Use the CurrEffSeq function to determine the effective sequence of a specific scroll area. "Accessing the Data Buffer" Example &ROW = CurrEffRowNum(1). "Row Class." GetCurrEffRow Enterprise PeopleTools 8. Use the EffSeq rowset class property instead. page 167. All Rights Reserved." CurrentLevelNumber. Note." CurrEffSeq. This function remains for backward compatibility only. This function remains for backward compatibility only. Use the RowNumber row class property. See Also Enterprise PeopleTools 8. Chapter 1. it returns the effective row number of the current level. 2009. See Also Chapter 1.50 PeopleBook: PeopleCode API Reference. instead. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." RowNumber and Enterprise PeopleTools 8. Copyright © 1988." CurrEffRowNum. page 168 and Chapter 1.Chapter 1 PeopleCode Built-in Functions CurrEffRowNum Syntax CurrEffRowNum([level_num]) Description Use the CurrEffRowNum function to return the effective row number of the selected scroll level. 167 . If no level is specified.50 PeopleBook: PeopleCode Developer's Guide. Oracle and/or its affiliates. in combination with the GetCurrEffRow rowset method. "PeopleCode Built-in Functions.

50 PeopleBook: PeopleCode Developer's Guide." CurrEffDt. Chapter 1. Example If INSTALLATION. "Accessing the Data Buffer" Returns Returns a Number representing the effective sequence of the specified scroll level.50 PeopleBook: PeopleCode API Reference." CurrentLevelNumber. "PeopleCode Built-in Functions. End-if. "Rowset Class. Enterprise PeopleTools 8.PeopleCode Built-in Functions Chapter 1 If no level is specified. See Also Enterprise PeopleTools 8. . Returns Returns a Number value equal to the scroll level where the function is being called.POSITION_MGMT = "P" Then If All(POSITION_NBR) Then If (EFFDT = CurrEffDt(1) and EFFSEQ >= CurrEffSeq(1)) or (EFFDT > CurrEffDt(1) and EFFDT = %Date) Then Gray_employment( ). See Also Chapter 1. Oracle and/or its affiliates. "PeopleCode Built-in Functions." GetCurrEffRow and Enterprise PeopleTools 8. page 168 and Chapter 1. End-if." EffSeq. CurrEffSeq returns the effective sequence of the current scroll level." CurrEffRowNum. The function returns 0 if the field where the function is called is not in a scroll area." DeleteEnabled Enterprise PeopleTools 8. "PeopleCode Built-in Functions. page 167 CurrentLevelNumber Syntax CurrentLevelNumber() Description Use the CurrentLevelNumber function to return the scroll level where the function call is located.50 PeopleBook: PeopleCode API Reference. "Rowset Class. 168 Copyright © 1988. "Rowset Class. page 166. All Rights Reserved. 2009.50 PeopleBook: PeopleCode API Reference. End-if.

Note.50 PeopleBook: PeopleCode Developer's Guide. Use the RowNumber row class property instead. See Also Chapter 1." GetRow. Oracle and/or its affiliates. It won't work on a scroll level below the one where the PeopleCode program resides. If the level parameter is omitted. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 383 and Enterprise PeopleTools 8.Chapter 1 PeopleCode Built-in Functions Example &LEVEL = CurrentLevelNumber(). 169 .50 PeopleBook: PeopleCode API Reference. it defaults to the scroll level where the function call resides." RowNumber Enterprise PeopleTools 8. This function can determine the current row number on the level where the function call resides. "Row Class." CurrentRowNumber. See Also Chapter 1. Copyright © 1988." FetchValue. All Rights Reserved. or on a higher scroll level. This function remains for backward compatibility only. page 262 CurrentRowNumber Syntax CurrentRowNumber([level]) Description Use the CurrentRowNumber function to determine the row number of the row currently displayed in a specific scroll area. "PeopleCode Built-in Functions. "Accessing the Data Buffer" Parameters Parameter Description level A Number specifying the scroll level from which the function returns the current row number. page 169 and Chapter 1. 2009.

If the date is invalid.CHARGE_DT. Example CurrentRowNumber is typically used in component buffer functions to return the current row of the parent scroll of the target: &VAL = FetchValue(RECORD. for example. Returns Returns a date equal to the date specified in date_num. page 36. BUS_EXPENSE_⇒ DTL. End-if." CurrentLevelNumber. Chapter 1. . "PeopleCode Built-in Functions. All Rights Reserved. See Also Chapter 1. 2009. CurrentRowNumber(). whether the active row is the last record on the scroll): If CurrentRowNumber() = ActiveRowCount(EMPLID) Then det_employment_dt(). CurrentRowNumber returns the row number of the parent or grandparent row." FetchValue.BUS_EXPENSE_PER." ActiveRowCount. "PeopleCode Built-in Functions. page 168 and Chapter 1. The following example checks if the current row number is equal to the active row count (that is. or. Two-digit values are interpreted literally: 93. if level specifies a higher level scroll.PeopleCode Built-in Functions Chapter 1 Returns Returns a Number value equal to the current row number on the specified scroll level. &COUNT). Oracle and/or its affiliates. page 262 Date Syntax Date(date_num) Description The Date function takes a number in the form YYYYMMDD and returns a corresponding Date value. 170 Copyright © 1988. Warning! Make sure that you pass a four-digit year in the year parameter of this function. represents the year 93 AD. "PeopleCode Built-in Functions. The current number is the row where the PeopleCode program is being processed. Date displays an error message.

Parameters Parameter Description year month day An integer for the year in the form YYYY. the Date3 displays an error message. 1997: &HIREDate = Date(19970701). It returns a corresponding Date value. An integer from 1 to 12 designating the month.month. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 180. Chapter 1." Days360." Weekday. page 183. Chapter 1. and day. Chapter 1. page 464. Oracle and/or its affiliates.day) Description The Date3 function accepts a date expressed as three integers: year. page 702 Date3 Syntax Date3(year." Date3. Returns Returns a Date value equal to the date specified in the function parameters. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. If the date is invalid. 2009.month." Days365. page 694 and Chapter 1. Two-digit values will be interpreted literally: 93. An integer from 1 to 31 designating the day of the month. "PeopleCode Built-in Functions. for example. represents the year 93 AD. Chapter 1. "PeopleCode Built-in Functions.Chapter 1 PeopleCode Built-in Functions Example Set the temporary variable &HIREDate to a date field containing the date July 1. page 171. page 181. Chapter 1." Month. Copyright © 1988." DateValue. "PeopleCode Built-in Functions. All Rights Reserved." Day." Year. Chapter 1. 171 . Warning! Make sure that you pass a four-digit year in the year parameter of this function. page 183. See Also Chapter 1. "PeopleCode Built-in Functions.

Chapter 1." Day." Days360. and second.minute. 1). page 183 DatePart Syntax DatePart(datetime_value) Description Use the DatePart function to determine a date based on a provided DateTime value. Chapter 1." Days365. 172 Copyright © 1988. . page 183 and Chapter 1. page 170. 1. minute. If the result of this function is not an actual date. 2009. See Also Chapter 1." DateValue. Example The following statement sets &D2 to a Date value for 11/12/1997: &D1 = DateTimeValue("11/12/1997 10:23:15 AM"). "PeopleCode Built-in Functions.PeopleCode Built-in Functions Chapter 1 Example The following PeopleCode Date3 function returns the first day of the year in which the employee was hired: Date3(HIRE_YEAR. there is a runtime error. "PeopleCode Built-in Functions. All Rights Reserved.day. page 180.hour.month.second) Description The DateTime6 function returns a DateTime value based on integer values for the year. Returns Returns a Date value equal to the date part of a specified DateTime value. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. DateTime6 Syntax DateTime6(year. &D2 = DatePart(&D1).day. page 181.hour." Date. Chapter 1.month. "PeopleCode Built-in Functions. Oracle and/or its affiliates.

A number from 0 to 23 representing the hour of the day. 1997: &DT = DateTime6(1997. 9. All Rights Reserved. Because the HTTP protocol is used to interchange information between diverse computing systems. A number between 1 and 12 representing the month. Example The following example sets &DT to a DateTime value equal to 10:09:20 on March 15. Two-digit values will be interpreted literally: 93.Chapter 1 PeopleCode Built-in Functions Warning! Make sure that you pass a four-digit year in the year parameter of this function. A number from 0 to 59. use the DateTimeToLocalizeString function instead. A number representing the day of the month. Parameters Parameter Description year month day hour minute second A four-digit number representing the year. 20). 10. The standard HTTP datetime has the following fixed length format: Copyright © 1988. If you want the value to use the localized form. Returns Returns a DateTime value based on the integers provided.999999 representing seconds. the value returned from this function is always the "US English" form of weekdays and months. for example. represents the year 93 AD. 15. Oracle and/or its affiliates. 2009. A number from 0 to 59 representing the minute of the hour.1 standards. 173 . DateTimeToHTTP Syntax DateTimeToHTTP(datetime) Description Use the DateTimeToHTTP function to convert any datetime value to a datetime string in the format specified by HTTP 1.0 and 1. Note. 3.

one of Sun. Feb. is a 3-character month name. such as 03 or 59 a literal 3-character GMT. As indicated by the trailing GMT. a literal comma character a literal space character a 2-digit day of month. Parameters Parameter Description datetime Specify the datetime value you want converted to HTTP format. Returns A string containing the converted datetime. &gmtdate). this datetime format is always expressed in GMT (or UTC. 2009. a 4-digit year number a 24-hour hour number. Oracle and/or its affiliates.setHeader("Last-Modified".0.600.><sp><dd><sp><mon><sp><year><sp><hh><:><mm><:><ss><sp><GMT> where: Value Description <dow> <.0.> <sp> <dd> <mon> <year> <hh> <mm> <ss> <GMT> a 3-character day of week name. which is declared to be the same for the purposes of HTTP). such as 02 or 22. Tue. Example &gmtdate = DateTimeToHTTP(AddToDateTime(%DateTime. 0. All Rights Reserved. Thu.0)).0. Wed. such as 00 or 13 a 2-digit minute number. and so on. 174 Copyright © 1988. . Mon. This datetime is assumed to be in the base timezone of the installation. such as 01 or 56 a 2-digit second number.PeopleCode Built-in Functions Chapter 1 <dow><. %Response. Mar. Sat. one of Jan. Fri.

This is a format for each language. Only specify Pattern if necessary." DateTimeToLocalizedString. page 274 DateTimeToLocalizedString Syntax DateTimeToLocalizedString({datetime | date}." AddToDateTime. The values for pattern are case-sensitive. while an uppercase M displays the month. you get minutes. "PeopleCode Built-in Functions." FormatDateTime. Parameters Parameter Description Datetime | Date Pattern Specify either the datetime or date that you want to convert. if you specify a lowercase m. Oracle and/or its affiliates. Specify the pattern you want to the localized datetime or date to be converted to. 175 . All Rights Reserved. If you need to change the pattern for each language. Chapter 1. "PeopleCode Built-in Functions. page 54.Chapter 1 PeopleCode Built-in Functions See Also Chapter 1. You can also specify a particular pattern to convert datetime or date to. The valid values for Pattern are as follows. For example. The Pattern is optional. Using the Pattern Parameter Pattern takes a string value. [Pattern]) Description Use the DateTimeToLocalizedString function to convert either datetime or date to a localized string. change the first message in Message Catalog set number 138. "PeopleCode Built-in Functions. and indicates how you want the date or datetime converted. 2009. Note. page 175 and Chapter 1. Symbol Definition Type Example G Era designator Text AD y Year Number 1996 Copyright © 1988.

the short or abbreviated form is used if one exists. if the count of 'y' is 2. 176 Copyright © 1988. Oracle and/or its affiliates. Shorter numbers are zero-padded to this amount. All Rights Reserved. The year is handled specially. that is. 2009. Type Pattern Format Text If 4 or more pattern letters are used. . the year is truncated to 2 digits.PeopleCode Built-in Functions Chapter 1 Symbol Definition Type Example M Month in year Text&Number July&07 d Day in month Number 10 h Hour in am/pm Number (1-12) 12 H Hour in day Number (0-23) 0 m Minute in hour Number 30 s Second in minute Number 55 S Millisecond Number 978 E Day in week Text Tuesday a am/pm marker Text PM k Hour in day Number (1-24) 24 K Hour in am/pm Number (0-11) 0 ' Escape for text Delimiter '' Single quote Literal ' The number of pattern letters determine the format. Number Use the minimum number of digits. If less than 4 pattern letters are used. the full form is used.

For instance. "PeopleCode Built-in Functions. otherwise. "PeopleCode Built-in Functions.dd G 'at' hh:mm:ss" 1996. A pattern containing any invalid pattern letter results in a runtime error. All Rights Reserved.. "M/d/y"). page 173 Copyright © 1988. &String = &String | " 00:00:00. '96 "h:mm a" 12:08 PM "hh 'o''clock' a" 12 o'clock PM "K:mm a" 0:00 PM "yyyyy. 2009.'. &DateTime = DateTimeValue(&String).10 AD 12:08 PM Returns A string. page 274 and Chapter 1.Chapter 1 PeopleCode Built-in Functions Type Pattern Format Text&Number If 3 or more pattern letters are used.10 AD at 15:08:56 "EEE.MMMMM.dd GGG hh:mm aaa" 1996. characters like ':'. text is used.July. End-Function. 177 . Example REM**************************************************************." DateTimeToHTTP. July 10. &String = DateTimeToLocalizedString(&Date.07.. See Also Chapter 1." FormatDateTime. ''yy" Wed. Return &DateTime. '#' and '@' appear in the resulting string even they're not within single quotes.000000". Function ConvertDateToDTTM(&Date As date) Returns datetime .'z'] and ['A'. ' '. Any characters in Pattern are not in the ranges of ['a'. MMM d. '. REM ***********************************************************. Examples using a United States locale: Pattern Result "yyyy.'Z'] are treated as quoted text. Oracle and/or its affiliates.MM. a number is used.

use the local time zone for converting OldDateTime. Considerations Using this Function Typically. All Rights Reserved. This function could be used to do the conversion for the comparison. Valid values are: • • • DestinationTimeZone timezone .use the local time zone for converting OldDateTime.use the base time zone for converting OldDateTime. Valid values are: • • • timezone . . depending on the user settings. SourceTimeZone. If the times were between 12 AM and 12 PM in EST. in temporary fields. and not displayed at all. DestinationTimeZone) Description Use the DateTimeToTimeZone function to convert datetimes from the datetime specified by SourceTimeZone to the datetime specified by DestinationTimeZone. Specify the time zone that you want to convert OldDateTime to.use the base time zone for converting OldDateTime.a time zone abbreviation or a field reference to be used for converting OldDateTime. these resolve to 9 PM and 9 AM PST. 2009. Local . Parameters Parameter Description OldDateTime SourceTimeZone Specify the datetime value to be converted. Local . The start value is after the end value. which makes it difficult to make a comparison. This function could be used as follows: suppose a user wanted to check to make sure a time was in a range of times on a certain day. convert it from base time to client time. when the time is displayed the system might try to do a second conversion on an already converted datetime. Base . respectively. then try to display this time. Base . this function is used in PeopleCode. Oracle and/or its affiliates.PeopleCode Built-in Functions Chapter 1 DateTimeToTimeZone Syntax DateTimeToTimeZone(OldDateTime.a time zone abbreviation or a field reference to be used for converting OldDateTime. not for displaying time. If you take a datetime value. in a certain timezone. Specify the time zone that OldDateTime is in. 178 Copyright © 1988.

179 . "PeopleCode Builtin Functions.YY[YY] hh:mm:ss." ConvertTimeToBase. "PeopleCode Built-in Functions." ConvertDatetimeToBase. 2009." TimeToTimeZone. Using this Function in Fields Without a Default Century Setting This function may derive the wrong century setting if passed a 2-character year and DateTimeValue is executing in a PeopleCode event not associated with a field that has a default century setting. &NEWDATETIME = DateTimeToTimeZone(TESTDTTM." IsDaylightSavings. so three hours are added to the datetime value. &NEWDATETIME will have the value 01/01/99 13:00:00 because EST is three hours ahead of PST on 01/01/99. All Rights Reserved. "PeopleCode Built-in Functions. See Also Chapter 1. is a datetime field with a value 01/01/99 10:00:00. "EST"). This example converts TESTDTTM from Pacific standard time (PST) to eastern standard time (EST)." TimeZoneOffset." FormatDateTime. Chapter 1. page 120. page 639 Enterprise PeopleTools 8.50 PeopleBook: System and Server Administration. page 123.Chapter 1 PeopleCode Built-in Functions Returns A converted datetime value.ssssss [{AM|PM}] or MM. Example The following example. Chapter 1. page 637 and Chapter 1. Chapter 1. Oracle and/or its affiliates.ssssss [{AM|PM}] Description Use the DateTimeValue function to derive a DateTime value from a string representing a date and time. "PST". page 274. TESTDTTM. Copyright © 1988. "PeopleCode Built-in Functions.DD. Chapter 1. page 429. "Using PeopleTools Utilities" DateTimeValue Syntax DateTimeValue(string) where string has the format: MM/DD/YY[YY] hh:mm:ss. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions.

Example Both of the following examples set &Date_TIME to a Datetime value equal to October 13. page 171." Days360. Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." Date. DateTimeValue uses the 50/50 rule and calculates the year to be 2011 (instead of 1911)." Weekday. &DTM = DateValue("10/09/97"). page 180. page 183. "PeopleCode Builtin Functions. page 183. 1997 10:34:25 PM. See Also Chapter 1. Instead. Chapter 1. 2009. it isn't used because the PeopleCode fired in TEST_FIELD." Days365. date_str must be a string in the active date format user's current personalization date format." DateValue. "PeopleCode Built-in Functions. assume that TEST_DATE is a date field with a default century setting of 10. page 170. "PeopleCode Built-in Functions. ." Date3. "PeopleCode Built-in Functions. Though TEST_DATE has a century setting. Chapter 1. "PeopleCode Built-in Functions. Chapter 1. &Date_TIME = DateTimeValue("10/13/97 22:34:25"). All Rights Reserved.PeopleCode Built-in Functions Chapter 1 For example. Chapter 1. page 694 and Chapter 1." Day. 180 Copyright © 1988. Returns Returns a DateTime value. page 181. Chapter 1. "PeopleCode Built-in Functions. TEST_FIELD is a field with no default century setting. "PeopleCode Built-in Functions. If the user's Date Format personalization setting is set to DDMMYY (or it is defaulted to this from their browser locale or the system-wide personalization defaults) then the following code returns a Datetime value equal to September 10." Month. the date will be calculated incorrectly: TEST_DATE = DateTimeValue("10/13/11 15:34:25"). If the following PeopleCode program is executing in TEST_FIELD." Year. Oracle and/or its affiliates. 1997. &Date_TIME = DateTimeValue("10/13/97 10:34:25 PM"). Chapter 1. page 702 DateValue Syntax DateValue(date_str) Description Use the DateValue function to convert a date string and returns the result as a Date type. page 464.

" Year." Days360. DateValue uses the 50/50 rule and calculates the year to be 2011 (instead of 1911). TEST_FIELD is a field with no default century setting. "PeopleCode Built-in Functions. page 694 and Chapter 1. All Rights Reserved. it isn't used because the PeopleCode fired in TEST_FIELD." Day. Returns Returns a Date value. "PeopleCode Built-in Functions. assume that TEST_DATE is a date field with a default century setting of 10. Chapter 1. Copyright © 1988." DateTimeValue." Date3. Chapter 1. Returns Returns a Number value equal to the day of the month for dt_val. Though TEST_DATE has a century setting. "PeopleCode Built-in Functions.Chapter 1 PeopleCode Built-in Functions If the user's Date Format personalization setting is set to MMDDYY (or it is defaulted to this from their browser locale or the system-wide personalization defaults) then the same function call returns a value equal to October 9. "PeopleCode Built-in Functions. Using this Function in Fields Without a Default Century Setting This function may derive the wrong century setting if passed a 2-character year and DateValue is executing in a PeopleCode event not associated with a field that has a default century setting. the date will be calculated incorrectly: TEST_DATE = DateValue("10/13/11"). "PeopleCode Built-in Functions. page 183." Date. Chapter 1. page 171." Month. page 702 Day Syntax Day(dt_val) Description Use the Day function to determine an integer representing the day of the month based on a Date or DateTime value. 1997. page 181. "PeopleCode Built-in Functions. Chapter 1. page 464. "PeopleCode Built-in Functions. page 183. "PeopleCode Built-in Functions. Chapter 1. If the following PeopleCode program is executing in TEST_FIELD." Weekday. See Also Chapter 1. Instead. Oracle and/or its affiliates. page 170. 2009. "PeopleCode Built-in Functions. Chapter 1. Chapter 1. The return value is an integer from 1 to 31." Days365. page 179. For example. 181 .

page 183. 1997. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. See Also Chapter 1.PeopleCode Built-in Functions Chapter 1 Example If HIRE_DATE is November. "PeopleCode Built-in Functions. page 694 and Chapter 1. page 702 182 Copyright © 1988. "PeopleCode Built-in Functions." Weekday. DateTime. Chapter 1.Days(RELEASE_Date))." Month." Days365. page 182. Oracle and/or its affiliates. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. Chapter 1." Month." Year. page 694 and Chapter 1. Chapter 1. Chapter 1. page 702 Days Syntax Days(dt_val) Description Use the Days function to returns the Julian date for the dt_val specified. "PeopleCode Built-in Functions. use the Days function on both dates. 1." DateValue. page 180." Days360. the following Day function returns the integer 1: &FIRST_DAY = Day(HIRE_DATE). page 180. All Rights Reserved. Chapter 1." DateValue." Weekday. and subtract one from the other: &NUM_DAYS = Abs(Days(HIRE_Date) . page 464. Chapter 1. This function accepts a Date. Chapter 1. 2009. "PeopleCode Built-in Functions. Example To find the number of days between two dates. "PeopleCode Built-in Functions. Chapter 1. page 183. page 464. "PeopleCode Built-in Functions. Chapter 1. "PeopleCode Builtin Functions. See Also Chapter 1. page 170. page 183." Date." Year." Days365. page 171. Chapter 1. "PeopleCode Built-in Functions. Returns Returns a Number value equal to the Julian date for dt_val. Chapter 1. "PeopleCode Built-in Functions. or Time value parameter. . page 183." Date3." Days360. "PeopleCode Built-in Functions." Days. "PeopleCode Built-in Functions.

page 183. Chapter 1. If date_val2 occurs before date_val1. Chapter 1." Date3. Copyright © 1988. page 181." Weekday. "PeopleCode Built-in Functions. page 182. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. 183 ." Year.date_val2) Description Use the Days360 function to return the number of days between the Date values date_val1 and date_val2 using a 360-day year (twelve 30-day months)." Date.date_val2) Description Use the Days365 function to return the number of days between the Date values date_val1 and date_val2 using a 365-day year. Chapter 1." Day. Chapter 1. Oracle and/or its affiliates." Days. page 694 and Chapter 1. "PeopleCode Built-in Functions." Month. Use this function to help compute payments if your accounting system is based on twelve 30-day months. "PeopleCode Builtin Functions." DateValue. page 702 Days365 Syntax Days365(date_val1. Example The following example sets &NUMDAYS to the number of days between TERM_START_DT and PMT_DT based on a 360-day calendar: &NUMDAYS = Days360(TERM_START_DT. Days365 returns a negative number.Chapter 1 PeopleCode Built-in Functions Days360 Syntax Days360(date_val1. page 170. Use this function to help compute payments if your accounting system is based on a 365-day year. See Also Chapter 1. page 171. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. 2009. page 464. If date_val2 occurs before date_val1. Days360 returns a negative number. Chapter 1." Days365. page 180. "PeopleCode Built-in Functions. Chapter 1. Chapter 1. PMT_DT). All Rights Reserved.

" Date. 2009." Date3. based on a 365-day calendar: &NUMDAYS = Days360(TERM_START_DT. DBPatternMatch Syntax DBPatternMatch(Value. you'd use "M%" for Pattern. if you wanted to find if the string in Value started with the letter M. use "DAT_" for Pattern. Use the DBCSTrim function to remove a trailing DBCS lead byte at the end of the string. All Rights Reserved. This function has been deprecated. Chapter 1. . page 464. Oracle and/or its affiliates.Pattern. page 183. 184 Copyright © 1988. page 181. Chapter 1. page 170. while _ means find a single character. page 180. Chapter 1. Chapter 1." Days360. See Also Chapter 1. "PeopleCode Built-in Functions. If you wanted to find either DATE or DATA. "PeopleCode Built-in Functions. page 171. "PeopleCode Built-in Functions. For example. page 694 and Chapter 1. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." Weekday. page 702 DBCSTrim Syntax DBCSTrim(source_str) Description Note. Chapter 1." Day. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. % means find all characters.PeopleCode Built-in Functions Chapter 1 Returns Returns a Number value equal to the number of days between the two dates in a 365-day calendar." Month. Chapter 1.CaseSensitive) Description Use the DBPatternMatch function to match the string in Value to the given pattern. PMT_DT)." DateValue." Year. You can use wildcard characters % and _ when searching. Example The following example sets &NUMDAYS to the number of days between and TERM_START_DT and PMT_DT. "PeopleCode Built-in Functions.

if you want to search for a value that contains the character %." Findb. specifying "" for Pattern is the same as specifying "%"). All Rights Reserved. 185 .field_nameevent_type External Function Syntax Declare Functionfunction_nameLibrarylib_name [ALIASmodule_name ] [paramlist] [RETURNSext_return_type [Aspc_type]] Where paramlist is: ([ext_param1 [. False otherwise. Parameters Parameter Description Value Pattern CaseSensitive Specify the string to be searched." Find. page 268 Declare Function Syntax PeopleCode Function Syntax Declare Functionfunction_namePeopleCoderecord_name.Chapter 1 PeopleCode Built-in Functions These characters can be escaped (that is. Returns Returns a Boolean value. "PeopleCode Built-in Functions. True if the string matches the pattern. Specify whether the search is case-sensitive. the search is case-sensitive. use \% in Pattern. it is not. Oracle and/or its affiliates. page 267 and Chapter 1. ignored) using a \. . For example. This parameter takes a Boolean value: True. If Pattern is an empty string. False. "PeopleCode Built-in Functions. . See Also Chapter 1. this function retrieves the value just based on the specified case-sensitivity (that is. 2009. ext_param2] .) and where ext_paramn is: ext_datatype [{REF|VALUE}] [Aspc_return_type] Copyright © 1988. Specify the pattern to be used when searching.

an optional Returns clause specifying the type of any value returned by the external function. and so on. You can't define functions in Component PeopleCode.50 PeopleBook: PeopleCode Developer's Guide. External Library Functions Function declarations define routines in an external (C-callable) library. 2009. . The function declaration provides the name of the library. To support processes running on an application server. Oracle and/or its affiliates. See Enterprise PeopleTools 8. and event type where the function definition resides. PeopleCode can also call external programs that reside in dynamic link libraries. See Enterprise PeopleTools 8. "PeopleCode and PeopleSoft Pure Internet Architecture. By convention. Calls to external functions suspend processing: this means that you should exercise caution to avoid "thinktime" errors when calling the function in the following PeopleCode events: • • • • • SavePreChange. Any PeopleCode event that fires as a result of a ScrollSelect (or one of its relatives) function calls. The function parameters and return type are not declared.) The PeopleCode declaration and function call syntax is the same regardless of platform. but UNIX libraries must be compiled with an interface function. or a Select (or one of its relatives) Rowset class method. you must pass the number of parameters the library function expects. field. SavePostChange. PeopleCode Functions You can call a PeopleCode function defined on any record definition. After you have declared an external library function. in record definitions with names beginning in FUNCLIB_. you can declare and call functions compiled in dynamic link libraries on windows (*.DLL files) and shared libraries on UNIX (lib*. an optional alias module_name.50 PeopleBook: PeopleCode Developer's Guide. Workflow. "Using Methods and Built-In Functions. and the PeopleCode data type into which to convert the returned value. The library must be a DLL accessible by Windows or a shared library accessible by UNIX. RowSelect." Calling DLL Functions on the Application Server. Note. you can call it the same way as an external PeopleCode function. a list of parameters to pass to the function. You must declare either of these types of functions at the top of the calling program using the Declare Function statement. 186 Copyright © 1988. provided you declare it at the top of the calling program." Think-Time Functions. PeopleCode functions are stored in FieldFormula PeopleCode.so files. The declaration identifies the function name. Like PeopleCode functions. You can create special record definitions whose sole purpose is to serve as function libraries. You can define functions only in Record Field PeopleCode. they are determined from the function definition. as well as the record. All Rights Reserved. Component Record Field PeopleCode.PeopleCode Built-in Functions Chapter 1 Description PeopleCode can call PeopleCode functions defined in any field on any record definition.

187 . The external routine must be located in a DLL named lib_name accessible by Windows. or an equivalent shared library in a UNIX system.Chapter 1 PeopleCode Built-in Functions Parameters The following are the parameters for the PeopleCode Function syntax: Parameter Description function_name PeopleCode recordname. a component record event. All Rights Reserved. Reserved word that identifies the function as an external library function. You can't specify a component record field event. event_type can be used to specify record field events only. Specifies the record and field where the function is located. Optionally specifies the name of the function's entry point within the shared library. and so on. This is needed only if the C function name differs from function_name in the PeopleCode external function declaration. Reserved word that identifies the function as a PeopleCode function. The following are the parameters for the External Function syntax: Parameter Description function_name Library lib_name Name of the function. Oracle and/or its affiliates. List of parameters expected by the function. Note. Component Processor event with which the function is associated.fieldname event_type Name of the function. The external module is invoked using the __stdcall calling convention on Windows. 2009. each in the form: ext_datatype [{Ref|Value}] [Aspc_type] Alias module_name Paramlist Copyright © 1988. A string representing the name of the external library.

188 Copyright © 1988. it is passed by pushing a reference (pointer) on the stack. Specifies PeopleCode data type of the value passed to the function.PeopleCode Built-in Functions Chapter 1 Parameter Description ext_type The datatype of the parameter expected by the function. PeopleTools selects an appropriate type based on the type of value returned by the external function (for example. Aspc_return_type Specifies the PeopleCode data type of the variable or field into which to read the returned value. Ref is assumed. You can choose between PeopleCode data types String.) If neither is specified. If Value is specified the value is pushed on the stack (for integers. 2009. The Returns clause is omitted if the function is void (returns no value. Number. all integer and floating point types are converted to Number). All Rights Reserved. You can choose between PeopleCode data types String. and Any. If Ref is specified. Number. Oracle and/or its affiliates. Boolean. Boolean. Date. and so on.) To specify the return type you can use any of the following: ASpc_type Returnsext_return_type • • • • • • • BOOLEAN INTEGER LONG UINTEGER ULONG FLOAT DOUBLE The types String and LString are not allowed for the result type of a function. If the As clause is omitted. . and Any. To specify the type you can use any of the following: • • • • • • • • • Ref | Value BOOLEAN INTEGER LONG UINTEGER ULONG STRING STRING FLOAT DOUBLE Optionally use one of these two reserved words to specify whether the parameter is passed by reference or by value. Specifies the data type of any value returned by the function. Date.

in PSUSER. that is.EncryptedString) Description Use the Decrypt function to decrypt a string previously encrypted with the Encrypt function. in the record field ZIP_EDITS. The function definition is located in the record definition FUNCLIB_MYUTILS. "PeopleCode Built-in Functions. You would declare the function using the following statement: declare function verifyzip PeopleCode FUNCLIB_MYUTILS. It takes an integer and returns an integer. page 277 Decrypt Syntax Decrypt(KeyString. You would write this declare statement: declare function pctest library "psuser. Parameters Parameter Description KeyString Specify the key used for encrypting the string. Now assume you want to declare a function called PCTest.ZIP_EDITS FieldFormula.DLL. This function is generally used with merchant passwords. EncryptedString Returns A clear text string. two quotation marks with no blank space between them (""). attached to the FieldFormula event. All Rights Reserved.Chapter 1 PeopleCode Built-in Functions Example Assume you have defined a PeopleCode function called VerifyZip. you must use the same KeyString value used to encrypt the string. 189 . 2009. Copyright © 1988." Function. You can specify a NULL value for this parameter. See Also Chapter 1. Specify the string you want decrypted. Oracle and/or its affiliates. For this function to decrypt a string successfully.dll" (integer value as number) returns⇒ integer as number.

"Understanding PeopleSoft Security" Degrees Syntax Degrees(angle) Description Use the Degrees function to convert the given angle from radian measurement to degree measurement. See Also Chapter 1.PeopleCode Built-in Functions Chapter 1 Example Encrypt and Decrypt support only strings.Value = Decrypt("".Value))).50 PeopleBook: Security Administration. . "PeopleCode Built-in Functions.CMPAUTHNTCTNTOKEN. Returns The size of the given angle in degrees. All Rights Reserved. 2009. "PeopleCode Built-in Functions.2).2 radians: &DEGREE_SIZE = Degrees(1. 190 Copyright © 1988. &AUTHPARMS. Parameters Parameter Description angle The size of an angle in radians. Example The following example returns the equivalent size in degrees of an angle measuring 1. RTrim(LTrim(&MERCHANTID_⇒ REC." Hash. Oracle and/or its affiliates.WRKTOKEN. page 232 and Chapter 1. page 403 Enterprise PeopleTools 8." Encrypt.

Chapter 1. The following limitations apply to the FTP URL: Copyright © 1988. page 610 and Chapter 1. FTP_server_address is the FTP server's name or its IP address. page 60. "PeopleCode Built-in Functions. page 509.DirAndFileName[. If you want the user to verify the deletion before it is performed. in the form of: URL. 2009." Radians." Acos. "PeopleCode Built-in Functions.com:6000/ If the file is transferred using secure FTP (FTPS). page 135. and path is the path on the FTP server relative to the directory specified as the FTP server's root. "PeopleCode Built-in Functions. FTP Server Storage Considerations If your storage destination is a file server. "PeopleCode Built-in Functions. Chapter 1." Tan.peoplesoft. you must write your own checking code in your application. 191 . DeleteAttachment does not generate any type of "Are you sure" message. Oracle and/or its affiliates. page 61. Chapter 1. Chapter 1." Asin.Chapter 1 PeopleCode Built-in Functions See Also Chapter 1. page 632 DeleteAttachment Syntax DeleteAttachment(URLDestination. For example: ftp://user:password@ftpserver." Sin. "PeopleCode Built-in Functions." Atan. "PeopleCode Built-in Functions.50 PeopleBook: System and Server Administration. PreserveCase]) Description Use the DeleteAttachment function to delete a file from the specified storage location." Cot. URLDestination must be a URL definition. If you want to use a different port you must specify it in the URL. as part of FTP_server_address.URLname • A string. Chapter 1. The default FTP port is 21. "Using PeopleTools Utilities. "PeopleCode Built-in Functions." Cos." Adding Secure FTP (FTPS) URLs. SFTP is not supported. Chapter 1. URLDestination will be either of the following: • A URL definition. "PeopleCode Built-in Functions. page 35. in the form of: protocol://FTP_user_ID:FTP_password@FTP_server_address/path where protocol is "ftp" or "ftps". All Rights Reserved. See Enterprise PeopleTools 8. page 134.

2009. The actual error message can be found in the logs. the following characters are replaced with an underscore: • • • • • • • • (space) . the process will be stopped and an error (%Attachment_Failed) will be returned to user. See Enterprise PeopleTools 8. File Name Considerations If the local source file name has any of the following characters. Oracle and/or its affiliates. in the form of: URL. (semicolon) + (plus sign) % (percent sign) & (ampersand) ' (apostrophe) ! (exclamation point) # (pound sign) 192 Copyright © 1988.URLname • A string. . Database Storage Considerations If your storage destination is a database table. All Rights Reserved.50 PeopleBook: PeopleCode Developer's Guide. The FTP password to is limited to 16 characters. in the form of: record://MYRECORD where MYRECORD is the record associated with a storage destination table. URLDestination will be either of the following: • A URL definition. The length of the full URL is limited to 254 characters. • • • • • • * (asterisk) : (colon) " (quotation mark) < (less than symbol) > (greater than symbol) ? (question mark) When the file is transferred." Using Attachment Functions.PeopleCode Built-in Functions Chapter 1 • • The FTP user name to is limited to 30 characters. "Using File Attachments and PeopleCode.

its filename extension is preserved or not. it is important that you use it in a consistent manner with all the relevant file-processing functions or you may encounter unexpected file-not-found errors. "Using PeopleTools Utilities. This can be either a URL name. DirAndFileName The relative path and filename of the file on the file server. Warning! If you use the PreserveCase parameter. The default value is False. 2009. This parameter takes a string value. In general. Parameters Parameter Description URLDestination A reference to a URL. you should exercise caution when using an '@' or ':' character in the name of a file selected for uploading or in the value of the URLDestination or DirAndFileName parameter. "\" are NOT supported in any way for either the URLSource or the SysFileName parameter. or a string. Also. Returns You can check for either an integer or a constant value: Copyright © 1988. The URLSource requires "/" slashes. the destination directory specified by a full FTP URL will be taken to be relative to the FTP root directory (which may not be the same as the root directory of the FTP server machine). along with the DirAndFileName parameter. URLDestination must be a URL definition. If the file is transferred using secure FTP (FTPS). Note. convert the filename extension to all lower case letters. preserve the case of the filename extension. All Rights Reserved. This. Oracle and/or its affiliates. Note. True. and the '@' character must be used as a delimiter between the FTP password and the FTP server address." Adding Secure FTP (FTPS) URLs. Of course. This is appended to URLSource to make up the full URL where the file is transferred from. it also requires only "/" slashes.Chapter 1 PeopleCode Built-in Functions • $ (dollar sign) Note. PreserveCase Specify a Boolean value to indicate whether when searching for the file specified by the DirAndFileName parameter. See Enterprise PeopleTools 8. Backward slashes (\) are not supported for this parameter. 193 . False. The URLDestination parameter requires forward slashes (/). URLName. in the form URL. Because SysFileName is appended to the URL.50 PeopleBook: System and Server Administration. indicates the file's location. the ':' character must to be used as a delimiter between the FTP user ID and the FTP password or just before the FTP port number (if one is specified).

2009. • • 7 %Attachment_DestSystNotFound Cannot locate destination system for FTP. Failed to close SSL connection. Failed due to unexpected/bad reply from server. Failed due to timeout.PeopleCode Built-in Functions Chapter 1 Numeric Value Constant Value Description 0 1 %Attachment_Success %Attachment_Failed File was deleted successfully. 194 Copyright © 1988. Oracle and/or its affiliates. All Rights Reserved. File deletion failed due to unspecified error during FTP attempt. The following are some possible situations where %Attachment_DestSystNotFound could be returned: • • Improper URL format. The following are some possible situations where %Attachment_Failed could be returned: • • • • • • 3 %Attachment_FileTransferFailed Failed to initialize the process due to some internal error. . Failed to connect to server mentioned. Failed due to non-availability of space on FTP server. Failed to allocate memory due to some internal error. File deletion failed due to unspecified error.

Oracle and/or its affiliates. and delete that file from its storage location. Debug. PeopleTools Test Utilities) contains a sample file attachment application. The following are some possible situations where %Attachment_FileNotFound could be returned: • • 10 %Attachment_DeleteFailed Remote file not found. The following are some possible situations where %Attachment_DestSysFailedLogin could be returned: • • • • • • • • 9 %Attachment_FileNotFound Unsupported protocol mentioned. buttons appear that allow you to view. ATTACHSYSFILENAME).BKFTP. Could not authenticate the peer certificate. All Rights Reserved. Failed to connect using SSL Failed to verify the certificates. Utilities. Example &retcode = DeleteAttachment(URL.Chapter 1 PeopleCode Built-in Functions Numeric Value Constant Value Description 8 %Attachment_DestSysFailedLogin Unable to login to destination system for FTP. detach. Access denied to server. 195 . Failed to login with specified SSL level. Cannot delete file. The PeopleTools Test Utilities page (PeopleTools. Copyright © 1988. Cannot locate file. Problem reading SSL certificate . 2009. Note that this demonstration application only permits the user to enter a URL of up to 120 characters. Remote server denied logon. Failed due to problem in certificates used. Failed to read remote file. The page allows you to enter a storage location (an FTP site or a record) and upload a file to that storage location by clicking the Attach button on this page. Once the selected file has been successfully uploaded.

"PeopleCode Built-in Functions. This parameter takes a string value. Note. and it is not the only email address. Oracle and/or its affiliates." CopyAttachments. Chapter 1. page 499 and Chapter 1. Chapter 1. 2009. "PeopleCode Built-in Functions. "Using File Attachments and PeopleCode. Use the MarkPrimaryEmailAddress function to set the primary email address. or directly call those PeopleCode programs from any PeopleCode you implement. These sample programs could possibly be changed in a future version of PeopleTools. and ViewAttachment." PutAttachment. page 124. page 326. Note. These programs are provided as working examples of how to use the file attachment functions AddAttachment." GetAttachment. "PeopleCode Built-in Functions. . Oracle recommends that you do not modify the delivered FILE_ATTACH_WRK record definition or the PeopleCode programs it contains. Parameters Parameter Description Type Specify the type that you want to change the email address to. PSTESTUTIL. contains buttons that execute FieldChange PeopleCode programs on the FILE_ATTACH_WRK record definition. "PeopleCode Built-in Functions. Chapter 1." DetachAttachment. "PeopleCode Built-in Functions. page 207. You can clone the FILE_ATTACH_WRK record definition and customize the programs to fit your file processing requirements. See Also Chapter 1.50 PeopleBook: PeopleCode Developer's Guide. All Rights Reserved. The valid values are: 196 Copyright © 1988." Using File Attachments in Applications DeleteEmailAddress Syntax DeleteEmailAddress(Type) Description Use the DeleteEmailAddress function to delete the email address associated with the specified type for the current user. DetachAttachment. DeleteAttachment. If the email address you want to delete is marked as the primary email address. page 37. you must mark another email address as primary before you can delete the email address you want to delete. Chapter 1. You can only delete the Primary Email Address if it's the only address. page 682 Enterprise PeopleTools 8." ViewAttachment. You can only have one email address of a specific type for a user." AddAttachment. "PeopleCode Built-in Functions.PeopleCode Built-in Functions Chapter 1 The actual page definition involved.

page 83 and Chapter 1.Chapter 1 PeopleCode Built-in Functions Value Description BB BUS HOME OTH WORK Blackberry email address Business email address Home email address Other email address Work email address Returns None. "PeopleCode Built-in Functions. [SCROLL. be sure that PSIMAGEVER field is also on the same record as the image field being updated. Note.]fieldname) where scrollpath is: [SCROLL. To update an image field using this function. page 48. All Rights Reserved. Chapter 1. Oracle and/or its affiliates. 2009." ChangeEmailAddress." MarkPrimaryEmailAddress. See Also Chapter 1. "PeopleCode Built-in Functions.]] SCROLL.level2_recname. 197 ." AddEmailAddress. page 451 DeleteImage Syntax DeleteImage(scrollpath.target_row. Parameters Parameter Description scrollpath A construction that specifies a scroll area in the component buffer. Copyright © 1988.level1_recname. "PeopleCode Built-in Functions. [recordname.level2_row.level1_row. target_recname Description Use the DeleteImage function to remove an image associated with a record field.

Use the Delete record class method instead. Oracle and/or its affiliates. "PeopleCode Built-in Functions." Delete and Enterprise PeopleTools 8. like DeleteRow. It cannot be used from SavePostChange or WorkFlow PeopleCode. and exits the component. Example &Rslt = DeleteImage(EMPL_PHOTO.PeopleCode Built-in Functions Chapter 1 Parameter Description target_row [recordname. At save time the row is actually deleted from the database and cleared from the buffer. "Record Class. The name of the field asThe recordname prefix is not required if the program that calls DeleteImage is on the recordname record definition. initially marks the record or row as needing to be deleted. This function works only if the PeopleCode is on a level-zero field.]fieldname The row number of the target row. See Also Chapter 1. page 419 DeleteRecord Syntax DeleteRecord(level_zero_recfield) Description Use the DeleteRecord function to remove a high-level row of data and all dependent rows in other tables from the database. See Also Enterprise PeopleTools 8. DeleteRecord deletes the component's level-zero row from the database. Returns Returns a Boolean value: True if image was successfully deleted.EMPLOYEE_PHOTO). 2009. All Rights Reserved. This function remains for backward compatibility only. Note. This function. "Accessing the Data Buffer" 198 Copyright © 1988.50 PeopleBook: PeopleCode Developer's Guide. .50 PeopleBook: PeopleCode API Reference. False otherwise. deletes any dependent rows in other tables from the database." InsertImage.

Note. Description Use the DeleteRow function to delete rows programmatically. See Enterprise PeopleTools 8. target_recname To prevent ambiguous references. ]] RECORD. This function remains for backward compatibility only." DeleteRow.EMPLOYEE_ID_DELETE then &success = DeleteRecord(EMPLID).level1_row. deletes the high-level row and all dependent rows in other tables if the current page is EMPLOYEE_ID_DELETE.fieldname reference identifying any field on the level-zero area of the page. "PeopleCode Built-in Functions. See Also Chapter 1." DeleteRow.Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description level_zero_recfield A recordname. page 199 DeleteRow Syntax DeleteRow(scrollpath. where scrollname is the same as the scroll level's primary record name.scrollname. Copyright © 1988. Example The following example. 2009.level2_row. 199 . you can also use SCROLL. target_row) Where scrollpath is: [RECORD. [RECORD. All Rights Reserved. end-if. Returns Optionally returns a Boolean value indicating whether the deletion was completed successfully.level1_recname. if %Page = PAGE.50 PeopleBook: PeopleCode API Reference. which is in SavePreChange PeopleCode on a level-zero field. "Rowset Class. Oracle and/or its affiliates.level2_recname. Use the DeleteRow rowset class method instead.

you have to process rows from high to low to achieve the correct results. or from a lower scroll level. you must delete from the bottom up rather than from the top down. See Also Enterprise PeopleTools 8. as if an user had manually deleted a row. &L1). page 422 and Enterprise PeopleTools 8. Returns Boolean (optional). . Example In the following example DeleteRow is used in a For loop. including the use of the -1 in the Step clause to loop from the highest to lowest values. End-If. "Referencing Data in the Component Buffer. DeleteRow returns a Boolean value indicating whether the deletion was completed successfully.50 PeopleBook: PeopleCode Developer's Guide. This ensures that the renumbering of the rows will not affect the loop. Enterprise PeopleTools 8." DeleteRow. Note the syntax of the For loop. 2009. The row number of the row to delete. If None(&SECTION.50 PeopleBook: PeopleCode API Reference.1 &SECTION = FetchValue(AE_STMT_TBL. "Referencing Data in the Component Buffer. When DeleteRow is used in a loop. then conditionally deletes the row. "Accessing the Data Buffer" and Enterprise PeopleTools 8. "PeopleCode Built-in Functions. that is. &STEP) Then DeleteRow(RECORD. &L1).PeopleCode Built-in Functions Chapter 1 A call to this function causes the RowDelete event sequence to fire." Specifying Data with References Using Scroll Path Syntax and Dot Notation Parameters Parameter Description scrollpath target_row A construction that specifies a scroll level in the component buffer.50 PeopleBook: PeopleCode Developer's Guide. All Rights Reserved. For &L1 = &X1 To 1 Step .AE_STEP. End-For." InsertRow. DeleteRow cannot be executed from the same scroll level where the deletion will take place.AE_STMT_TBL. Place the PeopleCode in a higher scroll level record. &L1)." Specifying Data with References Using Scroll Path Syntax and Dot Notation 200 Copyright © 1988. The example checks values in each row. &STEP = FetchValue(AE_STMT_TBL. "Rowset Class. This is necessary because the rows are renumbered after they are deleted (if you delete row one. row two becomes row one).50 PeopleBook: PeopleCode Developer's Guide.AE_SECTION. See Also Chapter 1. Oracle and/or its affiliates.

This is to avoid locking critical Tools tables and hence freezing all other users. and your PeopleCode program terminates. Copyright © 1988.sqlname or a string value giving the sqlname. Parameters Parameter Description sqlname Specify the name of a SQL definition. DeleteSQL does not delete anything. Oracle and/or its affiliates. or by using Application Designer. you must create a base statement before you can create other types of statements. 201 . dbtype[.]sqlname[. You must commit all database changes prior to using this function. If you specify a base (generic) statement to be deleted. effdt]]) Description Use the DeleteSQL function to programmatically delete a SQL definition. either using the CreateSQL and StoreSQL functions. 2009. and returns False. All Rights Reserved. one that has a dbtype as GENERIC and effdt as the null date (or Date(19000101)). The SQL definition must have already been created and saved. You receive a runtime error message if you try to use this function when there are pending database updates. You need to commit any database updates prior to using this function. The CommitWork PeopleCode function has been enhanced to allow this. If you specify a non-generic statement that ends up matching the generic statement. When you create a SQL definition. This is either in the form SQL.Chapter 1 PeopleCode Built-in Functions DeleteSQL Syntax DeleteSQL([SQL. that is. all statements as well as the generic statement are deleted.

) Example The following code deletes the ABCD_XY SQL definition for the current DBType and as of date: &RSLT = DeleteSQL(SQL. 2009. All Rights Reserved. These values are not case sensitive: • • • • • • • APPSRV DB2ODBC DB2UNIX INFORMIX MICROSFT ORACLE SYBASE Note. If dbtype isn't specified or is null (""). effdt Specify the effective date associated with the SQL definition. . date in incorrect format. The following code deletes the ABCD_XY SQL Definition for the current DBType and November 3. Oracle and/or its affiliates. "". and so on. and terminates with an error message if there was another problem (that is.Date(19981103)).PeopleCode Built-in Functions Chapter 1 Parameter Description dbtype Specify the database type associated with the SQL definition. 1998: &RSLT = DeleteSQL(SQL. This parameter takes a string value. it set by default to the current database type (the value returned from the %DbName system variable. Database platforms are subject to change. Returns A Boolean value: True if the delete was successful. 202 Copyright © 1988. that is. the value returned from the %AsOfDate system variable.) Valid values for dbtype are as follows. False if the specified SQL statement wasn't found.ABCD_XY. it is set by default to the current as of date.ABC_XY). If effdt isn't specified. If NOT(&RSLT) Then /* SQL not found − do error processing */ End-if.

"PeopleCode Built-in Functions. "PeopleCode Built-in Functions." GetSQL. This function is used in the PeopleCode for the Message Monitor." FetchSQL. Chapter 1.EndTime) Description Use the DeleteSystemPauseTimes function to delete pause times that occur on your system by adding a row to the system pause times table." %AsOfDate." %DbName. 2009.50 PeopleBook: PeopleCode API Reference. page 769 DeleteSystemPauseTimes Syntax DeleteSystemPauseTimes(StartDay. The values are: Value Description 0 1 2 3 4 5 Sunday Monday Tuesday Wednesday Thursday Friday Copyright © 1988. All Rights Reserved. page 160." CommitWork. Chapter 1." CreateSQL. page 623 and Chapter 1. 203 . page 389. "System Variables. page 773 Chapter 3. Pause times are set up in the Message Monitor. "PeopleCode Built-in Functions.Chapter 1 PeopleCode Built-in Functions See Also Chapter 1. Chapter 1. page 96 Enterprise PeopleTools 8.StartTime.EndDay. page 260. "SQL Class" Chapter 3. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. Parameters Parameter Description StartDay Specify a number from 0-6." StoreSQL. "System Variables. Oracle and/or its affiliates.

The values are: Value Description 0 1 2 3 4 5 6 Sunday Monday Tuesday Wednesday Thursday Friday Saturday Parameter Description EndTime Specify a time. since midnight. in seconds. All Rights Reserved. 204 Copyright © 1988. since midnight. False otherwise. Returns A Boolean value: True if the system pause time specified was deleted. Oracle and/or its affiliates. Specify a number from 0-6.PeopleCode Built-in Functions Chapter 1 Value Description 6 Saturday Parameter Description StartTime EndDay Specify a time. 2009. . in seconds.

"PeopleCode Built-in Functions. PeopleSoft recommends that you only use the DeQueue function in application pages that the MultiChannel Framework Console launches when agents accept or activate assigned tasks. Note. 15.agent ID) Description Once a task that has been placed in a queue by the EnQueue function and has been completed by the agent.50 PeopleBook: Integration Broker Service Operations Monitor. /* to force a save. Else &spt_changed = True.STARTINGDAY. 205 . */ If Not DeleteSystemPauseTimes(PSSPTIMES.Chapter 1 PeopleCode Built-in Functions Example Component Boolean &spt_changed.ENDINGDAY.task number. PSSPTIMES." AddSystemPauseTimes.ENDINGSECOND) Then Error MsgGetText(117. 2009.task type. "Understanding the Integration Broker Service Operations Monitor" DeQueue Syntax DeQueue(physical queue ID. /* deleting a system pause time interval. All Rights Reserved.⇒ PSSPTIMES. See Also Chapter 1. The queue server does not allow a task to be dequeued if the agent who owns that task is not logged on to that particular queue server. */ PSSPTIMES. page 50 Enterprise PeopleTools 8.STARTINGSECOND. PSSPTIMES. Oracle and/or its affiliates.MSGSPTNAME = " ". ""). End-If. Copyright © 1988. DoSave(). The queue server removes the task from the queue and subtracts the cost of that task from the agent's workload. use the DeQueue function to notify the queue server.

All Rights Reserved. You can retrieve the value from the query string in the URL of the application page launched by the MultiChannel Framework console. It is not valid for chat or voice tasks. Otherwise. The valid values are: task type • • email generic Note. using the GetParameter request class method with the value ps_qid. it returns a message number. The message set ID for MultiChannel Framework is 162. For example. It is a string value. You can retrieve the value from the query string in the URL of the application page launched by the MultiChannel Framework console. Use the GetParameter request class method with the value ps_tasknum. Oracle and/or its affiliates. Use the GetParameter request class method with the value ps_tasktype. This is the task number returned by the Enqueue function when the system first inserted the task into a queue. This is a string value. . This is a string value. agent ID Identifies the agent who processed the task. task number Uniquely identifies a particular task." You retrieve the current physical queue from the query string in the URL of the page launched by the MultiChannel Framework console.PeopleCode Built-in Functions Chapter 1 Parameters Parameter Description physical queue ID The physical queue is the internal representation of the logical queue that the agent signs onto and to which the task currently belongs. 206 Copyright © 1988. You can retrieve the value from the query string in the URL of the application page launched by the MultiChannel Framework console. Use the GetParameter request class method with the value ps_agentid. such as "sales3" or "marketing2. Specifies the type of task that an agent completed. This parameter is valid only for persistent tasks (email and generic). Returns Returns 0 for success. This is a string value. 2009. 1302 is returned when an invalid task type or no value is provided.

Value = %Request. 0. "Successfully dequeued. 2009. For example: Copyright © 1988.Value = %Request.MCF_TASKNUM.Value = %Request. "". in the form of: URL.MCF_TASKNUM.MCF_TASKTYPE.Value = %Request. &nret = DeQueue(PSMCFFUNCLIB. All Rights Reserved. PSMCFFUNCLIB. PSMCFFUNCLIB.GetParameter("ps_agentid").MCF_QUEUE. The file is sent to the browser with appropriate HTTP headers to cause the browser to display a save dialog box to the user.GetParameter("ps_tasktype").GetParameter("ps_tasknum")." EnQueue.Chapter 1 PeopleCode Built-in Functions Example PSMCFFUNCLIB. The user can save the copy of the file with any filename. If you want to use a different port you must specify it in the URL. 207 . URLDestination will be either of the following: • A URL definition. in the form of: protocol://FTP_user_ID:FTP_password@FTP_server_address/path where protocol is "ftp" or "ftps". and path is the path on the FTP server relative to the directory specified as the FTP server's root.MCF_QUEUE.").URLname • A string.DirAndFileName. "PeopleCode Built-in Functions. 0. PSMCFFUNCLIB.MCF_TASKTYPE. FTP Server Storage Considerations If your storage destination is a file server. FTP_server_address is the FTP server's name or its IP address. as part of FTP_server_address.MCF_AGENTID). The default FTP port is 21.GetParameter("ps_qid").UserFile [.PreserveCase]) Description Use the DetachAttachment function to enable a user to make a copy of an attached file on their local client system. End-If See Also Chapter 1. PSMCFFUNCLIB. Oracle and/or its affiliates.MCF_AGENTID. If &nret = 0 Then MessageBox(0. page 237 DetachAttachment Syntax DetachAttachment(URLSource.⇒ PSMCFFUNCLIB. PSMCFFUNCLIB.

PeopleCode Built-in Functions

Chapter 1

ftp://user:password@ftpserver.peoplesoft.com:6000/

Note. If the specified subdirectories do not exist this function tries to create them. If the file is transferred using secure FTP (FTPS), URLDestination must be a URL definition. SFTP is not supported. See Enterprise PeopleTools 8.50 PeopleBook: System and Server Administration, "Using PeopleTools Utilities," Adding Secure FTP (FTPS) URLs. The following limitations apply to the FTP URL: • • The FTP user name to is limited to 30 characters. The FTP password to is limited to 16 characters.

The length of the full URL is limited to 254 characters. Database Storage Considerations If your storage destination is a database table, URLDestination will be either of the following: • A URL definition, in the form of: URL.URLname • A string, in the form of:
record://MYRECORD

where MYRECORD is the record associated with a storage destination table. See Enterprise PeopleTools 8.50 PeopleBook: PeopleCode Developer's Guide, "Using File Attachments and PeopleCode," Using Attachment Functions. Restrictions on Use in PeopleCode Events DetachAttachment is a "think-time" function, which means that it shouldn't be used in any of the following PeopleCode events: • • • • • SavePreChange SavePostChange Workflow RowSelect Any PeopleCode event that fires as a result of a ScrollSelect (or one of its relatives) function calls, or a Select (or one of its relatives) rowset class method. If you want to transfer files in a "non-interactive" mode, with functions that aren't think-time, see the GetAttachment and PutAttachment functions. See Enterprise PeopleTools 8.50 PeopleBook: PeopleCode Developer's Guide, "Using Methods and Built-In Functions," Think-Time Functions.

208

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

Chapter 1

PeopleCode Built-in Functions

File Name Considerations If the local source file name has any of the following characters, the process will be stopped and an error (%Attachment_Failed) will be returned to user. The actual error message can be found in the logs. • • • • • • * (asterisk) : (colon) " (quotation mark) < (less than symbol) > (greater than symbol) ? (question mark)

When the file is transferred, the following characters are replaced with an underscore: • • • • • • • • • (space) ; (semicolon) + (plus sign) % (percent sign) & (ampersand) ' (apostrophe) ! (exclamation point) # (pound sign) $ (dollar sign)

Note. In general, you should exercise caution when using an '@' or ':' character in the name of a file selected for uploading or in the value of the URLDestination or DirAndFileName parameter. Of course, the ':' character must to be used as a delimiter between the FTP user ID and the FTP password or just before the FTP port number (if one is specified), and the '@' character must be used as a delimiter between the FTP password and the FTP server address. Considerations Attaching Text Files The PeopleCode file attachment functions do not provide text file conversions when files are attached or viewed. In fact, when any file is uploaded, it is always copied to the specified destination byte-for-byte Warning! You may encounter problems when a text file is uploaded from one operating system or environment and then later viewed on another. For instance, suppose a text file on a DB2 system is encoded in EBCDIC. A user viewing that file in a Windows environment might see garbled content because the text file viewer is expecting ANSI encoding. Similar issues can occur when two file systems have different character sets, such as Japanese JIS and Unicode, or different line endings.

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

209

PeopleCode Built-in Functions

Chapter 1

It is the developer's responsibility to manage this issue in their environments. A number of text file conversion utilities are available for various platforms. Some steps you can take to avoid conversion problems include: • • • • Educate your users. Standardize on file formats and encodings. Make sure that the user's environment supports the files being transferred. Restrict attachments to file types that are known to be compatible across user platforms.

File Size Considerations You may need to increase the heap size of your server if you are trying to detach files that are approximately five MB or larger. This size may differ depending on your servers and configuration. If the heap size is too small, you may receive an out of memory error. See Enterprise PeopleTools 8.50 PeopleBook: Integration Testing Utilities and Tools, "Using the Simple Post Utility," Increasing the Java Heap Size to Accommodate Posting Large Files.

Parameters
Parameter Description

URLSource

A reference to a URL. This can be either a URL name, in the form URL. URLName, or a string. The URLSource parameter requires forward slashes ("/"). Backward slashes ("\") are not supported for this parameter. The source directory specified by a full FTP URL will be taken to be relative to the FTP root directory (which may not be the same as the root directory of the FTP server machine). If the file is transferred using secure FTP (FTPS), URLSource must be a URL definition. See Enterprise PeopleTools 8.50 PeopleBook: System and Server Administration, "Using PeopleTools Utilities," Adding Secure FTP (FTPS) URLs.

DirAndFileName

The relative path and filename of the file on the file server. This is appended to URLSource to make up the full URL where the file is transferred from. This parameter takes a string value. Note. The URLSource requires "/" slashes. Because SysFileName is appended to the URL, it also requires only "/" slashes. "\" are NOT supported in any way for either the URLSource or the SysFileName parameter.

UserFile

The default file name provided by the Detach dialog.

210

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

Chapter 1

PeopleCode Built-in Functions

Parameter

Description

PreserveCase

Specify a Boolean value to indicate whether when searching for the file specified by the DirAndFileName parameter, its filename extension is preserved or not; True, preserve the case, False, convert the filename extension to all lowercase letters. The default value is False. Warning! If you use the PreserveCase parameter, it is important that you use it in a consistent manner with all the relevant file-processing functions or you may encounter unexpected file-not-found errors.

Returns
You can check for either an integer or a constant value:
Numeric Value Constant Value Description

0 1

%Attachment_Success %Attachment_Failed

File was transferred successfully. File transfer failed due to unspecified error. The following are some possible situations where %Attachment_Failed could be returned:

• • • • • •
2 %Attachment_Cancelled

Failed to initialize the process due to some internal error. Failed due to unexpected/bad reply from server. Failed to allocate memory due to some internal error. Failed due to timeout. Failed due to no-availability of space on FTP server. Failed to close SSL connection.

File transfer didn't complete because the operation was canceled by the user.

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

211

PeopleCode Built-in Functions

Chapter 1

Numeric Value

Constant Value

Description

3

%Attachment_FileTransferFailed

File transfer failed due to unspecified error during FTP attempt. The following are some possible situations where %Attachment_FileTransferFailed could be returned:

• • • • • •

Failed due to mismatch in file sizes. Failed to write to local file. Failed to store the file on remote server. Failed to read local file to be uploaded. No response from server. Failed to overwrite the file on remote server.

4

%Attachment_NoDiskSpaceAppServ No disk space on the application server. %Attachment_NoDiskSpaceWebServ No disk space on the web server. %Attachment_DestSystNotFound Cannot locate destination system for FTP. The following are some possible situations where %Attachment_DestSystNotFound could be returned:

5 7

• •

Improper URL format. Failed to connect to server mentioned.

212

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

Chapter 1

PeopleCode Built-in Functions

Numeric Value

Constant Value

Description

8

%Attachment_DestSysFailedLogin

Unable to login to destination system for FTP. The following are some possible situations where %Attachment_DestSysFailedLogin could be returned:

• • • • • • • •
9 %Attachment_FileNotFound

Unsupported protocol mentioned. Access denied to server. Failed to connect using SSL Failed to verify the certificates. Failed due to problem in certificates used. Could not authenticate the peer certificate. Failed to login with specified SSL level. Remote server denied logon. Problem reading SSL certificate .

Cannot locate file. The following are some possible situations where %Attachment_FileNotFound could be returned:

• •

Remote file not found. Failed to read remote file.

Example
&retcode = DetachAttachment(URL.MYFTP, ATTACHSYSFILENAME, ATTACHUSERFILE);

The PeopleTools Test Utilities page (PeopleTools, Utilities, Debug, PeopleTools Test Utilities) contains a sample file attachment application. The page allows you to enter a storage location (an FTP site or a record) and upload a file to that storage location by clicking the Attach button on this page. Once the selected file has been successfully uploaded, buttons appear that allow you to view, detach, and delete that file from its storage location. Note that this demonstration application only permits the user to enter a URL of up to 120 characters.

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

213

PeopleCode Built-in Functions

Chapter 1

The actual page definition involved, PSTESTUTIL, contains buttons that execute FieldChange PeopleCode programs on the FILE_ATTACH_WRK record definition. These programs are provided as working examples of how to use the file attachment functions AddAttachment, DeleteAttachment, DetachAttachment, and ViewAttachment. You can clone the FILE_ATTACH_WRK record definition and customize the programs to fit your file processing requirements. Note. Oracle recommends that you do not modify the delivered FILE_ATTACH_WRK record definition or the PeopleCode programs it contains, or directly call those PeopleCode programs from any PeopleCode you implement. These sample programs could possibly be changed in a future version of PeopleTools. See Also Chapter 1, "PeopleCode Built-in Functions," AddAttachment, page 37; Chapter 1, "PeopleCode Built-in Functions," CopyAttachments, page 124; Chapter 1, "PeopleCode Built-in Functions," DeleteAttachment, page 191; Chapter 1, "PeopleCode Built-in Functions," GetAttachment, page 326; Chapter 1, "PeopleCode Built-in Functions," PutAttachment, page 499 and Chapter 1, "PeopleCode Built-in Functions," ViewAttachment, page 682 Enterprise PeopleTools 8.50 PeopleBook: PeopleCode Developer's Guide, "Using File Attachments and PeopleCode," Using File Attachments in Applications

DisableMenuItem
Syntax
DisableMenuItem(BARNAME.menubar_name,ITEMNAME.menuitem_name)

Description
Use the DisableMenuItem function to disable (make unavailable) the specified menu item. To apply this function to a pop-up menu, use the PrePopup Event of the field with which the pop-up menu is associated. If you're using this function with a pop-up menu associated with a page (not a field), the earliest event you can use is the PrePopup event for the first "real" field on the page (that is, the first field listed in the Order view of the page in Application Designer.) Restrictions on Use With a Component Interface This function is ignored (has no effect) when used by a PeopleCode program that's been called by a Component Interface.

Parameters
Parameter Description

menubar_name

Name of the menu bar that owns the menu item, or, in the case of pop-up menus, the name of the pop-up menu that owns the menu item.

214

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

Chapter 1

PeopleCode Built-in Functions

Parameter

Description

menuitem_name

Name of the menu item.

Returns
None.

Example
DisableMenuItem(BARNAME.MYPOPUP1, ITEMNAME.DO_JOB_TRANSFER);

See Also Chapter 1, "PeopleCode Built-in Functions," EnableMenuItem, page 227 and Chapter 1, "PeopleCode Built-in Functions," HideMenuItem, page 407 Enterprise PeopleTools 8.50 PeopleBook: PeopleCode Developer's Guide, "PeopleCode and the Component Processor," PrePopup Event

DiscardRow
Syntax
DiscardRow()

Description
Use the DiscardRow function to prevent a row from being added to a page scroll during Row Select processing. This function is valid only in RowSelect PeopleCode. When DiscardRow is called during RowSelect processing, the current row is skipped (not added to the scroll). Processing then continues on the next row, unless the StopFetching function has also been called, in which case no more rows are added to the page. If you try to discard a row and it's the only row in the scroll, the row is not discarded. You will still have one blank row in your scroll. DiscardRow has the same functionality as the Warning function in the RowSelect event. The anomalous behavior of Warning is supported for compatibility with previous releases of PeopleTools. Note. RowSelect processing is used infrequently, because it is more efficient to filter out rows of data using a search view or an effective-dated record before the rows are selected into the component buffer from the database server.

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

215

PeopleCode Built-in Functions

Chapter 1

RowSelect Processing Logic

Parameters
None.

Returns
None. See Also Chapter 1, "PeopleCode Built-in Functions," StopFetching, page 622 and Chapter 1, "PeopleCode Built-in Functions," Warning, page 691 Enterprise PeopleTools 8.50 PeopleBook: PeopleCode Developer's Guide, "PeopleCode and the Component Processor," Row Select Processing

216

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

Chapter 1

PeopleCode Built-in Functions

DoCancel
Syntax
DoCancel( )

Description
Use the DoCancel function to cancel the current page. • • In the Page Applet, the DoCancel function terminates the current component and returns the user to the search dialog box. In the Menu Applet, the DoCancel function terminates the current component and returns the user to the current menu with no component active.

DoCancel terminates any PeopleCode programs executing prior to a save action. It does not stop processing of PeopleCode in SaveEdit, SavePreChange, and SavePostChange events.

Returns
None. See Also Chapter 1, "PeopleCode Built-in Functions," DoSave, page 224; Chapter 1, "PeopleCode Built-in Functions," DoSaveNow, page 225; Chapter 1, "PeopleCode Built-in Functions," DoModal, page 217; Chapter 1, "PeopleCode Built-in Functions," EndModal, page 235 and Chapter 1, "PeopleCode Built-in Functions," WinEscape, page 695

DoModal
Syntax
DoModal(PAGE.pagename, title, xpos, ypos, [level, scrollpath, target_row])

where scrollpath is:
[RECORD.level1_recname,level1_row, [RECORD.level2_recname,level2_row, ]] RECORD. target_recname

To prevent ambiguous references, you can also use SCROLL.scrollname, where scrollname is the same as the scroll level's primary record name.

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

217

PeopleCode Built-in Functions

Chapter 1

Description
Use the DoModal function to display a secondary page. Secondary pages are modal, meaning that the user must dismiss the secondary page before continuing work in the page from which the secondary page was called. If you call DoModal without specifying a level number or any record parameters, the function uses the current context as the parent. You can alternately specify a secondary page in a command push button definition without using PeopleCode. This may be preferable for performance reasons, especially with PeopleSoft Pure Internet Architecture. DoModal can display on a single page. To display an entire component modally, use DoModalComponent. Any variable declared as a Component variable will still be defined after using a DoModal function. See Enterprise PeopleTools 8.50 PeopleBook: PeopleSoft Application Designer Developer's Guide, "Using Page Controls," Using Secondary Pages. Restrictions on Use in PeopleCode Events Control does not return to the line after DoModal until after the user has dismissed the secondary page. This interruption of processing makes DoModal a "think-time" function, which means that it shouldn't be used in any of the following PeopleCode events: • • • • • • SavePreChange. SavePostChange. Workflow. RowSelect. Any PeopleCode event that fires as a result of a ScrollSelect (or one of its relatives) function calls, or a Select (or one of its relatives) Rowset class method. You should not use DoModal or any other think-time function in FieldChange when the field is associated with an edit box, long edit box, or drop-down list box. Use FieldEdit instead. DoModal can be used in FieldChange when the field is associated with a push button, radio button, checkbox, or hyperlink.

In addition, you can't use this function in the SearchInit event. See Enterprise PeopleTools 8.50 PeopleBook: PeopleCode Developer's Guide, "Using Methods and Built-In Functions," Think-Time Functions. Restrictions on Use With a Component Interface This function is ignored (has no effect) when used by a PeopleCode program that's been called by a Component Interface.

218

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

Chapter 1

PeopleCode Built-in Functions

Considerations Using Exceptions and the DoModal Function Using the DoModal function inside a try block not catch PeopleCode exceptions thrown in the new component. Starting a new component starts a brand new PeopleCode evaluation context. Catches are only caught for exceptions thrown within the current component. In the following code example, the catch statement only catches exceptions thrown in the code prior to the DoModal, but not any exceptions that are thrown within the new component.
/* Set up transaction */ If %CompIntfcName = "" Then try &oTrans = &g_ERMS_TransactionCollection.GetTransactionByName(RB_EM_⇒ WRK.DESCR); &sSearchPage = &oTrans.SearchPage; &sSearchRecord = &oTrans.SearchRecord; &sSearchTitle = &oTrans.GetSearchPageTitle(); If Not All(&sSearchPage, &sSearchRecord, &sSearchTitle) Then Error (MsgGetText(17834, 8081, "Message Not Found")); End-If; &c_ERMS_SearchTransaction = &oTrans; /* Attempt to transfer to hidden search page with configurable filter */ &nModalReturn = DoModal(@("Page." | &sSearchPage), &sSearchTitle, - 1, - 1); catch Exception &e Error (MsgGetText(17834, 8082, "Message Not Found")); end-try;

Parameters
Parameter Description

pagename title xpos

The name of the secondary page. The text that displays in the caption of the secondary page. The pixel coordinates of the top left corner of the secondary page, offset from the top left corner of the parent page (the default of -1, -1 means centered). The pixel coordinates of the top right corner of the secondary page, offset from the top right corner of the parent page (the default of -1, -1 means centered). Specifies the level of the scroll level on the parent page that contains the row corresponding to level 0 on the secondary page. A construction that specifies a scroll level in the component buffer. The row number of the row in the parent page corresponding to the level 0 row in the secondary page.

ypos

level

scrollpath target_row

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

219

PeopleCode Built-in Functions

Chapter 1

Returns
Returns a number that indicates how the secondary page was terminated. A secondary page can be terminated by the user clicking a built-in OK or Cancel button, or by a call to the EndModal function in a PeopleCode program. In either case, the return value of DoModal is one of the following: • • 1 if the user clicked OK in the secondary page, or if 1 was passed in the EndModal function call that terminated the secondary page. 0 if the user clicked Cancel in the secondary page, or if 0 was passed in the EndModal function call that terminated the secondary page.

Example
DoModal(PAGE.EDUCATION_DTL, MsgGetText(1000, 167, "Education Details - %1",⇒ EDUCATN.DEGREE), - 1, - 1, 1, RECORD.EDUCATN, CurrentRowNumber());

See Also Chapter 1, "PeopleCode Built-in Functions," EndModal, page 235; Chapter 1, "PeopleCode Built-in Functions," IsModal, page 436 and Chapter 1, "PeopleCode Built-in Functions," DoModalComponent, page 220 Enterprise PeopleTools 8.50 PeopleBook: PeopleCode Developer's Guide, "Referencing Data in the Component Buffer," Specifying Data with References Using Scroll Path Syntax and Dot Notation

DoModalComponent
Syntax
DoModalComponent(MENUNAME.menuname,BARNAME.barname,ITEMNAME.menuitem_name,PAGE. component_item_name,action,RECORD.shared_record_name [, keylist])

where keylist is a list of field references in the form:
[recordname.]field1 [, [recordname.]field2]. . .

Or
&RecordObject1 [, &RecordObject2]. . .

Description
Use the DoModalComponent function to launch a modal component. The modal component launches from within an originating component. After the modal component displays, the user can't proceed with changes to the originating component until either accepting or canceling the modal component.

220

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

Chapter 1

PeopleCode Built-in Functions

Modal components can be displayed in any of the following action modes: Add, Update/Display, Update/Display All, Correction. A modal component can be launched from any component, including another modal component. You can use DoModalComponent from a secondary page. The originating component and the modal component share data, including search keys, using a Shared Work Record or the values in the fieldlist parameter. If valid search keys are provided in the shared work record and populated with valid values before launching the modal component, the search is conducted using the provided search key values. If the fieldlist parameter isn't used and no search keys are provided, or if search key fields contain invalid values, the user accesses the modal component using a search dialog box. Note. The user may see a different title for a search page if they enter the search page using this function versus from the regular navigation. In the component_item_name parameter, make sure to pass the component item name for the page, not the page name. The component item name is specified in the Component Definition, in the Item Name column on the row corresponding to the specific page, as shown here:

Component Item Name parameter

Shared Work Records The originating component and the modal component share fields in a Derived/Work record called a shared work record. Shared fields from this record must be placed at level zero of both the originating component and the modal component. You can use the shared fields to: • • • Pass values that are assigned to the search keys in the modal component search record. If these fields are missing or not valid, the search dialog box appears, enabling the user to enter search keys. Optionally pass other values from the originating component to the modal component. Pass values back from the modal component to the originating component for processing.

To do this, you have to write PeopleCode that: • • • Assigns values to fields in the shared work record in the originating page at some point before the modal transfer takes place. Accesses and changes the values, if necessary, in the modal component. Accesses the values from the shared work record from the originating component after the modal component is dismissed.

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

221

PeopleCode Built-in Functions

Chapter 1

Restrictions on Use With a Component Interface This function is ignored (has no effect) when used by a PeopleCode program that's been called by a Component Interface. Restrictions on Use With SearchInit Event You can't use this function in a SearchInit PeopleCode program. Considerations Using Exceptions and the DoModalComponent Function Using the DoModalComponent function inside a try block not catch PeopleCode exceptions thrown in the new component. Starting a new component starts a brand new PeopleCode evaluation context. Catches are only caught for exceptions thrown within the current component. In the following code example, the catch statement only catches exceptions thrown in the code prior to using a DoModal function, but not any exceptions that are thrown within the new component.
/* Set up transaction */ If %CompIntfcName = "" Then try &oTrans = &g_ERMS_TransactionCollection.GetTransactionByName(RB_EM_⇒ WRK.DESCR); &sSearchPage = &oTrans.SearchPage; &sSearchRecord = &oTrans.SearchRecord; &sSearchTitle = &oTrans.GetSearchPageTitle(); If Not All(&sSearchPage, &sSearchRecord, &sSearchTitle) Then Error (MsgGetText(17834, 8081, "Message Not Found")); End-If; &c_ERMS_SearchTransaction = &oTrans; /* Attempt to transfer to hidden search page with configurable filter */ &nModalReturn = DoModal(@("Page." | &sSearchPage), &sSearchTitle, - 1, - 1); catch Exception &e Error (MsgGetText(17834, 8082, "Message Not Found")); end-try;

Parameters
Parameter Description

menuname barname menuitem_name component_item_name

Name of the menu through which the modal component is accessed. Name of the menu bar through which the modal component is accessed. Name of the menu item through which the modal component is accessed. The component item name of the page to be displayed on top of the modal component when it displays. The component item name is specified in the component definition. String representing the action mode in which to start up the component. You can use either a character value (passed in as a string) or a constant:

action

222

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

Chapter 1

PeopleCode Built-in Functions

Numeric Value

Constant Value

Description

A U L C E P

%Action_Add %Action_UpdateDisplay %Action_UpdateDisplayAll %Action_Correction %Action_DataEntry %Action_Prompt

Add Update/Display Update/Display All Correction Data Entry Prompt

Parameter

Description

If only one action mode is allowed for the component, that action mode is used. If more than one action mode is allowed, the user can select which mode to come up in. shared_record_name The record name of the shared work record (preceded by the reserved word Record). This record must include:

Fields that are search keys in the modal component search record; if search key fields are not provided, or if they are invalid, the user accesses the modal component using the search dialog box. Other fields to pass to the modal component. Fields to get back from the modal component after it has finished processing.

• •
keylist

An optional list of field specifications used to select a unique row at level zero in the page you are transferring to, by matching keys in the page you are transferring from. It can also be an already instantiated record object. If a record object is specified, any field of that record object that is also a field of the search record for the destination component is added to keylist. The keys in fieldlist must uniquely identify a row in the "to" page search record. If a unique row is not identified, the search dialog box appears. If the keylist parameter is not supplied then the destination components' search key must be found as part of the source component's level 0 record buffer.

Returns
Returns a Boolean that indicates how the secondary page was terminated. A secondary page can be terminated by the user clicking a built-in OK or Cancel button, or by a call to the EndModalComponent function in a PeopleCode program. In either case, the return value of DoModalComponent is one of the following: • True if the user clicked OK in the secondary page, or if 1 was passed in the EndModal function call that terminated the secondary page.

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

223

PeopleCode Built-in Functions

Chapter 1

False if the user clicked Cancel in the secondary page, or if 0 was passed in the EndModal function call that terminated the secondary page.

Example
The following example shows how to structure a DoModalComponent function call:
DoModalComponent(MENUNAME.MAINTAIN_ITEMS_FOR_INVENTORY, BARNAME.USE_A,⇒ ITEMNAME.ITEM_DEFINITION, COMPONENT.ESTABLISH_AN_ITEM, "C", RECORD.NEW7_WRK);

Supporting PeopleCode is required if you must assign values to fields in the shared work record or access those values, either from the originating component, or from the modal component. See Also Chapter 1, "PeopleCode Built-in Functions," IsModalComponent, page 437; Chapter 1, "PeopleCode Built-in Functions," Transfer, page 642; Chapter 1, "PeopleCode Built-in Functions," TransferPage, page 658 and Chapter 1, "PeopleCode Built-in Functions," EndModalComponent, page 236 Enterprise PeopleTools 8.50 PeopleBook: PeopleCode Developer's Guide, "Using Methods and Built-In Functions," Implementing Modal Transfers

DoModalPanelGroup
Syntax
DoModalPanelGroup(MENUNAME.menuname,BARNAME.barname,ITEMNAME.menuitem_name, PANEL.panel_group_item_name,action,RECORD.shared_record_name)

Description
Use the DoModalPanelGroup function to launch a modal component. Note. The DoModalPanelGroup function is supported for compatibility with previous releases of PeopleTools. Future applications should use DoModalComponent instead. See Also Chapter 1, "PeopleCode Built-in Functions," DoModalComponent, page 220

DoSave
Syntax
DoSave()

224

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

and Workflow PeopleCode) to be executed immediately. Copyright © 1988. TransferPage( ). Chapter 1. ClearKeyListItem( ). Returns None." DoCancel. page 658 and Chapter 1. SavePreChange. which causes save processing (including SaveEdit. AddKeyListItem(REQUEST_ID. SetNextPage("PAGE_2"). "PeopleCode Built-in Functions. Oracle and/or its affiliates. or MenuItemSelected PeopleCode. See Also Chapter 1. saves the current page. All Rights Reserved. It is generally necessary to call DoSaveNow before calling the RemoteCall function. 225 . "PeopleCode Built-in Functions. FieldChange. DoSave can be used only in FieldEdit.Chapter 1 PeopleCode Built-in Functions Description Use the DoSave function to save the current page. Chapter 1. "PeopleCode Built-in Functions. SavePostChange. Example The following example sets up a key list with AddKeyListItem. REQUEST_ID). DoSave defers processing to the end of the current PeopleCode program event." DoSaveNow. DoSave( ). Parameters None. page 49 DoSaveNow Syntax DoSaveNow() Description The DoSaveNow function is designed primarily for use with remote calls." AddKeyListItem. AddKeyListItem(OPRID." TransferPage. as distinct from DoSaveNow. It enables a PeopleCode program to save page data to the database before running a remote process (most frequently a COBOL process) that will access the database directly. page 225. and then transfers the user to a page named PAGE_2. 2009. OPRID). page 217. "PeopleCode Built-in Functions.

See Chapter 1. Save processing (including SaveEdit. Oracle and/or its affiliates. You should be aware that DoSaveNow may result in unpredictable behavior if PeopleCode in save events deletes rows or inserts rows into scrolls. Transfer. PeopleCode that runs after DoSaveNow must be designed around the possibility that rows were deleted or inserted (which causes row number assignments to change). and Workflow PeopleCode) is executed before continuing execution of the program where DoSaveNow is called. page 518 and Chapter 1. DoSaveNow differs from the DoSave function in that DoSave defers saving the component until after any running PeopleCode is completed. Note. save processing is skipped entirely. but not afterward. it displays the appropriate fatal error. TransferPage. "PeopleCode Built-in Functions. Components that use DoSaveNow must not use the DoCancel. SavePreChange. The SetComponentChanged function makes the Component Processor think there are changes and so will force full save processing. Errors in DoSaveNow Save Processing DoSaveNow initiates save processing. Modifying data on a deleted row may cause it to become "undeleted. The user can correct the error and continue.PeopleCode Built-in Functions Chapter 1 DoSaveNow causes the current page to be saved immediately. DoSaveNow is only allowed prior to the first CallAppEngine function in a FieldChange event. because these functions terminate the component. If you call DoSaveNow and there are no changes to save." RemoteCall. It handles errors that occur during save processing as follows: • If save processing encounters a SaveEdit error. TransferPage. and EndModal functions. DoSaveNow immediately exits from the originating FieldChange or FieldEdit program. . • • Restrictions on Use of DoSaveNow The following restrictions apply: • • • • DoSaveNow can be executed only from a FieldEdit or FieldChange event. it displays the appropriate message box. Deferred operations should not be called before the DoSaveNow. SavePreChange." DoSave. If save processing encounters a fatal error. DoSaveNow can only be called from a FieldEdit or FieldChange event. DoSaveNow handles the error by immediately exiting from the originating FieldChange or FieldEdit program. which would cause the program from which DoSaveNow was called to terminate prematurely. SavePostChange. 226 Copyright © 1988. page 224." Parameters None. If save processing completes with no errors. "PeopleCode Built-in Functions. or WinEscape functions in PeopleCode attached to save action events (SaveEdit. SetCursorPos. PeopleCode execution continues on the line after the DoSaveNow call in FieldChange or FieldEdit. and SavePostChange). You can call SetComponentChanged right before you call DoSaveNow. The user must then cancel the page. Deferred operations include the DoSave. 2009. All Rights Reserved.

EXPRESS_ISSUE_INV Then DoSaveNow(). &SHIP_ID = FetchValue(SHIP_HDR_INV. 2009. the earliest event you can use is the PrePopup event for the first "real" field on the page (that is. &PROGRAM_STATUS). &SHIP_ID. &SHIP_OPTION.run Depletion job through RemoteCall() */ If %Component = COMPONENT. To apply this function to a pop-up menu. End-If EnableMenuItem Syntax EnableMenuItem(BARNAME.ITEMNAME.menubar_name. /* Express Issue Page . use the PrePopup Event of the field with which the pop-up menu is associated.menuitem_name) Description Use the EnableMenuItem function to enable (make available for selection) the specified menu item. 227 .BUSINESS_UNIT. If you're using this function with a pop-up menu associated with a page (not a field).) Restrictions on Use With a Component Interface This function is ignored (has no effect) when used by a PeopleCode program that's been called by a Component Interface. &BUSINESS_UNIT = FetchValue(SHIP_HDR_INV. All Rights Reserved. Example The following example calls DoSaveNow to save the component prior to running a remote process in the remote_depletion declared function: Declare Function remote_depletion PeopleCode FUNCLIB_ININTFC.SHIP_ID. the first field listed in the Order view of the page in Application Designer. Oracle and/or its affiliates. remote_depletion(&BUSINESS_UNIT.RUN_DEPLETION Field⇒ Formula. &SHIP_OPTION = "S". Copyright © 1988. 1).Chapter 1 PeopleCode Built-in Functions Returns None. 1).

to the string specified by URLString. use the EncodeURLForQueryString function.50 PeopleBook: PeopleCode Developer's Guide." DisableMenuItem. 228 Copyright © 1988.PeopleCode Built-in Functions Chapter 1 Parameters Parameter Description menubar_name Name of the menu bar that owns the menu item. This function returns a string that contains the encoded URL. page 214 and Chapter 1. Name of the menu item. . The method used to encode the URLString is the standard defined by W3C. menuitem_name Returns None. All characters outside the Unicode Basic Latin block (U+0020 — U+007F) are encoded.DO_JOB_TRANSFER). "PeopleCode Builtin Functions.MYPOPUP1. See Also Chapter 1. Oracle and/or its affiliates. The following table lists the punctuation characters in the Unicode Basic Latin block that are not encoded by the URLEncode function. 2009. If you need to encode such characters. "PeopleCode Built-in Functions. page 407 Enterprise PeopleTools 8. with the exception of the characters in the table below which are not encoded as they may represent valid components of URL or protocol syntax. the name of the pop-up menu that owns the menu item. ITEMNAME. "PeopleCode and the Component Processor. All Rights Reserved. Example EnableMenuItem(BARNAME. or." HideMenuItem." PrePopup Event EncodeURL Syntax EncodeURL(URLString) Description Use the EncodeURL function to apply URL encoding rules. in the case of pop-up menus. including escape characters.

= ? _ Unicode Character Name Exclamation mark Number sign Dollar sign Ampersand Left parenthesis Right parenthesis Asterisk Plus sign Coma Hyphen. Oracle and/or its affiliates. period Solidus. All Rights Reserved. This parameter takes a string value. / : . 2009. . Returns An encoded string.Chapter 1 PeopleCode Built-in Functions Punctuation Character Description Glyph ! # $ & ( ) * + . minus Full stop. 229 . Copyright © 1988. slash Colon Semi-colon Equals sign Question mark Underscore Parameters Parameter Description URLString Specify the string you want encoded.

All Rights Reserved. and the value is a link field. . with the exception of the characters in the table below which are not encoded as they are typically valid in a query string.50 PeopleBook: PeopleCode API Reference. Oracle and/or its affiliates.com/hr/benefits/401k/401k_home. you should not call EncodeURL to encode the entire URL. minus 230 Copyright © 1988.office. "Internet Script Classes (iScript)" EncodeURLForQueryString Syntax EncodeURLForQueryString(URLString) Description Use the EncodeURLForQueryString function to encode URLString for use in a query string parameter in an URL. Always encode each field value being added directly to query strings using EncodeURLForQueryString.PeopleCode Built-in Functions Chapter 1 Example The example below returns the following encoded URL: http://corp. however. "PeopleCode Built-in Functions. The following table lists punctuation characters in the Unicode Basic Latin block that are not encoded by the URLEncodeForQueryString function. as the PeopleSoft Pure Internet Architecture does this for you. Punctuation Character Description ( ) * - Left parenthesis Right parenthesis Asterisk Hyphen." EncodeURLForQueryString. All characters outside the Unicode Basic Latin block (U+0020 — U+007F) are encoded. page 230 and Chapter 1. page 668 Enterprise PeopleTools 8. If the link is constructed in a page." Unencode.com/human%20resources/benefits/401kchange_home. "PeopleCode Built-in Functions. See Also Chapter 1.htm?FirstName=⇒ Gunter&LastName=D%c3%9crst &MYSTRING = EncodeURL("http://corp. You still need to unencode the parameter value when you retrieve it.office. 2009.htm").

Returns An encoded URL string. Len(&URL) &StartPos)). Oracle and/or its affiliates. -⇒ See Also Chapter 1.GetQualifiedURL("PortalServlet".Chapter 1 PeopleCode Built-in Functions Punctuation Character Description .QueryString | "&myurl=" | Encode⇒ URLForQueryString(&url). do the following: &url = "http://host/psp/ps/EMPLOYEE/HRMS/s/EMPL_INFO. All Rights Reserved." EscapeHTML.ContentProviders. page 668. period Underscore. the URL. &URL. "PeopleCode Built-in Functions. The following uses a generic method to find. 231 . "PortalOriginalURL=" |⇒ &CPColl. page 228.ItembyName(&CP_NAME). &LINK = &Portal. &StartPos + 1.RequestURI | "?" | %Request." EscapeWML. "PeopleCode Built-in Functions. then encode.50 PeopleBook: PeopleCode API Reference.URI | "?" | &strHREF).FieldFormula. Example In an Internet Script. 1). 2009. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." Unencode. page 242. low line Parameters Parameter Description URLString Specify the string you want encoded. "Internet Script Classes (iScript)" Copyright © 1988. Chapter 1. This parameter takes a string value. to construct an anchor with a URL in a query string parameter. %Response. _ Full stop." EscapeJavascriptString." EncodeURL.IScript_EMPL_⇒ INFO?emplid=1111&mkt=usa" &href = %Request. "PeopleCode Built-in Functions. page 245 Enterprise PeopleTools 8. &CPColl = &Portal.WriteLine("<a href= " | EncodeURL(&href) | ">My Link</a>"). page 244 and Chapter 1. Chapter 1. &strHREF = EncodeURLForQueryString(Substring(&URL. for the external link: &StartPos = Find("?". Chapter 1.

then the system multiplies the size by 4/3. .WRKTOKEN) Then CMPAUTHTOKEN = Encrypt("". that is. End-If. which is an even multiple of 8. The size of the output string is grown to the nearest multiple of 8 bytes. The value you use for KeyString must be the same for Decrypt and Encrypt. Size Considerations with Encrypt The Encrypt function uses 56 bit DES. 2009. which grows the resulting size to the next multiple of 3. then encoded. Specify the string you want encrypted. 232 Copyright © 1988. Parameters Parameter Description KeyString Specify the key used for encrypting the string. encrypted (which doesn't modify the size). RTrim(LTrim(PSCNFMRCHTOKEN. All Rights Reserved.WRKTOKEN))). Oracle and/or its affiliates. then multiplied by 4/3 to get 56 bytes. a 20 character field is 40 bytes long (unicode). It also removes any blanks either preceding or trailing the value. This function is generally used with merchant passwords. ClearTextString Returns An encrypted string. Example The following encrypts a field if it contains a value. For example. two quotation marks with no blank space between them (""). If All(PSCNFMRCHTOKEN.ClearTextString) Description Use the Encrypt function to encrypt a string. After it is encrypted.PeopleCode Built-in Functions Chapter 1 Encrypt Syntax Encrypt(KeyString. it is rounded up to 42 bytes (the next multiple of 3). You can specify a NULL value for this parameter.

See Also Enterprise PeopleTools 8. 233 . Parameters Parameter Description Password Specify the Integration Broker node password that you want encrypted.Chapter 1 PeopleCode Built-in Functions See Also Chapter 1. as once you encrypt your node password.IBPASSWORD = EncryptNodePswd(RTrim(LTrim(PSNODE_WRK. This function is generally used with Integration Broker node password encryption. Returns An encrypted password as a string. there is no decrypt PeopleCode method." Hash.50 PeopleBook: PeopleSoft Integration Broker Administration. All Rights Reserved. "Adding and Configuring Nodes" Copyright © 1988. "PeopleCode Built-in Functions. Example In the following example. 2009. page 189 and Chapter 1. "Understanding PeopleSoft Security" EncryptNodePswd Syntax EncryptNodePswd(Password) Description Use the EncryptNodePswd function to encrypt an Integration Broker node password. "PeopleCode Built-in Functions. as a string. Note. Oracle and/or its affiliates." Decrypt.WRKPASSWORD))). page 403 Enterprise PeopleTools 8. the password is stored in the database in an encrypted form instead of as plain text: PSMSGNODEDEFN. This function should not be used casually.50 PeopleBook: Security Administration.

Example The following example is from SavePostChange event PeopleCode. should be used instead. Because it terminates the SavePostChange program. 2009. The MessageBox function. and if so. if it is not. then processing continues in the Else clause: 234 Copyright © 1988. Terminates the SavePostChange PeopleCode program. Displays the message. which can now be used to display informational messages in any PeopleCode event. PeopleCode programs on other fields and rows execute as usual. A string that must be enclosed in quotes containing the title of the message. Oracle and/or its affiliates. at the time of the database COMMIT. PeopleTools: • • • Verifies that the function is in SavePostChange. Parameters Parameter Description message A string that must be enclosed in quotes containing the message text you want displayed. it displays a message and terminates the SavePostChange program. EndMessage is always be the last statement executed in the program on the specific field and row where the EndMessage is called. . The EndMessage function is obsolete and is supported only for backward compatibility. It checks to see whether a condition is true. messagebox_title Returns None. Use the EndMessage function to display a message at the end of a transaction. It appears in the message box title bar. All Rights Reserved. This function can be used only in SavePostChange PeopleCode.PeopleCode Built-in Functions Chapter 1 EndMessage Syntax EndMessage(message.messagebox_title) Description Note. For this reason. When an EndMessage function executes. an error occurs and the function terminates. you must write the SavePostChange program so that all necessary processing takes place before the EndMessage statement. If the condition is false.

"Message not found in Message Catalog"). It is required only for secondary pages that do not have OK and Cancel buttons. 12. page 456 and Chapter 1. Example The following statement acts as an OK button: Copyright © 1988. A positive value runs SaveEdit PeopleCode and copies the data (this is the same as clicking the OK button). then the function for exiting the page is built in and no PeopleCode is required. If the secondary page has OK and Cancel buttons." "). A value of zero skips SaveEdit and discards buffer changes made in the secondary page (this is the same as clicking the Cancel button). 2009. "PeopleCode Built-in Functions. Returns None. Oracle and/or its affiliates.Chapter 1 PeopleCode Built-in Functions If BUSINESS_UNIT = BUS_UNIT_WRK. 235 . Parameters Parameter Description returnvalue A Number value that determines whether the secondary page data is copied back to the parent page. Else /* any other SavePostChange processing in Else clause */ See Also Chapter 1. and it can be tested after the secondary page is closed. page 696 EndModal Syntax EndModal(returnvalue) Description Use the EndModal function to close a currently open secondary page." MessageBox. "PeopleCode Built-in Functions." WinMessage. This value becomes the return value of the DoModal function that started the secondary page. Restrictions on Use With a Component Interface This function is ignored (has no effect) when used by a PeopleCode program that's been called by a Component Interface. All Rights Reserved.DEFAULT_SETID Then EndMessage(MsgGet(20000.

"PeopleCode Built-in Functions. "PeopleCode Built-in Functions. A positive value saves the data in the component to the database. It also copies the data in the shared work record. The following statement acts as a Cancel button: EndModal(0). page 436 EndModalComponent Syntax EndModalComponent(ReturnValue) Description Use the EndModalComponent function to close a currently open secondary component. Restrictions on Use With a Component Interface This function can't be used by a PeopleCode program that's been called by a Component Interface. All Rights Reserved. page 217 and Chapter 1. A value of zero skips save processing discards buffer changes made in the modal component (this is the same as pressing the Cancel button). and is ignored." IsModal. . Returns A Boolean value: True if a non-zero value was used. Oracle and/or its affiliates.PeopleCode Built-in Functions Chapter 1 EndModal(1). 2009. See Also Chapter 1. False if zero was used." DoModal. including all save processing and PeopleCode (this is the same as pressing the OK button). if any. back to the primary component. Parameters Parameter Description ReturnValue A Number value that determines whether the modal component data is saved and copied back to the parent page. Example EndModalComponent(0). You could use this for creating your own links to exit a modal component. /* cancels the component without saving */ 236 Copyright © 1988.

agent ID ][. Chat tasks are enqueued using the InitChat function. overflow timeout][. escalation timeout][. physical queues belonging to the specified logical queue. task type Specifies the type of task to be inserted. "PeopleCode Built-in Functions. skill level]) Description Use the EnQueue function to assign a task to one of the active. The logical queue ID is a case-sensitive value. See Chapter 1. page 476. 2009. page 436 EnQueue Syntax EnQueue(logical queue. Note. priority][. The valid values are: • • email generic Note. It is a string value. It is a string value.Language_Code [." DoModalComponent.Chapter 1 PeopleCode Built-in Functions EndModalComponent(1). Parameters Parameter Description logical queue ID Specifies the logical queue in which the task should be queued. Chapter 1. page 220. This parameter does not apply to voice or chat. Oracle and/or its affiliates. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. PeopleSoft recommends that you always follow the EnQueue function with the NotifyQ function." IsModal." EndModal. The physical queue to which the system assigns the task is chosen randomly to balance load across the queues. All Rights Reserved.Relative URL. page 235 and Chapter 1. /* saves and closes the component */ See Also Chapter 1. The case used in the EnQueue function must exactly match the case used when creating the logical queue ID with the MultiChannel Framework administration pages.task type. The application page should contain the logic to enable the agent to resolve the task and either forward the task using the Forward function or dequeue the task using the DeQueue function. cost][. Voice queueing is managed by PeopleSoft CTI. Copyright © 1988. Relative URL The system uses this relative URL to generate the URL of the appropriate application page for the MultiChannel Framework console to launch when an agent accepts this task." NotifyQ.subject][. "PeopleCode Builtin Functions. 237 .

the queue server assigns it to the first available agent. If the task is not accepted within this time. If the task is not closed within this time. Oracle and/or its affiliates. escalation timeout This is an optional parameter. 238 Copyright © 1988. agent ID overflow timeout This is an optional parameter. Specifies the assigned agent. It is a string value describing the purpose of the request. the task is removed from the queue and from the agent's accepted task list. The queue server only assigns this task to an agent whose list of languages contains this value. The overflow timeout is the time period within which a queue server has to find an agent who accepts the task (clicks on the flashing icon on the MultiChannel console).PeopleCode Built-in Functions Chapter 1 Parameter Description Language_Code This is the language code associated with the task to be enqueued. string parameter. the language code would be "ENG". The escalation timeout is the time period within which a task must be completed by the agent and closed with DeQueue. which means the task becomes unassigned. This is an optional. the system holds the task until the specified agent is available to take this task. If specified. If you do not specify a value. the system uses the default specified for that task type in the Task Configuration pages. . Note. For example if an email to be enqueued is written in English. It is a string value that must exist in the PeopleSoft language table. If no value is specified. subject This is an optional parameter. 2009. All Rights Reserved. Then the task is placed in the MultiChannel Framework escalation table. PeopleSoft recommends not specifying the target agent as this has a processing overhead for the queue servers and does not allow the system to balance workload across all available agents. This value appears on the agent's console when the system assigns the task. and this email would only be assigned to agents whose language list contains English. For better performance. the task is removed from the queue and placed in the MultiChannel overflow table. the system uses the default value specified for that task type in the Task Configuration page. It is an integer value expressing the escalation timeout in minutes. It is an integer value expressing the overflow timeout in minutes. If this parameter is left blank.

When tasks have the same priority. It is an integer value expressing the priority level of the request. The cost of a task is an estimate of the tasks's expected complexity and of the time required to resolve the task. Note. Note. skill level This is an optional parameter. A higher value means a higher priority. the system assigns a task of a higher priority before it assigns a task of a lower priority. 2009. If no value is specified. For example. That is. Returns If the insert was successful. the task cannot be assigned. 1302 is returned when an invalid task type or no value is provided. Tasks are ordered on a physical queue based on their assigned priority. the system assigns the task created at 11:15 AM before the task created at 11:16 AM. You set an agent's skill level in the Agent configuration page. Copyright © 1988. In this case. The message set ID for MultiChannel Framework is 162. All Rights Reserved. Oracle and/or its affiliates. the function returns a task number in the form of a string. the system uses the default value specified for that task type in the Task Configuration page. 239 . If no value is specified. If the required skill level or cost submitted exceeds the highest skill level or maximum workload of any of the agents on that queue. It is an integer value expressing the minimum skill level required of the agent to whom the system routes the request. the system uses the default value specified for that task in the Task Configuration pages. the task cannot be assigned.Chapter 1 PeopleCode Built-in Functions Parameter Description cost This is an optional parameter. It is an integer value measuring the workload each task places on an agent. The cost of a task is added to an agent's workload after accepting a task on the MultiChannel Framework console. For example. the system orders the tasks according to the time they were created. and there is no maximum value. The minimum value is 0 and there is no maximum value. suppose the following tasks exist: Priority 2 created at 11:15 AM and Priority 2 created at 11:16 AM. If you do not specify a value. If unsuccessful. The minimum value is 0. the system uses the default value specified for that task type in the Task Configuration page. it returns a message number. priority This is an optional parameter. A task can't be assigned to an agent if the difference between the current workload and the maximum workload defined for that agent on the Agent configuration page is less than the cost of this task. If the required skill level or cost submitted exceeds the highest skill level or maximum workload of any of the agents on that queue. The queue server assigns this task type to an available agent on that queue whose lowest skill level is greater than or equal to the skill level required by the task.

Oracle and/or its affiliates. See the Error in RowSelect section for more details.MCF_DEMOERMS_CMP.PT_MCF.PeopleCode Built-in Functions Chapter 1 Example &PortalValue = Portal. page 696. 15. If you pass a string to the Error function instead of using a Message Catalog function. /*If running in Application Engine.QE_LOCAL. /*Query string dependent on component. It is distinct from Warning. This can cause unexpected results. The text of the error message (the str parameter). Note. . 60. &MyCompURL. "PeopleCode Built-in Functions. &MyCompURL = &MyCompURL | "&ps_emailid=" | &emailid. which displays a warning message. rem "/psc/ps/EMPLOYEE/QE_LOCAL/c/PT_MCF. Error is also used in RowDelete and RowSelect PeopleCode events. Our demo comonent just needs email id*/ rem The URL to be passed will look something like. depending on which PeopleCode event the function occurs in. Component. page 205 Error Syntax Error str Description Use the Error function in FieldEdit or SaveEdit PeopleCode to stop processing and display an error message. 2009. MenuName. &langcode.GBL?Page=MCFEM_ERMSMN". &cost. and it also enables you to include more detailed Explain text about the error." WinMessage. Page. the explanation text from the last call to the Message Catalog may be appended to the message. &priority.EMPLOYEE. "QEDMO". 240 Copyright © 1988. In other respects behavior of Error differs. Warning! The behavior of the Error function in the RowSelect event is very different from its normal behavior. the program terminates immediately and no statements after the Error are executed. should always be stored in the Message Catalog and retrieved using the MsgGet or MsgGetText functions. This makes it much easier for the text to be translated. When Error executes in a PeopleCode program.MCFEM_DEMOERMS_CMP. See Chapter 1. See Also Chapter 1. "GBL". &strtasknum = EnQueue(&queueID. &minskill). &subject. "").MCFEM_ERMSMN." DeQueue. "email". &NodeValue = Node. &NodeValue. but does not stop processing. All Rights Reserved. "PeopleCode Built-in Functions. this code assumes CONTENT URI has been set in node defn admin page*/ &MyCompURL = GenerateComponentContentRelURL(&PortalValue.

If the user confirms. Error causes the Component Processor to add the current row (the one where the PeopleCode is executing) to the page scroll. The behavior of Error in the RowSelect event enables you to filter out rows that are above or below some limiting value.Chapter 1 PeopleCode Built-in Functions Errors in FieldEdit and SaveEdit The primary use of Error is in FieldEdit and SaveEdit PeopleCode: • • In FieldEdit. Error stops all save processing and displays a message. An Error in the RowDelete event displays a message and prevents the row from being deleted. It is used to filter rows that are being added to a page scroll after the rows have been selected and brought into the component buffer. and is supported only for backward compatibility. the system first prompts for confirmation. In SaveEdit. Note that an Error on any field in SaveEdit stops all save processing. the RowDelete event fires. Error stops processing. Errors in Other Events Do not use the Error function in any of the remaining events. otherwise Error stops processing before SetCursorPos is called. 2009. In practice this technique is rarely used. Errors in RowDelete When the user attempts to delete a row of data. then stops adding any additional rows to the page scroll. Error in RowSelect The behavior of Error in RowSelect is totally anomalous. because it is more efficient to filter out rows of data before they are brought into the component buffer. and no page data is saved to the database. but does not highlight any field. and highlights the relevant field. Oracle and/or its affiliates. This can be accomplished with search views or effective date processing. which include: • • • • • • • • FieldDefault FieldFormula RowInit FieldChange Prepopup RowInsert SavePreChange SavePostChange Copyright © 1988. displays a message. You can move the cursor to a specific field using the SetCursorPos function. All Rights Reserved. 241 . No message is displayed. but be sure to call SetCursorPos before calling Error.

This function is intended to make the text "browser safe". page 468." MsgGet."). QTY_⇒ ADJUSTED. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. Chapter 1. page 691 and Chapter 1.PeopleCode Built-in Functions Chapter 1 Parameters Parameter Description Str A string containing the text of the error message. The characters that are replaced are ones that would cause the browser to interpret them as HTML tags or other markup if they aren't encoded. Chapter 1. page 466. PHYSICAL_INV. and places the cursor in the QTY_ADJUSTED field. "Message not found. Example The following example. 242 Copyright © 1988. . Chapter 1. All Rights Reserved." MsgGetText. page 696 EscapeHTML Syntax EscapeHTML(TextString) Description Use the EscapeHTML function to replace all characters in TextString that would otherwise be interpreted as markup sequences. Note that SetCursorPos must be called before Error. stops all save processing. Oracle and/or its affiliates." WinMessage. page 566. This makes translation much easier and also enables you to provide detailed Explain text about the error. and therefore pre-formatted HTML should not be passed to this function unless the output desired is a rendering of the HTML code itself as opposed to it's interpretation. 2009. Returns None. If PAGES2_INV_WRK. from SaveEdit PeopleCode." SetCursorPos. displays an error message. Error MsgGet(11100. "PeopleCode Built-in Functions. This string should always be stored in the Message Catalog and retrieved using the MsgGet or MsgGetText function. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. CurrentRowNumber()). See Also Chapter 1." Warning. CurrentRowNumber(1). 180.INV_LOT_ID. End-If.PHYS_CYC_INV_FLG = "Y" Then SetCursorPos(%Page.

Either HTML character entities (eg. In addition to escaping characters that could be misinterpreted as HTML tags or other elements. <BR> Parameters Parameter Description TextString Specify a string of HTML that contains characters that must be replaced with HTML escape sequences.Chapter 1 PeopleCode Built-in Functions This function is for use with strings that display in an HTML area. single quote Percentage sign New line " & < ' % Not applicable &quot.g. Unicode Character Name Glyph Escape Sequence Quotation mark Ampersand Less than sign Apostrophe. &lt. See Also Chapter 1. page 245 Copyright © 1988. EscapeHTML escapes the percentage sign (%) as this could interfere with meta HTML processing. "PeopleCode Built-in Functions. &amp. &lt) or Numeric Character Representations (e. the less-than symbol (<) is replaced with &lt." EscapeJavascriptString. page 244 and Chapter 1. For example. a single quotation mark (') is replaced with &#039. "PeopleCode Built-in Functions. &#037. it is not necessary to escape other Unicode characters — their value may be passed directly to the browser instead of a character entity or in Numeric Character Representation. All Rights Reserved.. &#039) are output by the EscapeHTML function. The following table lists the Unicode characters that are escaped by the EscapeHTML function. depending on the character passed. As all PeopleTools HTML is generated in Unicode. 2009. and so on. &#039. The table below shows the escaping that is performed by EscapeHTML. Returns A string containing the original text plus HTML escape sequences. Oracle and/or its affiliates.." EscapeWML. 243 .

page 242 and Chapter 1. and their replacement character sequence.PeopleCode Built-in Functions Chapter 1 EscapeJavascriptString Syntax EscapeJavascriptString(String) Description Use the EscapeJavascriptString function to replace the characters in String that have special meaning in a JavaScript string as escape sequences. Oracle and/or its affiliates. a single quotation mark` ( ' ) is replaced by \'. page 245 244 Copyright © 1988. "PeopleCode Built-in Functions. This function is intended to make the text "browser safe. The characters that are replaced are ones that cause the browser to misinterpret the JavaScript if they aren't encoded. All Rights Reserved. Returns A string containing the original text plus JavaScript escape sequences." The table below shows the strings that are replaced by this function. . Character Name Glyph Description Apostrophe. This function is for use with text that becomes part of a JavaScript program. For example. "PeopleCode Built-in Functions. and so on. 2009. See Also Chapter 1." EscapeHTML. a new line character is replaced by \n." EscapeWML. single quote Quotation mark New line Carriage return Double backslash ' " Not applicable Not applicable \\ \' \" \n Deleted \\\\ Parameters Parameter Description String Specify a string that contains character that need to be replaced with JavaScript escape sequences.

"PeopleCode Built-in Functions.Chapter 1 PeopleCode Built-in Functions EscapeWML Syntax EscapeWML(String) Description Use the EscapeWML function to escape special characters that are significant to WML. ' and ". $ (escaped as $$). Oracle and/or its affiliates. This function is for use with strings that display on an WML browser. 2009. [When [relop_n] right_term_n [statement_list]][When-other [statement_list]] End-evaluate Copyright © 1988." EscapeJavascriptString. 245 . . Parameters Parameter Description String Specify a string that contains characters that need to be replaced with WML escape sequences. page 242 and Chapter 1. &. >. See Also Chapter 1. . "PeopleCode Built-in Functions. page 244 Evaluate Syntax Evaluateleft_termWhen [relop_1] right_term_1 [statement_list] . This includes <. All Rights Reserved." EscapeHTML. Returns A string containing the original plus text plus WML escape sequences.

End-if. 246 Copyright © 1988. &fDerivedBORole. 2009. the two expressions are read separately by the compiler. in certain circumstances. left_term. End-if. End-Evaluate. . &fContactRole⇒ ID. Break. you can add a Break statement at the end of the clause. It executes the statements in all of the When clauses for which the comparison evaluates to True. 14. To end the Evaluate after the execution of a When clause. Null. "You are hiring an employee and Action is not set to Hire. then moves on to evaluate the comparison in the following When clause. &fContactBOID. it executes the statements in the When clause. then = is assumed. For example. this can cause an error. It takes an expression. All Rights Reserved. ""))."). Considerations Using When Clause Generally. When-Other /* default code */ End-evaluate. &fCustRoleID.GARBAGE (create BO_SEARCH:Runtime:BusinessContact_Contact(&fBusObjDescr. &f⇒ DerivedBOID. 13. Example The following is an example of a When statement taken evaluates ACTION and performs various statements based on its value: &PRIOR_STATUS = PriorEffdt(EMPL_STATUS). and compares it to compatible expressions (right_term) using the relational operators (relop) in a sequence of When clauses. &fBusObjDescr1. Oracle and/or its affiliates. Null.PeopleCode Built-in Functions Chapter 1 Description Use the Evaluate statement to check multiple conditions. the following PeopleCode produces an error because the PeopleCode compiler cannot separate the end of the Where clause with the beginning of the next statement: When = COMPONENT. If the result of the comparison is True. If relop is omitted."). &fCustBOID.SearchItemSelected(). However.GARBAGE. If you place a semicolon after the When clause. If and only if none of the When comparisons evaluates to True. "Hire or Rehire action is valid only if employee status is Terminated or Retired. For example: When = COMPONENT. Evaluate ACTION When "HIR" If %Mode = "A" Then Warning MsgGet(1000. Break. it executes the statement in the When-other clause (if one is provided). you use the When clause without a semicolon at the end of the statement. When = "REH" If All(&PRIOR_STATUS) and not (&PRIOR_STATUS = "T" or &PRIOR_STATUS = "R" ) Then Error MsgGet(1000.

" Len. Example The examples set &MATCH to True. Oracle and/or its affiliates. &MATCH = Exact("PeopleSoft".string2) Description Use the Exact function to compare two text strings and returns True if they are the same. Returns Returns a Boolean value: True if the two strings match in a case-sensitive comparison. page 625 Chapter 2. parameter]) where parameter has one of the following formats: Boolean constant Exec_Constant + Path_Constant Description Exec is a cross-platform function that executes an external program on either UNIX or Windows. page 444 and Chapter 1.Chapter 1 PeopleCode Built-in Functions Exact Syntax Exact(string1. 247 . "Meta-SQL. See Also Chapter 1. page 750 Exec Syntax Exec(command_str [. "Peoplesoft"). Copyright © 1988." %Substring. "PeopleCode Built-in Functions." String. All Rights Reserved. False otherwise. then False: &MATCH = Exact("PeopleSoft". "PeopleSoft"). Exact is case-sensitive because it uses the internal character codes. 2009. "PeopleCode Built-in Functions.

exe and the value of the first parameter is 1 2 3. All PeopleCode is executed on the application server. single quote. The first fragment is enclosed in double quotes so that the single quote and space characters are passed correctly and the second fragment is enclosed in single quotes so that the double quote and space characters are passed correctly. Suppose your executable is program. There shouldn't be any application interaction on the application server console. 2009. Note that there are no spaces between the quoted fragments. Note. Exec("program. which is the default. Both types of quotes are treated equivalently. A single token may consist of multiple adjacent quoted characters (There must be no spaces between the quoted fragments). suspending the PeopleSoft application until the called executable completes. All Rights Reserved.PeopleCode Built-in Functions Chapter 1 This function has two parameter conventions in order to maintain upward compatibility with existing programs. Unterminated quoted fragments will result in an error. Single or double quote characters can be used for quoting. Asynchronous processing. %FilePath_Absolute) or Exec("""c:\Program Files\App\program. The function can make either a synchronous or asynchronous call.exe.exe"" ""1 2 3""".exe' '1 2 3'". .exe -p ""customer's update""") This is an example of executing a program with a parameter that contains space. The second parameter is enclosed in double quotes so that the single quote and space characters are passed correctly. Exec("'c:\Program Files\App\program. 248 Copyright © 1988. Oracle and/or its affiliates. PeopleCode strings will require two double quote characters within a string to embed a double quote character. So if you're calling an interactive application. Command Formatting The command_str parameter consists of a series of tokens that together make up the name of the executable to run and the parameters to be passed to it. The is an example of executing a program where the path to the executable contains spaces and a single parameter containing space characters is passed. This is appropriate if you want to force the user (or the PeopleCode program) to wait for the function to complete its work before continuing processing. The second parameter consists of several adjacent quoted fragments. the PeopleCode program terminates with a fatal error. launches the executable and immediately returns control to the calling PeopleSoft application. You may want to try to catch these exceptions by enclosing such statements in a try-catch statement (from the Exception Class). If Exec is unable to execute the external program. %FilePath_Absolute) This is an example of executing a program with a parameter that contains space and single quote characters. but the starting and ending quotes for a quoted portion of a token must match. A quoted string may not contain quotes of the same type but a single quoted string can contain double quote characters and vice versa. Synchronous execution acts as a "modal" function. Note. Tokens are separated by unquoted space characters. and double quote characters. Suppose the location of the executable is C:\Program Files\App\program. The first parameter is -p and the second parameter is customer's update. you receive an error.

PS_HOME may or may not be prefixed.exe -p ""John's comment: ""'""Hello There""'") Using an Absolute Path If you do not specify anything for the second parameter. See Also Enterprise PeopleTools 8. You can use the GetEnv function to determine the value of PS_HOME. Workflow. If you pass an absolute path in the Exec argument you must use the %FilePath_Absolute flag Restrictions on Use in PeopleCode Events When Exec is used to execute a program synchronously (that is. Any PeopleCode event that fires as a result of a ScrollSelect (or one of its relatives) function calls.Chapter 1 PeopleCode Built-in Functions Suppose your executable is program. 249 . Oracle and/or its affiliates. if its synch_exec parameter is set to True) it behaves as a think-time function. 2009. All Rights Reserved. The first parameter is -p and the second parameter is John's comment: "Hello There". or if you specify a Boolean value. RowSelect. which means that it can't be used in any of the following PeopleCode events: • • • • • SavePreChange.50 PeopleBook: PeopleCode Developer's Guide. Creating a File in UNIX If you try to create a file on a UNIX machine using the Exec function the file might not be created due to permission issues. the path to PS_HOME is prefixed to the command_str.exe. SavePostChange. "Using Methods and Built-In Functions. The script file must have correct privileges. or a Select (or one of its relatives) Rowset class method. depending on the values you select. Exec("program." Think-Time Functions Copyright © 1988. If you encounter this problem. If you specify constant values for the second parameter. create a script file that includes the file creation commands and run the script using the Exec function.

. Values are: Exec Constant Description %Exec_Asynchronous Program executes asynchronously (the default) %Exec_Synchronous Program executes synchronously. PS_HOME is always prefixed to command_str.". The exec_constant specifies whether to execute the external program synchronously or not. Boolean | Constants If you specify a Boolean value. a UNIX "/" separator is converted to "\".Synchronous False . 2009. a WIN32 "\" separator is converted to "/".. All Rights Reserved. Values are: • • True . If you use this style. it indicates whether to execute the external program synchronously or asynchronously. The function automatically converts the first token on command_str platformspecific separator characters to the appropriate form for where your PeopleCode program is executing. ..PeopleCode Built-in Functions Chapter 1 Parameters Parameter Description command_str Specify a string containing the path and name of the executable file. %Exec_Synchronous + %FilePath_Absolute). The path_constant specifies how the path name is to be treated. If you specify constant values. Enclosing the path strings in double quotes causes Exec to consider the entire string as one argument. This allows you to put file or program names in canonical form (such as. This is only done for the first token on command_str assuming it to be some sort of file specification. 250 Copyright © 1988. Exec uses the space character as the delimitter for breaking the parameter list when external programs are called. and on a UNIX system. On a WIN32 system. Enclose all path names with double quotes ("") if the path name includes spaces. the program executes asynchronously. For example: &ExitCode = Exec("/ourbin/magicprogram .Asynchronous (default) If you do not specify a value. you're specifying a numeric value composed of an exec_constant and a path_constant. Oracle and/or its affiliates. Unix style) as the first token on the exec command. regardless of the path_constant. Example: Exec("mkvdk -create -collection ""<path to collection>"" -style " "<path to style files>"" -locale <locale>"). The value specified is made up of the addition of these predefined constants.

"PeopleCode Built-in Functions. Copyright © 1988." RowScrollSelect. 251 . Chapter 1. If you specify constant values." RemoteCall." RowScrollSelectNew." ScrollSelectNew. page 551. See Also Chapter 1." Select Enterprise PeopleTools 8. page 546 and Chapter 1. "PeopleCode Built-in Functions. Oracle and/or its affiliates. Chapter 1. page 695. "Using Methods and Built-In Functions. "Exception Class" Enterprise PeopleTools 8. All Rights Reserved." Think-Time Functions ExecuteRolePeopleCode Syntax ExecuteRolePeopleCode(RoleName) Description Use the ExecuteRolePeopleCode function to execute the PeopleCode Rule for the Role RoleName." Declare Function." ScrollSelect." WinExec.50 PeopleBook: PeopleCode API Reference. "PeopleCode Built-in Functions. %Exec_Synchronous + %FilePath_Absolute). Chapter 1. "PeopleCode Built-in Functions. Example &ExitCode = Exec("sh -c " | &scriptFile. "PeopleCode Built-in Functions. page 518. If you specified a Boolean. This function returns an array of string containing dynamic members (UserIds). Chapter 1. a Number value equal to the process ID of the called process is returned. page 544." GetEnv. Chapter 1. page 339 Enterprise PeopleTools 8.Chapter 1 PeopleCode Built-in Functions Path Constant Description %FilePath_Relative PS_HOME is prefixed to command_str. 2009. the returned value contains the value of the exit code of the program executed using this function. "PeopleCode Built-in Functions. %FilePath_Absolute Nothing is prefixed to command_str.50 PeopleBook: PeopleCode Developer's Guide. "PeopleCode Built-in Functions. unless you have executed the program asynchronously. Returns What is returned depends on what you specified for the second parameter. page 553. "Rowset Class. Chapter 1.50 PeopleBook: PeopleCode API Reference. page 185. "PeopleCode Built-in Functions.

" IsUserInPermissionList. Returns An array of string containing the appropriate UserIds. &rec." ExecuteRoleWorkflowQuery. "PeopleCode Built-in Functions. End-If.50 PeopleBook: Security Administration. &pcf). Example The following saves valid users to a temporary table: Local array of string &pcode_array_users. this function is used by an Application Engine process that runs periodically and executes the role rules for different roles. Chapter 1.PeopleCode Built-in Functions Chapter 1 Typically. page 441 and Chapter 1." %Roles. Oracle and/or its affiliates. &ROLENAME. &fld. page 253. If &pcode_rule_status = "Y" Then SQLExec("select RECNAME. Parameters Parameter Description RoleName Specify the name of an existing role. &pce. PC_FUNCTION_NAME from PSROLEDEFN where ROLENAME= :1". &ROLENAME). "System Variables. "Understanding PeopleSoft Security" 252 Copyright © 1988. End-If. If (&rec <> "" And &fld <> "" And &pce <> "" And &pcf <> "") Then &pcode_array_users = ExecuteRolePeopleCode(&ROLENAME). PC_EVENT_TYPE. . 2009. page 442 Chapter 3." IsUserInRole. "PeopleCode Built-in Functions. Else &pcode_results = False. &comb_array_users = &pcode_array_users. &pcode_results = True." ExecuteRoleQuery. FIELDNAME. Chapter 1. It could then write the results of the rules (a list of users) into the security tables. effectively placing users in certain roles based on the rule. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. See Also Chapter 1. page 788 Enterprise PeopleTools 8. All Rights Reserved. page 253. SQLExec("delete from ps_dynrole_tmp where ROLENAME=:1".

You can't use numbers. Description Use the ExecuteRoleQuery function to execute the Query rule for the role rolename. and so on. Parameters Parameter Description RoleName BindVars Specify the name of an existing role. page 442 Chapter 3. These bind variables must be strings. page 441 and Chapter 1. page 253." ExecuteRoleWorkflowQuery.Chapter 1 PeopleCode Built-in Functions ExecuteRoleQuery Syntax ExecuteRoleQuery(RoleName. A list of bind variables to be substituted in the query." ExecuteRolePeopleCode. bindvar2]. page 788 Enterprise PeopleTools 8. Returns An array object containing the appropriate UserIds. Oracle and/or its affiliates. "PeopleCode Built-in Functions." IsUserInPermissionList. 2009.BindVars) where BindVars is an arbitrary-length list of bind variables in the form: Copyright © 1988. . All Rights Reserved. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." %Roles. Chapter 1. passing in BindVars as the bind variables. .50 PeopleBook: Security Administration. Chapter 1. 253 . See Also Chapter 1. "PeopleCode Built-in Functions." IsUserInRole. dates. "System Variables. "Understanding PeopleSoft Security" ExecuteRoleWorkflowQuery Syntax ExecuteRoleWorkflowQuery(RoleName.BindVars) where BindVars is an arbitrary-length list of bind variables that are stings in the form: bindvar1 [. page 251. This function returns an array object containing the appropriate user members (UserIds).

See Also Chapter 1. page 788 Enterprise PeopleTools 8. . page 251. "PeopleCode Built-in Functions.50 PeopleBook: Security Administration. . Returns An array object containing the appropriate UserIds. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. A list of bind variables to be substituted in the query." IsUserInRole. page 442 Chapter 3. Chapter 1. Description Use the ExecuteRoleWorkflowQuery function to execute the Workflow Query rule for the role rolename. ." IsUserInPermissionList. "System Variables. Chapter 1. "Understanding PeopleSoft Security" Exit Syntax Exit([1]) Description Use the Exit statement to immediately terminate a PeopleCode program.PeopleCode Built-in Functions Chapter 1 bindvar1 [. 2009. "PeopleCode Built-in Functions. Parameters Parameter Description RoleName BindVars Specify the name of an existing role. bindvar2]. page 253. Oracle and/or its affiliates. passing in BindVars as the bind variables. page 441 and Chapter 1. This function returns an array object containing the appropriate user members (UserIds)." %Roles. the main program terminates." ExecuteRoleQuery. If the Exit statement is executed within a PeopleCode function. 254 Copyright © 1988." ExecuteRolePeopleCode. All Rights Reserved.

Example The following example terminates the main program from a For loop: For &I = 1 To ActiveRowCount(RECORD. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. Exit(1) does not rollback iScript transactions. &I). page 535 Exp Syntax Exp(n) Copyright © 1988. but only if you are not sending HTML or XML in the error text itself. All errors that have occurred for this message are viewable in the message monitor: even those errors detected by the ExecuteEdits method. If &ITEM_SELECTED = "Y" Then &FOUND = "Y". errors for the subscription contract are written to the subscription contract error table. Oracle and/or its affiliates. You can also use the built-in function Error. See Also Chapter 1. Exit. Generally. Parameters Parameter Description 1 Use this parameter to rollback database changes.Chapter 1 PeopleCode Built-in Functions Note. all database changes are rolled back. It fails if you use a Boolean value. Returns None. you can use the SqlExec built-in function with the parameter of ROLLBACK (SQLEXEC("ROLLBACK")) or the MessageBox built-in function with a message error severity of error. When used with a message. True or False. and the status of the message is marked to Error. End-For." Break. this parameter is used in PeopleCode programs that affect messages.SP_BUIN_NONVW) &ITEM_SELECTED = FetchValue(ITEM_SELECTED. End-If. 255 . To rollback in an iScript. 2009. Note." Return. All Rights Reserved. page 65 and Chapter 1. This function takes only numeric values.

page 446 and Chapter 1. Exp is the inverse of the Ln function. It also expands bind variables specified using additional parameters. which is the natural logarithm of x. 2009. the base of natural logarithms. The number n is the exponent applied to the base e. "PeopleCode Built-in Functions. The inline bind variable references the value in the field." Log10. See Chapter 1. page 614. The constant e equals 2. "PeopleCode Built-in Functions." SQLExec.71828182845904. page 449 ExpandBindVar Syntax ExpandBindVar(str) Description Inline bind variables can be included in any PeopleCode string.fieldname). preceded by a colon.PeopleCode Built-in Functions Chapter 1 Description Exp returns the constant e raised to the power of n where n is a number. "PeopleCode Built-in Functions. Use the ExpandBindVar function to expand any inline bind variables that it finds in str into strings (converting the data type of non-character fields) and returns the resulting string. then 7." Ln. Example The examples set &NUM to 2. An inline bind variable is a field reference (in the form recordname. See Also Chapter 1. All Rights Reserved. Returns Returns a Number value equal to the constant e raised to the power of n. This works with inline bind variables representing fields containing any data type except Object. &NUM = Exp(2). .389056099(e2): &NUM = Exp(1).71828182845904. 256 Copyright © 1988. Oracle and/or its affiliates.

&RESULT = ExpandBindVar(&TESTSTR). Example A bind variable is included in the string &TESTSTR. 2009." SQLExec. Returns Returns a String value equal to the input string with all bind variables expanded. page 614 ExpandEnvVar Syntax ExpandEnvVar(string) Description Use the ExpandEnvVar function to convert any environment variables that it finds within string into String values and returns the entire resulting string. 257 . If this program runs on the row for EMPLID 8001. Parameters Parameter Description string A string containing an environment variable. page 456 and Chapter 1. All Rights Reserved.EMPLID in place of the bind variable. "PeopleCode Built-in Functions. See Also Chapter 1. &TESTSTR = "This is a test using EmplID :bus_expense_per. which is then expanded into a new string containing the current value of BUS_EXPENSE_PER." MessageBox.Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description str A string containing one or more inline bind variables.emplid". "PeopleCode Built-in Functions. the message displayed reads "This is a test using EmplID 8001". WinMessage(&RESULT). Copyright © 1988. Oracle and/or its affiliates.

Field. Example Assume that the environment variable %NETDRIVE% is equal to "N:". Select A. and can be used within a SQLExec statement or on its own. page 338 ExpandSqlBinds Syntax ExpandSqlBinds(string) Description Prior to PeopleTools 8." GetEnv. The following PeopleCode sets &newstring equal to "The network drive is equal to N:": &newstring = ExpandEnvVar("The network drive is equal to %netdrive%. This function does the bind variable reference expansion. "PeopleCode Built-in Functions. use the ExpandSqlBinds function.. See Also Chapter 1.. "02") | "%table(:1)". 258 Copyright © 1988. "01". To process skipped parameter markers. The following code shows how to use ExpandSQLBinds with %Table: SQLExec(ExpandSqlBinds("Insert. Oracle and/or its affiliates. :2 from ". "PeopleCode Built-in Functions." ExpandBindVar. Chapter 1. All Rights Reserved.0. a match was never found in the cache so the SQL had to be re-parsed and re-assigned a query path. You should use ExpandSQLBinds only for those parts of the string that you want to put literal values into." GetCwd. :1. some SQL statements can't contain parameter markers because of database compatibility. each parameter marker is assigned a unique number. However.. page 339 and Chapter 1. For databases that offer SQL statement caching.MASTER_ITEM_TBL). To process these exceptions. 2009. "PeopleCode Built-in Functions. . the PeopleCode replaced runtime parameter markers in SQL strings with the associated literal values. Record. page 256. Parameters Parameter Description string Specify the string you want to do the bind variable reference expansion on. This doesn't change the values associated with the parameter markers.PeopleCode Built-in Functions Chapter 1 Returns Returns a string equal to string with any enclosed environment variables expanded to their values.").

See Also Chapter 1. page 614 Enterprise PeopleTools 8. The factorial of a number x is equal to 1*2*3*." SQLExec. &FETCHRESULT1.50 PeopleBook: PeopleCode API Reference. "SQL Class" Fact Syntax Fact(x) Description Use the Fact function to return the factorial of a positive integer x.Chapter 1 PeopleCode Built-in Functions Returns A string. &VAR1. &FETCHRESULT1. Returns Returns a Number equal to the factorial of x. Oracle and/or its affiliates. &FETCHRESULT2). you can use ExpandSqlBinds with it. &NUM). it is truncated to an integer. Example The following example shows both the original string and what it expands to. If x is not an integer. &NUM = 1. For example. &FETCHRESULT2). 2009. &STRING = "My String". Copyright © 1988. 'M':1". you can make it work by expanding it as follows: SQLExec(ExpandSqlBinds("String with concatenated bindrefs 'M':2. &STR2 = ExpandSqlBinds("This :2 is an expanded string(:1)". 259 . if your SQLExec is this: SQLExec("String with concatenated bindrefs 'M':2. The previous code produces the following value for &STR2: This 1 is an expanded string(My String) If you're having problems with an old SQL statement binds. &STRING.*x.. &VAR2).. All Rights Reserved. 'M':1". "PeopleCode Built-in Functions. &VAR1. &VAR2).

Fact(4) is equal to 1*2*3*4: &X &X &X &X = = = = Fact(0). 2. 1. If sqlname is a literal name. This is either in the form SQL. See Also Chapter 1. 2009. Oracle and/or its affiliates. dbtype[. Fact(4). All Rights Reserved. effdt]] ) Description Use the FetchSQL function to return the SQL definition with the given sqlname as SQL.sqlname or a string value giving the sqlname. Fact(2) is equal to 1*2. Fact(1). matching the dbtype and effdt. page 495 FetchSQL Syntax FetchSQL([SQL. it must be in quotes. Parameters Parameter Description sqlname Specify the name of a SQL definition. 260 Copyright © 1988. . "PeopleCode Built-in Functions. then 24. Fact(2).sqlname or a string value." Product.PeopleCode Built-in Functions Chapter 1 Example The example sets &X to 1.]sqlname[.

ABC_XY). it is set by default to the current database type (the value returned from the %DbType system variable.50 PeopleBook: PeopleCode API Reference. Chapter 1. See Also Chapter 1. Chapter 1. "PeopleCode Built-in Functions. Database platforms are subject to change. All Rights Reserved. "PeopleCode Built-in Functions." %AsOfDate." CreateSQL. page 160. "PeopleCode Built-in Functions. page 201. that is.ABCD_XY.Chapter 1 PeopleCode Built-in Functions Parameter Description dbtype Specify the database type associated with the SQL definition. If effdt isn't specified. 2009. Chapter 1. page 389 and Chapter 1. "". "SQL Class" Chapter 3. The following code gets the text associated with the ABCD_XY SQL Definition for the current DBType and November 3. effdt Specify the effective date associated with the SQL definition. page 623 Enterprise PeopleTools 8. Date(19981103)). This parameter takes a string value. page 769 and Chapter 3. 1998: &SQLSTR = FetchSQL(SQL. "PeopleCode Built-in Functions." GetSQL. page 614. Returns The SQL statement associated with sqlname as a string. Oracle and/or its affiliates." StoreSQL. If dbtype isn't specified or is null ("")." %DbName. Example The following code gets the text associated with the ABCD_XY SQL Definition for the current DBType and as of date: &SQLSTR = FetchSQL(SQL. "System Variables. "System Variables. page 773 Copyright © 1988. "PeopleCode Built-in Functions. These values are not case-sensitive: • • • • • • • APPSRV DB2ODBC DB2UNIX INFORMIX MICROSFT ORACLE SYBASE Note. it is set by default to the current as of date." SQLExec. the value returned from the %AsOfDate system variable." DeleteSQL. 261 .) Values for dbtype are as follows.

]fieldname) where scrollpath is: [RECORD. 2009. The field can be on scroll level one." Specifying Data with References Using Scroll Path Syntax and Dot Notation Parameters Parameter Description scrollpath target_row A construction that specifies a scroll level in the component buffer. [recordname. target_recname To prevent ambiguous references." Value Enterprise PeopleTools 8.PeopleCode Built-in Functions Chapter 1 FetchValue Syntax FetchValue(scrollpath. where scrollname is the same as the scroll level's primary record name.50 PeopleBook: PeopleCode API Reference. See Also Enterprise PeopleTools 8. The name of the field where the value to fetch is located.50 PeopleBook: PeopleCode Developer's Guide. An integer specifying the row on the target scroll level where the referenced buffer field is located. [RECORD.]fieldname expression.level1_row. "Accessing the Data Buffer" Enterprise PeopleTools 8.50 PeopleBook: PeopleCode API Reference. This function is generally used to retrieve the values of buffer fields outside the current context. "Field Class. Oracle and/or its affiliates.]fieldname 262 Copyright © 1988. This function remains for backward compatibility only. The recordname prefix is required if the call to FetchValue is not on the record definition recordname.50 PeopleBook: PeopleCode API Reference." LongTranslateValue Enterprise PeopleTools 8.level1_recname. Use the Value field class property instead.scrollname.level2_row. you can reference it directly using a [recordname.target_row. [recordname. Description Use the FetchValue function to return the value of a buffer field in a specific row of a scroll level.level2_recname. ]] RECORD. "Field Class.50 PeopleBook: PeopleCode Developer's Guide. you can also use SCROLL. "Referencing Data in the Component Buffer. if a buffer field is in the current context. or three of the active page. "Field Class. two. All Rights Reserved." ShortTranslateValue Enterprise PeopleTools 8. . Note.

See Also Chapter 1. Oracle and/or its affiliates. "Referencing Data in the Component Buffer" FieldChanged Syntax The syntax of the FieldChanged function varies depending on whether you want to use a scroll path reference or a contextual reference to specify the field. If you want to use a contextual reference. "PeopleCode Built-in Functions. Copyright © 1988. Description The FieldChanged function returns True if the referenced buffer field has been modified since being retrieved from the database either by a user or by a PeopleCode program. page 677 Enterprise PeopleTools 8. Example The following example retrieves the value from field DEPEND_ID in record DEPEND on row &ROW_CNT from scroll level one: &VAL = FetchValue(SCROLL. If you want to use a scroll path reference. [RECORD. target_recname To prevent ambiguous references.Chapter 1 PeopleCode Built-in Functions Returns Returns the field value as an Any data type.]fieldname) In this construction the scroll level and row number are determined based on the current context. All Rights Reserved. &ROW_CNT." PriorValue.level1_recname.level1_row. the syntax is: FieldChanged([recordname. you can also use SCROLL." ActiveRowCount. 263 . "PeopleCode Built-in Functions. DEPEND. Chapter 1.scrollname. "PeopleCode Built-in Functions.50 PeopleBook: PeopleCode Developer's Guide." UpdateValue. ]] RECORD. 2009.]fieldname) where scrollpath is: [RECORD. page 36.level2_row. the syntax is: FieldChanged(scrollpath.DEPEND_ID). page 494 and Chapter 1. page 169 . [recordname.target_row." CurrentRowNumber. "PeopleCode Built-in Functions. Chapter 1.DEPEND. "PeopleCode Built-in Functions.level2_recname. page 132." CopyRow. Chapter 1. where scrollname is the same as the scroll level's primary record name.

PeopleCode Built-in Functions Chapter 1 Note. "Accessing the Data Buffer" Enterprise PeopleTools 8.50 PeopleBook: PeopleCode API Reference. All Rights Reserved. two.50 PeopleBook: PeopleCode Developer's Guide. The following four functions enable you to control more precisely when the Component Processor should perform save PeopleCode: • • • • FieldChanged RecordChanged RecordDeleted RecordNew These functions enable you to restrict save program processing to specific rows." Specifying Data with References Using Scroll Path Syntax and Dot Notation Parameters Parameter Description scrollpath [recordname. Example The following example checks three fields and sets a flag if any of them has changed: 264 Copyright © 1988.50 PeopleBook: PeopleCode Developer's Guide." IsChanged Enterprise PeopleTools 8. See Also Enterprise PeopleTools 8. SavePostChange) normally process each row of data in the component. target_row Related Functions Save PeopleCode programs (SaveEdit. The recordname prefix is required if the call to FieldChanged is not on the record definition recordname. "Referencing Data in the Component Buffer. The field can be on scroll level one. The name of the field where the value to check is located. This function remains for backward compatibility only. The row number of the target row. 2009. SavePreChange. Use the IsChanged field class property instead. "Field Class. .]fieldname A construction that specifies a scroll level in the component buffer. This is useful during SavePreChange or SavePostChange processing for checking whether to make related updates based on a change to a field. the function assumes the row on which the PeopleCode program is executing. If this parameter is omitted. Oracle and/or its affiliates. or three of the active page.

PS_FILEDIR[relative_path] 2.Chapter 1 PeopleCode Built-in Functions /* Set the net change flag to 'Yes' if the scheduled date. is used. PS_SERVDIRFiles[relative_path] If the code is not running on an application server. If the code is running on an application server. scheduled */ /* time or quantity requested is changed */ If FieldChanged(QTY_REQUESTED) Or FieldChanged(SCHED_DATE) Or FieldChanged(SCHED_TIME) Then NET_CHANGE_FLG = "Y". page 510. and if found. so you can decide which mode to use when you open the file for writing. Note. 265 . and are searched for in the following order: 1. If it isn't found. End-If. PS_FILEDIR[relative_path] 2. This means if the first environmental variable in order is found. the following environmental variables are valid. The environmental variables that get used are different." RecordChanged. Oracle and/or its affiliates. "PeopleCode Built-in Functions. PS_SERVDIRFiles[relative_path] 3. 2009. depending on whether the machine where the code is running is an application server or not. "PeopleCode Built-in Functions. you should use the GetFile function or the Open File Class method with the "e" mode. in a particular order. Working With Relative Paths If you specify a relative path. the next one is searched for." RecordDeleted. All Rights Reserved. pathtype]) Description Use the FileExists function to determine whether a particular external file is present on your system. if the variable exists. and so on. that path is appended to the path specified by an environmental variable." RecordNew. TEMP[relative_path] Copyright © 1988. "PeopleCode Built-in Functions. page 512 and Chapter 1. which prevents another process from deleting or renaming the file between the time you tested for the file and when you open it. the following environmental variables are valid. page 515 FileExists Syntax FileExists(filename [. that is the one that's used. See Also Chapter 1. Chapter 1. and are searched for in the following order: 1. If you want to open a file for reading.

WIN32 "\" separators are converted to "/". Returns A Boolean value: True if the file exists. The function automatically converts platform-specific separator characters to the appropriate form for where your PeopleCode program is executing. it depends only on the platform where the PeopleCode is executing. Example The following example opens a file for appending if it exists on the system: If FileExists("c:\work\item. and on a UNIX system.txt".Close(). Oracle and/or its affiliates. You can't use any wildcards when specifying a path. the path. The syntax of the file path does not depend on the file system of the platform where the file is actually stored. your system security should detect this. If you have prepended a path to the file name. of the file you want to test. End-If. 2009. 266 Copyright © 1988. Your system security should verify if a user has the correct permissions before allowing access to a drive (for example. Note. UNIX "/" separators are converted to "\".txt". %FilePath_Absolute) Then &MYFILE = GetFile("c:\work\item. and optionally. If the path is an absolute path. if a user changes their TEMP environmental variable to a network drive they don't normally have access to. Note.) Parameters Parameter Description filespec pathtype Specify the name. False if it doesn't. If you want to use this environmental variable. On a WIN32 system. you must set it yourself. use this parameter to specify whether the path is an absolute or relative path. All Rights Reserved. "A").PeopleCode Built-in Functions Chapter 1 The PS_FILEDIR environmental variable is not initialized and set to a path automatically. whatever path you specify is used verbatim. /* Process the file */ &MYFILE. . The valid values for this parameter are: • • %FilePath_Relative (default) %FilePath_Absolute If you don't specify pathtype the default is %FilePath_Relative. You must specify a drive letter as well as the complete path.

number]) Description Use the Find function to locate one string of text within another string of text and returns the character position of the string as an integer." Open Find Syntax Find(string." FindFiles.OPRID). 267 . Returns Returns a Number value indicating the starting position of string in within_string. The position of within_string at which you want to start your search. Copyright © 1988. if number is less than or equal to zero. Parameters Parameter Description string The text you are searching for. All Rights Reserved. Find returns with 0 if string does not appear in within_string. just to find if a string matches a pattern. "PeopleCode Built-in Functions. within_string number The text string you are searching within. If you omit number. 2009. "File Class. A tilde character (~) used in the string parameter stands for an arbitrary number of white spaces. &find = Find("""". Find is case-sensitive and does not allow wildcards.within_string [. Oracle and/or its affiliates.50 PeopleBook: PeopleCode API Reference.50 PeopleBook: PeopleCode API Reference. page 341 Enterprise PeopleTools 8. or if number is greater than the length of within_string. "File Class" Enterprise PeopleTools 8. Find starts at the first character of within_string. "PeopleCode Built-in Functions. If you need to find a quotation mark. use the DBPatternMatch function. If you need to do either case-sensitive search or pattern matching. page 270 and Chapter 1. PSOPRDEFN_SRCH. you need to double it in a string." GetFile.Chapter 1 PeopleCode Built-in Functions See Also Chapter 1.

Specify a 2 dimensional array containing the name value pairs in the specified code set that you want to use. page 247. page 444 and Chapter 1. "PeopleCode Built-in Functions. "PeopleSoft". the second statement returns 6.PeopleCode Built-in Functions Chapter 1 Example In the following example. page 184 Findb Syntax Findb(string." Exact." Len. Specify the name of the source (initial) node used in the data transformation. "PeopleCode Built-in Functions. as a string.SourceNodeName. 4) See Also Chapter 1. FindCodeSetValues Syntax FindCodeSetValues(CodesetName. number]) Description Note. All Rights Reserved. SourceNodeName 268 Copyright © 1988. Oracle and/or its affiliates." DBPatternMatch. the first statement returns 1.TargetNodeName) Description Use the FindCodeSetValues function to find a list of code set name-value pairs. "PeopleSoft") &POS = Find("e". &POS = Find("P".&NameValuePairs. "PeopleCode Built-in Functions. This function has been deprecated and is no longer supported. Chapter 1. Parameters Parameter Description CodeSetName &NameValuePairs Specify the name of the code set you want to find. 2009. . Code sets are primarily used with data value translations as part of a transformation.within_string [.

/* Local XmlNode &tempNode. The XML nodes names are the unique names of the CodeSet value. Copyright © 1988. Returns A two-dimensional array of any.ParseXmlString("<?xml version=""1. /* Clear out the doc and put in a root node */ If (&tempDoc. CreateArray("uom".0""?><xml/>")) Then /* Load the array with some values */ &inNameValuePairsAry = CreateArray(CreateArray("locale". /* Find the codeset values */ &outAry = FindCodeSetValues("PS_SAP_PO_01".XmlDoc. &tempNode. &inNameValuePairsAry. It takes the returned array and adds XML nodes to the document. 2009. "en_us").Len /* Add the current system date to the working storage*/ &tempNode = &tempDoc.DocumentElement. "box")). All Rights Reserved.Chapter 1 PeopleCode Built-in Functions Parameter Description TargetNodeName Specify the name of the target (result) node used in the data transformation. End-If. Oracle and/or its affiliates. */ /* Make sure something was returned */ If &outAry. and the XML node value is the corresponding return value. "PSFT_TGT").NodeValue = &outAry [&i][2]. Example This example checks the specified CodeSet values. End-If. 269 . /* Set a temp object to contain the incoming document */ Local XmlDoc &tempDoc = &incomingData. /* Declare the node */ Local XmlNode &tempNode.AddElement(&outAry [&i][1]). End-For.Len > 0 Then /* Loop through the quantities and make sure they are all above 5 */ For &i = 1 To &outAry. /* Get the data from the AE Runtime */ Local TransformData &incomingData = %TransformData. /* Create an array to hold the name value pairs */ Local array of array of string &inNameValuePairsAry. "SAP_SRC". with the name value pairs of "locale/en_us" and "uom/box".

and if found. the following environmental variables are valid. PS_FILEDIR[relative_path] 2. If it isn't found. PS_SERVDIRFiles[relative_path] 3. PS_FILEDIR[relative_path] 2. Note. If the code is running on an application server. "Array Class" Enterprise PeopleTools 8. Transformation and Translation" FindFiles Syntax FindFiles(filespec_pattern [. is used. Working With Relative Paths If you specify a relative path. your system security should detect this. that path is appended to the path specified by an environmental variable. PS_SERVDIRFiles[relative_path] If the code is not running on an application server. in a particular order. and are searched for in the following order: 1. that is the one that's used. pathtype]) Description Use the FindFiles function to return a list of the external filenames that match the filename pattern you provide.50 PeopleBook: PeopleCode API Reference. Oracle and/or its affiliates. To use this environmental variable. and so on. in the location you specify. depending on whether the machine where the code is running is an application server. if the variable exists.PeopleCode Built-in Functions Chapter 1 See Also Enterprise PeopleTools 8. The environmental variables that are used are different.) 270 Copyright © 1988. you must set it yourself. the next one is searched for. and are searched for in the following order: 1. Your system security should verify if a user has the correct permissions before allowing access to a drive (for example. .50 PeopleBook: PeopleSoft Integration Broker. the following environmental variables are valid. All Rights Reserved. 2009. This means if the first environmental variable in order is found. if a user changes their TEMP environmental variable to a network drive they don't normally have access to. "Applying Filtering. TEMP[relative_path] The PS_FILEDIR environmental variable is not initialized and set to a path automatically.

Local file &MYFILE. The syntax of the file path does not depend on the file system of the platform where the file is actually stored.Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description filespec_pattern Specify the path and filename pattern for the files you want to find. The valid values for this parameter are: • • %FilePath_Relative (default) %FilePath_Absolute If you don't specify pathtype the default is %FilePath_Relative. UNIX "/" separators are converted to "\". You can't use any wildcards when specifying a path. WIN32 "\" separators are converted to "/". pathtype If you have prepended a path to the file name. use this parameter to specify whether the path is an absolute or relative path. then opens and processes each one in turn: Local array of string &FNAMES. while &FNAMES.Close(). and on a UNIX system. &FNAMES = FindFiles("\*. You must specify a drive letter as well as the complete path. The filename pattern. 2009.txt". The function automatically converts platform-specific separator characters to the appropriate form for where your PeopleCode program is executing. ? (Question mark): matches exactly one character at its position. whatever path you specify is used verbatim. it depends only on the platform where the PeopleCode is executing. Oracle and/or its affiliates. Example The following example finds all files in the system's TEMP location whose names end with ". 271 . "R"). can include two wildcards: * (Asterisk): matches zero or more characters at its position.txt"). Returns A string array whose elements are filenames qualified with the same relative or absolute path you specified in the input parameter to the function. On a WIN32 system. /* Open each file */ Copyright © 1988.Shift(). All Rights Reserved. /* Process the file contents */ &MYFILE.Len > 0 &MYFILE = GetFile(&FNAMES. end-while. but not the path. Note. If the path is an absolute path. The path can be any string expression that represents a single relative or absolute directory location.

page 341 Enterprise PeopleTools 8. All Rights Reserved." FileExists. This flushes all open SQL objects that have pending bulk inserts. but need to ensure that all the rows you have inserted up to this point are in fact in the database and not in the buffer.50 PeopleBook: PeopleCode API Reference. For another connection to the database to be able to select those rows. page 265 and Chapter 1. Returns None. "File Class" Enterprise PeopleTools 8. 272 Copyright © 1988. Oracle and/or its affiliates. but performs no COMMITs. Parameters None. An example of using this function would be in preparation for a database commit where you do not want to close the SQL insert statement. . If the flush fails. The SELECT cannot read rows in the bulk insert buffer. When executing a SQL insert using a SQL object with the BulkMode property set to True. so you need to flush them to the table from which the SELECT is reading. To have your process see the bulk inserted rows without committing and without closing the SQL object or its cursor (that is. use FlushBulkInserts. the rows being inserted cannot be selected by this database connection until the bulk insert is flushed. maintaining reuse for the SQL object). If the flush fails. "PeopleCode Built-in Functions. "Array Class" FlushBulkInserts Syntax FlushBulkInserts() Description Use the FlushBulkInserts function to move the bulk inserted rows from the bulk insert buffers of the PeopleSoft process to the physical tables on the database. the PeopleCode program terminates.PeopleCode Built-in Functions Chapter 1 See Also Chapter 1. 2009." GetFile. both a flush and a COMMIT are required. "PeopleCode Built-in Functions. the PeopleCode program terminates. Another example would be when another SQL statement in the same PeopleSoft process needs to select rows that have been inserted using bulk insert and you do not want to close the SQL insert statement.50 PeopleBook: PeopleCode API Reference.

Oracle and/or its affiliates. . If &CM_DEPLETION_REC. CM_COSTING_AET.CM_DEPLETE). call functions to create the receipt */ . 2009. &DEPLETE_FIFO_SEL. 273 .BulkMode = True.CM_ONHAND_FIFO_SEL). statement_listEnd-for Description Use the For loop to cause the statements of the statement_list to be repeated until count is equal to expression2. Transformation and Translation" For Syntax Forcount=expression1Toexpression2 [Stepi]. .Value = "BINTOBIN" Then /* Bin to Bin transfers are both a deplete and receipt.CM_DEPFIFO_VW). .CM_DEPLETE_INS). A Break statement inside the loop causes execution to continue with whatever follows the loop. &CM_DEPLETE_REC = CreateRecord(Record.BUSINESS_UNIT. .Chapter 1 PeopleCode Built-in Functions Example &CM_DEPLETION_REC = CreateRecord(Record.values */ . . DEPLETE_INS = GetSQL(SQL.Fetch(&CM_DEPLETION_REC). "Applying Filtering.50 PeopleBook: PeopleSoft Integration Broker. /* Flush Bulk Insert to be able to see the current on hand quantities in CM_ONHAND_VW */ FlushBulkInserts(). including other loops. . &DEPLETE_INS. End-While. . See Also Enterprise PeopleTools 8. While &DEPLETE_FIFO_SEL.CM_COST_PROC_GROUP.) Any statement types are allowed in the loop. /* Call functions that populate &CM_DEPLETE_REC. &ONHAND_FIFO_SEL = GetSQL(SQL. If you do not include Step. . Copyright © 1988. the Break does not apply to the outside loop. CM_COSTING_AET. Step specifies the value by which count will be incremented each iteration of the loop. If the Break occurs in a nested loop. All Rights Reserved.Execute(&CM_DEPLETION_REC.CM_DEPLETE_FIFO_SEL). . count is incremented by 1 (or -1 if the start value is greater than the end value. . &DEPLETE_INS.CM_BOOK). End-if. &DEPLETE_FIFO_SEL = GetSQL(SQL.Execute(&CM_DEPLETE_REC).

FIELDNAME). The values are: • • • displayTZ timezone .use the local time zone for converting textdatetime. If True is specified for displayTZ. This parameter takes a Boolean: True if the abbreviation should be appended.a time zone abbreviation or a field reference to be used for converting textdatetime. All Rights Reserved. Base . End-for. Parameters Parameter Description datetime timezone | Local | Base Specify the datetime value to be formatted. . Local . "Present Row Number is: %1".PeopleCode Built-in Functions Chapter 1 Example The following example loops through all of the rows for the FIELDNAME scroll area: &FIELD_CNT = ActiveRowCount(DBFIELD_VW. FormatDateTime appends the time zone abbreviation to the returned string. Oracle and/or its affiliates. 2009. The value datetime is assumed to be in base time. "Using PeopleTools Utilities. is passed in timezone. otherwise. {timezone | "Local" | "Base"}. For &I = 1 to &FIELD_CNT. FormatDateTime adjusts the datetime to the user's local time zone instead of the specified time zone. False. See Enterprise PeopleTools 8. 1. Specify whether the time zone abbreviation should be appended to the returned string. or a field reference.use the base time zone for converting textdatetime. 274 Copyright © 1988. WinMessage(MsgGetText(21000. displayTZ) Description Use the FormatDateTime function to take a datetime value and convert it to text. FormatDateTime adjusts the datetime to the user's local time zone instead of a specific time zone. If a specific time zone abbreviation. &I)). The system's base time zone is specified on the PSOPTIONS table.50 PeopleBook: System and Server Administration." If Local is specified for time zone. FormatDateTime Syntax FormatDateTime(datetime. Specify a value for converting datetime.

" DateTimeToTimeZone. "PeopleCode Built-in Functions." TimeToTimeZone. page 178." DateTimeToLocalizedString. page 123. page 175. Keep the following in mind when using Forward: • • The queue server subtracts the task's cost from the transferring agent's workload. All Rights Reserved. 2009. A queue server does not allow a task to be transferred if the agent who owns that task is not logged on to that queue server. "PeopleCode Built-in Functions. page 637.task type." IsDaylightSavings. &DISPDATE=FormatDateTime(ORDER_DATE. Chapter 1. This enables agents to reroute tasks that are not appropriate for their skill level or functional expertise.Chapter 1 PeopleCode Built-in Functions Returns A formatted string value. False). See Also Chapter 1. SHIP_TZ. Oracle and/or its affiliates. "Local"." ConvertTimeToBase.to logical queue ID[. Chapter 1. Chapter 1.from agent ID. PeopleSoft recommends that you only use Forward for application pages that the MultiChannel Framework console launches when agents accept or activate assigned tasks. "PeopleCode Built-in Functions. Chapter 1. "PeopleCode Built-in Functions. Example The following example populates the &DISPDATE variable with a string containing the datetime value in the ORDER_DATE field adjusted to the user's local time zone.task number. and does not include the time zone abbreviation in the output." DateTimeToHTTP. "PeopleCode Built-in Functions. The system cannot forward tasks to logical queues that do not have active physical queues on the same MultiChannel Framework cluster as the physical queue to which the task currently belongs. page 173 Forward Syntax Forward(from physical queue ID. Chapter 1. • Copyright © 1988. page 120. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. to agent ID]) Description Use the Forward function to transfer a task from one agent to another agent or from one agent's logical queue to another logical queue. True). Chapter 1." TimeZoneOffset." ConvertDatetimeToBase. That is. page 639 and Chapter 1. and with the time zone abbreviation. &DISPDATE=FormatDateTime(SHIP_DATE. 275 . you can't forward tasks across MultiChannel Framework clusters. page 429. "PeopleCode Built-in Functions. The following example populates the &DISPDATE variable with a string containing the datetime value in the SHIP_DATE field adjusted to the time zone stored in the SHIP_TZ field.

276 Copyright © 1988. Use the GetParameter request class method with the value ps_tasknum. Use the GetParameter request class method with the value ps_agentid. The queue ID is case sensitive and must match the case used when you created the queue using the Queues page. This is a string value.PeopleCode Built-in Functions Chapter 1 • Forward only applies to email and generic task types. 2009. Oracle and/or its affiliates. The system determines which physical queue the specified agent has access to and assigns the task to that queue for that agent." You retrieve the current physical queue from the query string in the URL of the page launched by the MultiChannel Framework console. as in the agent that "accepted" the task. If the agent ID is not specified. Valid values are: • • email generic You retrieve the current physical queue from the query string in the URL of the page launched by the MultiChannel Framework console. Use the GetParameter request class method with the value ps_tasktype. It is a string value specifying a particular agent ID to receive the forwarded task. This means that the specified agent must be able to log in to one of the physical queues belonging to the destination logical queue. If this value is specified. task type Identifies the task type. Use the GetParameter request class method with the value ps_qid from agent ID Specifies the current agent. This is a string value. This value is provided by the queue. You retrieve the current physical queue from the query string in the URL of the page launched by the MultiChannel Framework console. to logical queue ID Specifies the logical queue to which the system forwards the task. Note. You retrieve the current physical queue from the query string in the URL of the page launched by the MultiChannel Framework console. task number Identifies the task to be forwarded. Parameters Parameter Description from physical queue ID The physical queue is the internal representation of the logical queue that the agent signs onto and to which the task currently belongs. the system holds the task until the specified agent is available on the new queue to take this task. This is a string value. This is a string value. such as "sales3" or "marketing2. The EnQueue function returns this value. PeopleSoft recommends not specifying the target agent as this has a processing overhead for the queue servers and does not allow the system to balance workload across all available agents. the physical queue is chosen at random from the active physical queues. This is a string value. . For better performance. to agent ID This is an optional parameter. All Rights Reserved.

All Rights Reserved. PSMCFFUNCLIB.Value = %Request.MCF_TASKTYPE. along with any variable and external function declarations. &nret = Forward(PSMCFFUNCLIB. Functions can be called from the program in which they are defined. Example Forward("SALES5".GetParameter("ps_agentid"). and so on. String. Any variables declared within a function are valid for the scope of the function. in which case they don't need to be declared. 0. PSMCFFUNCLIB. 2009.GetParameter("ps_tasknum").MCF_QUEUE. PSMCFFUNCLIB. &param2 [As data_type]]. "email_2145". in which case they need to be declared at the top of the program where they are called. Where statements is a list of PeopleCode statements. 0. If &nret = 0 Then MessageBox(0. The message set ID for MultiChannel Framework is 162. "Successfully forwarded.MCF_AGENTID. "email"..Chapter 1 PeopleCode Built-in Functions Returns Returns 0 on success. Copyright © 1988. 277 . End-If Function Syntax Functionname [(paramlist)] [Returnsdata_type] [statements] End-function Where paramlist is: &param1 [As data_type] [. "TSAWYER". Function definitions must be placed at the top of the program.MCF_TASKTYPE.GetParameter("ps_tasktype"). PSMCFFUNCLIB.MCF_TASKNUM.. it returns a message number. "GSALMON"). PSMCFFUNCLIB.Value = %Request. For example. &ToQueue). and they can be called from another program.MCF_TASKNUM. Oracle and/or its affiliates.Value = %Request. "MARKETING".GetParameter("ps_qid"). Description PeopleCode functions can be defined in any PeopleCode program. Date. "". Where data_type is any valid data type. SQL. If unsuccessful. The following example shows how to retrieve parameters from the application page using the GetParameter request class method.MCF_AGENTID."). PSMCFFUNCLIB. PSMCFFUNCLIB. Record. Rowset.Value = %Request. 1302 is returned when an invalid task type or no value is provided.MCF_QUEUE. including Number.

and they are always placed in the FieldFormula event (which is convenient because this event should no longer be used for anything else). each prefixed with the & character. and so on. as described in the preceding section. Each parameter is optionally followed by the keyword As and the name for one of the conventional PeopleCode data types (Number. All Rights Reserved. The End-function keyword. Returning a Value You can optionally return a value from a PeopleCode function. or Any. Example This example returns a Boolean value based on the return value of a SQLExec: 278 Copyright © 1988. If the function is to return a result to the caller. The parameter list.PeopleCode Built-in Functions Chapter 1 By convention. the optional Returns part must be included to specify the data type of the returned value. String. DateTime. external PeopleCode functions are stored in records whose names begin in FUNCLIB_. SQL. This means that if you pass the function a variable from the calling routine and change the value of the variable within the function. If data types are not specified. Time. not for component record fields. the following statement returns a Number value: function calc_something(&parm1 as number. and so on) or any of the object data types (such as Rowset.) If you specify data types for parameters. PeopleCode parameters are always passed by reference. you must include a Return statement in the function definition. Functions can be stored in the FieldFormula event only for record fields. To do so. Note. Date. then the parameters. The statements to be executed when the function is called. The name of the function can be up to 100 characters in length. You have seven choices of value types: Number. PeopleCode internal subroutines are part of the enclosing program and can access the same set of variables as the other statement-lists of the program. in addition to local variables created by the parameters and local variable declarations within the function. is a comma-separated list of variable names. &parm2 as number) returns number In the code section of your function. which must be enclosed in parentheses. the value of the variable is changed when the flow of execution returns to the calling routine. 2009. Oracle and/or its affiliates. Date. like other temporary variables in PeopleCode. use the Return statement to return a value to the calling routine. . When the Return statement executes. take on the type of the value that is passed to them. String. Boolean. For example. An optional Returns clause specifying the data type of the value returned by the function. A function definition consists of: • • • • The keyword Function followed by the name of the function and an optional list of parameters. then function calls are checked to ensure that values passed to the function are of the appropriate type. the function ends and the flow of execution goes back to the calling routine.

You can also use a string. page 185 and Chapter 1. If you want to generate a URL for the portal service (psp) servlet. You can also use a string. 2009. &RUN_STATUS) returns Boolean. &RUN_STATUS. such as %Portal. nodename menuname Marketname Copyright © 1988. Oracle and/or its affiliates. Parameters Parameter Description portalname Specify the name of the portal used for this request. such as %Market. Else Return False. prefixed with the reserved word NODE.portalname. End-if. for this value. The ContentURI of the node that hosts the specified portal is used in the generated URL. You can also use a string.NODE. 279 . for this value. such as %Node.componentname." Declare Function. page 535 GenerateActGuideContentUrl Syntax GenerateActGuideContentlUrl(PORTAL.menuname. use the GenerateActGuidePortalURL function. &PROCESS_INSTANCE). Specify the name of the market of the component. Specify the name of the menu containing the activity guide. for this value. prefixed with the reserved word PORTAL. &UPDATEOK = SQLExec("update PS_PRCS_RQST set run_status = :1 where process_instance = :2". "PeopleCode Builtin Functions. The URL contains a reference to the content service (psc) servlet. If &UPDATEOK Then Return True. End-function.ActivityGuide) Description Use the GenerateActGuideContentUrl function to create a URL string that represents an absolute reference to the specified activity guide (life event) for the content servlet.Chapter 1 PeopleCode Built-in Functions function run_status_upd(&PROCESS_INSTANCE. for this value. See Also Chapter 1. such as %Menu. MENUNAME.nodename. You can also use a string. "PeopleCode Built-in Functions. All Rights Reserved.COMPONENT. Marketname. prefixed with the reserved word MENUNAME. Specify the name of the node that contains the activity guide." Return.

prefixed with the reserved word COMPONENT.nodename. All Rights Reserved. The PortalURI of the node that hosts the specified portal is used in the generated URL.COMPONENT." GenerateActGuidePortalUrl. "PeopleCode Built-in Functions.portalname.CHANGE_PASSWORD.componentname.MAINTAIN_ SECURITY.GBL See Also Chapter 1." GenerateActGuideRelativeUrl. . "QE_ACTIVITY_GUIDE_DEMO").menuname.MENUNAME.M arketname. NODE. "PeopleCode Built-in Functions.50 PeopleBook: Workflow Technology.⇒ "GBL". ActivityGuide Returns A string with the following format: http://Content URI of node/portal/node/l/ActivityGuide. might produce the following URL string: http://boynten8700/psc/ps/EMPLOYEE/QE_LOCAL/l/QE_ACTIVITY_GUIDE_DEMO. page 280 and Chapter 1.market This function returns a Null string if you specify an invalid portal or node. Oracle and/or its affiliates. "Designing Activity Guides" GenerateActGuidePortalUrl Syntax GenerateActGuidePortalUrl(PORTAL.component. 280 Copyright © 1988. for this value. MENUNAME. Example The following code: &AGURL = GenerateActGuideContentUrl(%Portal. such as %Component. The URL contains a reference to the portal service (psp) servlet. Specify the name of the Activity Guide.CHANGE_PASSWORD. page 282 Enterprise PeopleTools 8. %Node. COMPONENT. You can also use a string. ActivityGuide) Description Use the GenerateActGuidePortalUrl function to create a URL string that represents an absolute reference to the specified activity guide (life event) for the portal servlet.MAINTAIN_SECURITY.PeopleCode Built-in Functions Chapter 1 Parameter Description ComponentName Specify the name of the component. 2009. as a string.

page 279 and Chapter 1. Specify the name of the component. Oracle and/or its affiliates. Specify the name of the node that contains the activity guide. nodename menuname Marketname ComponentName ActivityGuide Returns A string with the following format: http://Portal URI of node/portal/node/l/ActivityGuide. such as %Menu. "QE_ACTIVITY_GUIDE_DEMO").GBL See Also Chapter 1. for this value. page 282 Enterprise PeopleTools 8. Specify the name of the Activity Guide. You can also use a string. as a string. Specify the name of the market of the component. such as %Portal. for this value.50 PeopleBook: Workflow Technology. "GBL". "PeopleCode Built-in Functions. such as %Component. "PeopleCode Built-in Functions. use the GenerateActGuideContentURL function.MAINTAIN_ SECURITY.MAINTAIN_SECURITY. You can also use a string.Chapter 1 PeopleCode Built-in Functions If you want to generate a URL for the portal content (psc) servlet. prefixed with the reserved word COMPONENT. "Designing Activity Guides" Copyright © 1988. You can also use a string. might create the following URL string: http://boynte700/psp/ps/EMPLOYEE/QE_LOCAL/l/QE_ACTIVITY_GUIDE_DEMO. Parameters Parameter Description portalname Specify the name of the portal used for this request. You can also use a string.CHANGE_PASSWORD. COMPONENT. 281 . You can also use a string." GenerateActGuideRelativeUrl. for this value. %Node. such as %Market. prefixed with the reserved word PORTAL. prefixed with the reserved word MENUNAME. MENUNAME. Example The following code: &AGURL = GenerateActGuidePortalUrl(%Portal. for this value. Specify the name of the menu containing the activity guide. prefixed with the reserved word NODE.CHANGE_PASSWORD. for this value. All Rights Reserved. such as %Node." GenerateActGuideContentUrl.market This function returns a Null string if you specify an invalid portal or node.component. 2009.

prefixed with the reserved word COMPONENT./. Specify the name of the Activity Guide.. for this value. such as %Component..MENUNAME. Specify the name of the market of the component. You can also use a string. such as %Market. prefixed with the reserved word MENUNAME. Specify the name of the node that contains the activity guide. prefixed with the reserved word PORTAL. for this value. such as %Node.componentname. You can also use a string. for this value. Marketname. You can also use a string. prefixed with the reserved word NODE. Specify the name of the menu containing the activity guide./. 2009./Portal/node/l/ActivityGuide. for this value.component. .. You can also use a string.portalname. Parameters Parameter Description portalname Specify the name of the portal used for this request. Example The following code: 282 Copyright © 1988. NODE. for this value. The relative reference is suitable for use on any page that itself has the simple URL format.nodename. nodename menuname Marketname ComponentName ActivityGuide Returns A string with the following format: . Oracle and/or its affiliates.COMPONENT.menuname.PeopleCode Built-in Functions Chapter 1 GenerateActGuideRelativeUrl Syntax GenerateActGuideRelativeUrl(PORTAL.ActivityGuide) Description Use the GenerateActGuideContentUrl function to create a URL string that represents an relative reference to the specified activity guide (life event).menu. such as %Portal. such as %Menu. as a string. All Rights Reserved. Specify the name of the component. You can also use a string.market This function returns a Null string if you specify an invalid portal or node.

The relative reference is suitable for use on any page that itself has the simple URL format. PeopleSoft recommends using the Transfer function for opening new windows.MAINTAIN_SECURITY.COMPONENT. This parameter is ignored by the content service. You can also use a string. If you want to generate an absolute URL for a component.GBL See Also Chapter 1. "PeopleCode Built-in Functions. COMPONENT. "Designing Activity Guides" GenerateComponentContentRelURL Syntax GenerateComponentContentRelURL(PORTAL.50 PeopleBook: Workflow Technology. for this value. Parameters Parameter Description PortalName Specify the name of the portal used for this request. . . but is a required part of the psc URL format.MENUNAME. %Node./.portalname. Oracle and/or its affiliates. as there may be problems maintaining state and window count. . OR &RecordObject1 [. MENUNAME. Copyright © 1988. "GBL".CHANGE_ PASSWORD." GenerateActGuideContentUrl. Note. keylist]) where keylist is a list of field references in the form: [recordname. 2009./EMPLOYEE/QE_LOCAL/l/QE_ACTIVITY_GUIDE_DEMO. All Rights Reserved.marketname. "QE_ACTIVITY_GUIDE_DEMO"). action. [.CHANGE_PASSWORD./. NODE. "PeopleCode Built-in Functions..MAINTAIN_SECURITY. pagename. Description Use the GenerateComponentContentRelURL function to create a URL string that represents a relative reference to the specified component for the content servlet. . [recordname. 283 .menuname.Chapter 1 PeopleCode Built-in Functions &AGURL = GenerateActGuideRelativeUrl(%Portal.MARKET. page 280 Enterprise PeopleTools 8..nodename. not this function.. such as %Portal.]field1 [. prefixed with the reserved word PORTAL. page 279 and Chapter 1. use the GenerateComponentContentURL function. &RecordObject2].]field2].PAGE." GenerateActGuidePortalUrl. might produce the following URL string: .componentname.

You can also use a string. Specify the name of the page that contains the content. prefixed with the reserved word NODE. The keys in the fieldlist must uniquely identify a row in the "to" page search record. such as %Node. You can also specify an empty string ("") for this value. such as %Component.. such as %Menu. Returns If the node has a Node Type of PIA. prefixed with the reserved word MENUNAME. . it must be prefixed with the keyword PAGE. If a unique row is not identified. of if Force Search Processing has been selected.. You can also use a string.. Specify the name of the market of the component../.PeopleCode Built-in Functions Chapter 1 Parameter Description NodeName Specify the name of the node that contains the content. Specify the name of the component.. by matching keys in the page you are transferring from. the search dialog appears. Valid actions are: MenuName Marketname ComponentName Pagename Action • • • • • "A" ( add) "U" (update) "L" (update/display all) "C" (correction) "E" (data entry) You can also specify an empty string ("") for this value. for this value. Oracle and/or its affiliates. 2009./Portal/node/c/menu. Specify the name of the menu containing the content././. a string of the following format is returned: .. prefixed with the reserved word COMPONENT./portal/node/?ICType=Panel&Menu=menu&Market=market &PanelGroupName=component?parameters 284 Copyright © 1988. for this value. such as %Market. You can also use a string. You can also use a string.component. All Rights Reserved. Keylist An optional list of field specifications used to select a unique row at level zero in the page you are transferring to. any field of that record object that is also a field of the search record for the destination component is added to keylist. If the keylist parameter is not supplied the destination component's search key must be found as part of the source components level 0 record buffer. prefixed with the reserved word MARKET. a string of the following format is returned: . If you specify a page name. If a record object is specified. for this value. Specify a single-character code. for this value.market?parameters If the node has a Node Type of ICType. It can also be an already instantiated record object./.

Component. page 290 and Chapter 1./psc/PS84/EMPLOYEEPORTAL/CRM/c/SFA. "U"." GenerateComponentRelativeURL.marketname. Oracle and/or its affiliates. Might create the following URL: .COMPONENT. . EMPLID) catch /* catch /* end-try. "CRM".CUSTOMERINFO.ADMIN_ WORKFORCE. action.portalname. "PeopleCode Built-in Functions. it's enclosed in a try-catch section so if an exception gets raised.Chapter 1 PeopleCode Built-in Functions The question mark and the text following the question mark may or may not be included. page 288. All Rights Reserved.SFA.PAGE. [. &RecordObject2]. MenuName. [recordname. Chapter 1. This function returns a Null string if you specify an invalid portal or node.GBL?page= CUST_DATA1&&Action=U&emplid=00001 Because this function terminates if the portal or node name is invalid. .. Page. "GBL". MARKET. page 285. keylist]) where keylist is a list of field references in the form: [recordname.]field2]./. . Page. page 292 Enterprise PeopleTools 8. NODE. Chapter 1.MENUNAME. depending on whether or not you specified a page and action or not. Copyright © 1988. Example The following code: &MyCompURL = GenerateComponentContentRelURL("EMPLOYEEPORTAL". "PeopleCode Built-in Functions. Component.nodename. "GBL". . 2009. try &MyURL = GenerateComponentContentRelURL(%Portal." GenerateComponentPortalURL. "U". 285 . OR &RecordObject1 [." GenerateComponentPortalRelURL.ABSENCE_HISTORY. "PeopleCode Built-in Functions.CUSTOMERINFO.]field1 [.menuname. ExceptionPortal &Ex1 error handling portal name not valid */ ExceptionNode &Ex2 error handling Node name not valid */ See Also Chapter 1.50 PeopleBook: PeopleCode API Reference.componentname./.. EMPLID). it can be handled. "HRMS".CUST_DATA1. Menuname. ABSENCE_HISTORY. "Internet Script Classes (iScript)" GenerateComponentContentURL Syntax GenerateComponentContentURL(PORTAL. "PeopleCode Built-in Functions..pagename." GenerateComponentContentURL.

such as %Market. Specify the name of the market of the component. This parameter is ignored by the content service. Oracle and/or its affiliates.PeopleCode Built-in Functions Chapter 1 Description Use the GenerateComponentContentURL function to create a URL string that represents an absolute reference to the specified component for the content servlet. The URL contains a reference to the portal content (psc) servlet. 286 Copyright © 1988. such as %Menu. for this value. The ContentURI of the specified node is used in the generated URL. 2009. but is a required part of the psc URL format. prefixed with the reserved word MARKET. You can also use a string. You can also specify an empty string ("") for this value. for this value. If you want to generate a URL for the portal service (psp). You can also use a string. Specify the name of the page that contains the content. If you specify a page name. use the GenerateComponentPortalURL function. prefixed with the reserved word COMPONENT. Specify the name of the menu containing the content. such as %Component. for this value. Specify the name of the component. Specify the name of the node that contains the content. All Rights Reserved. for this value. prefixed with the reserved word PORTAL. Valid actions are: NodeName MenuName Marketname ComponentName Pagename Action • • • • • "A" ( add) "U" (update) "L" (update/display all) "C" (correction) "E" (data entry) You can also specify an empty string ("") for this value. You can also use a string. . it must be prefixed with the keyword PAGE. You can also use a string. You can also use a string. such as %Portal. Parameters Parameter Description PortalName Specify the name of the portal used for this request. for this value. prefixed with the reserved word NODE. such as %Node. prefixed with the reserved word MENUNAME. Specify a single-character code.

ADMIN_WORKFORCE. of if Force Search Processing has been selected. "CRM". ExceptionPortal &Ex1 error handling portal name not valid */ ExceptionNode &Ex2 error handling Node name not valid */ Copyright © 1988. Component. EMPLID).CUSTOMERINFO. MenuName. "U". 287 . If the keylist parameter is not supplied the destination component's search key must be found as part of the source components level 0 record buffer. by matching keys in the page you are transferring from. 2009. If a unique row is not identified. it can be handled. "U".market?parameters If the node has a Node Type of ICType. The keys in the fieldlist must uniquely identify a row in the "to" page search record. ABSENCE_HISTORY. "GBL". Page. "GBL". it's enclosed in a try-catch section so if an exception gets raised. Component. the search dialog appears.component.ABSENCE_HISTORY. Example The following code: &MyCompURL = GenerateComponentContentURL("EMPLOYEEPORTAL". If a record object is specified. Oracle and/or its affiliates. Might create the following URL: http://serverx/servlets/psc/PS84/EMPLOYEEPORTAL/CRM/c/SFA.Chapter 1 PeopleCode Built-in Functions Parameter Description Keylist An optional list of field specifications used to select a unique row at level zero in the page you are transferring to. This function returns a Null string if you specify an invalid portal or node. a string of the following format is returned: http://Content URI of host node/portal/node/?ICType=Panel&Menu=menu&Market=market &PanelGroupName=component?parameters The question mark and the text following the question mark may or may not be included.SFA. Page.CUST_DATA1. All Rights Reserved. Returns If the node has a Node Type of PIA.GBL?page= CUST_DATA1&&Action=U&emplid=00001 Because this function terminates if the portal or node name is invalid. "HRMS". It can also be an already instantiated record object.CUSTOMERINFO. a string of the following format is returned: http://Content URI of host node/Portal/node/c/menu. EMPLID) catch /* catch /* end-try. depending on whether or not you specified a page and action or not. try &MyURL = GenerateComponentContentURL(%Portal. any field of that record object that is also a field of the search record for the destination component is added to keylist. Menuname.

You can also use a string. page 290 and Chapter 1.portalname. . such as %Menu. nodename menuname Marketname 288 Copyright © 1988. Chapter 1.pagename.COMPONENT. "PeopleCode Built-in Functions." GenerateComponentPortalURL. NODE. [recordname. OR &RecordObject1 [.marketname. Specify the name of the market of the component. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. Specify the name of the node that contains the content. menuname.PeopleCode Built-in Functions Chapter 1 See Also Chapter 1.componentname. Parameters Parameter Description portalname Specify the name of the portal used for this request. for this value. for this value. such as %Portal. You can also use a string. 2009. Specify the name of the menu containing the content. page 292 Enterprise PeopleTools 8. You can also use a string.]field1 [. Oracle and/or its affiliates. "PeopleCode Built-in Functions.50 PeopleBook: PeopleCode API Reference. If you want to generate an absolute URL for a component. . . The relative reference is suitable for use on any page that itself has the simple URL format. such as %Node. You can also use a string. prefixed with the reserved word NODE. "Internet Script Classes (iScript)" GenerateComponentPortalRelURL Syntax GenerateComponentPortalRelURL(PORTAL. keylist]) where keylist is a list of field references in the form: [recordname. such as %Market.MENUNAME.PAGE. action. page 288.MARKET. Chapter 1." GenerateComponentRelativeURL.]field2]. prefixed with the reserved word MARKET. page 283. .nodename. Description Use the GenerateComponentPortalRelURL function to create a URL string URL string that represents a relative reference the specified content (component)." GenerateComponentContentRelURL. [." GenerateComponentPortalRelURL. for this value. for this value. prefixed with the reserved word PORTAL. use the GenerateComponentPortalURL function. &RecordObject2]. . All Rights Reserved. prefixed with the reserved word MENUNAME.

If you specify a page name. The keys in the fieldlist must uniquely identify a row in the "to" page search record. If the keylist parameter is not supplied the destination component's search key must be found as part of the source components level 0 record buffer. a string of the following format is returned: . This function returns a Null string if you specify an invalid portal or node. 2009.. the search dialog appears.. You can also specify a Null string ("") for this value. If a unique row is not identified./portal/node/?ICType=Panel&Menu=menu&Market= market&PanelGroupName=component?parameters The question mark and the text following the question mark may or may not be included. by matching keys in the page you are transferring from. for this value. It can also be an already instantiated record object. prefixed with the reserved word COMPONENT. Oracle and/or its affiliates./. it must be prefixed with the keyword PAGE. If a record object is specified. Specify the name of the page that contains the content. keylist An optional list of field specifications used to select a unique row at level zero in the page you are transferring to. Example The following code: Copyright © 1988. depending on whether or not you specified a page and action or not. 289 . Returns If the node has a Node Type of PIA. such as %Component... You can also use a string../portal/node/c/menu. All Rights Reserved.Chapter 1 PeopleCode Built-in Functions Parameter Description ComponentName Specify the name of the component. any field of that record object that is also a field of the search record for the destination component is added to keylist./.component.market?parameters If the node has a Node Type of ICType. of if Force Search Processing has been selected./. Valid actions are: pagename action • • • • • "A" ( add) "U" (update) "L" (update/display all) "C" (correction) "E" (data entry) You can also specify a Null string ("") for this value./.. a string of the following format is returned: . Specify a single-character code.

Chapter 1. MenuName.COMPONENT. The PortalURI of the node that hosts the specified portal is used in the generated URL. keylist]) where keylist is a list of field references in the form: [recordname.nodename." GenerateComponentContentRelURL. "". Specify the name of the node that contains the content. ./. page 290.50 PeopleBook: PeopleCode API Reference.pagename. All Rights Reserved.]field2]. . page 285. &RecordObject2].MENUNAME.PAGE.]field1 [.gbl See Also Chapter 1. [../EMPLOYEEPORTAL/CRM/c/sfa. . "CRM". "Internet Script Classes (iScript)" GenerateComponentPortalURL Syntax GenerateComponentPortalURL(PORTAL.. Component.PeopleCode Built-in Functions Chapter 1 &MyCompURL = GenerateComponentPortalRelURL("EMPLOYEEPORTAL". for this value. nodename 290 Copyright © 1988. 2009. "PeopleCode Built-in Functions. If you want to generate a URL for the portal content (psc) servlet. such as %Portal./. "PeopleCode Built-in Functions. [recordname..menuname.marketname. page 283. . ." GenerateComponentContentURL.componentname. NODE. prefixed with the reserved word NODE. such as %Node.SFA. Oracle and/or its affiliates. Parameters Parameter Description portalname Specify the name of the portal used for this request. for this value. MARKET.customerinfo. "PeopleCode Built-in Functions." GenerateComponentPortalURL. ""). You can also use a string. "GBL". Description Use the GenerateComponentPortalURL function to create a URL string that represents an absolute reference to the specified component for the portal servlet. Chapter 1. OR &RecordObject1 [. . use the GenerateComponentContentURL function. Chapter 1. The URL contains a reference to the portal service (psp) servlet. page 292 and Enterprise PeopleTools 8. You can also use a string. Might create the following URL: . prefixed with the reserved word PORTAL.portalname.CUSTOMERINFO." GenerateComponentRelativeURL. "PeopleCode Builtin Functions. action.

You can also use a string. such as %Market.market?parameters If the node has a Node Type of ICType. If a record object is specified. for this value. Copyright © 1988.component. It can also be an already instantiated record object. You can also use a string. All Rights Reserved. a string of the following format is returned: http://Portal URI of host node/portal/node/c/menu. If you specify a page name. of if Force Search Processing has been selected. the search dialog appears. then Portal URI of host node will always be the one you're currently logged in as.Chapter 1 PeopleCode Built-in Functions Parameter Description menuname Specify the name of the menu containing the content. Specify the name of the page that contains the content. You can also specify a Null string ("") for this value. You can also use a string. If a unique row is not identified. If the host node is local. for this value. keylist An optional list of field specifications used to select a unique row at level zero in the page you are transferring to. Specify a single-character code. Returns If the node has a Node Type of PIA. by matching keys in the page you are transferring from. Valid actions are: Marketname ComponentName pagename action • • • • • "A" ( add) "U" (update) "L" (update/display all) "C" (correction) "E" (data entry) You can also specify a Null string ("") for this value. such as %Component. Specify the name of the component. 2009. Oracle and/or its affiliates. The keys in the fieldlist must uniquely identify a row in the "to" page search record. any field of that record object that is also a field of the search record for the destination component is added to keylist. a string of the following format is returned: http://Portal URI of host node/portal/node/?ICType=Panel&Menu= menu&Market=market&PanelGroupName= component?parameters Note. it must be prefixed with the keyword PAGE. for this value. Specify the name of the market of the component. prefixed with the reserved word MENUNAME. prefixed with the reserved word MARKET. If the keylist parameter is not supplied the destination component's search key must be found as part of the source components level 0 record buffer. prefixed with the reserved word COMPONENT. 291 . such as %Menu.

MENUNAME. Chapter 1. "U") | &sQueryString. "PeopleCode Builtin Functions. .EM_ BUSINESS_UNIT. 292 Copyright © 1988. ""). [.com/servlets/psp/testsite/EMPLOYEEPORTAL/CRM/c/sfa. Example The following code: &MyCompURL = GenerateComponentPortalURL("EMPLOYEEPORTAL". %Market. &rwCurrent = GetRow().pagename.EM_BILL_PRESENTMENT. [recordname.EM_VCHR_INQ_VW. ." GenerateComponentContentRelURL.RedirectURL(&sURL). Component.50 PeopleBook: PeopleCode API Reference." GenerateComponentPortalRelURL. All Rights Reserved. MARKET.customerinfo." | &sComponent.Value. Might create the following URL: http://mike. keylist]) where keylist is a list of field references in the form: [recordname. page 292 Enterprise PeopleTools 8. page 283. %Response. &sQueryString = GenerateComponentPortalURL(%Portal.EM_VCHR_PYMNT_CLN". .CUSTOMERINFO.marketname. @&sComponent. See Also Chapter 1. "Internet Script Classes (iScript)" GenerateComponentRelativeURL Syntax GenerateComponentRelativeURL(PORTAL.SFA. "GBL".EM_VCHR_INQ_VW. 2009. &sComponent = "Component.]field2]. This function returns a Null string if you specify an invalid portal or node. page 288 and Chapter 1.nodename. page 285. action.COMPONENT. "PeopleCode Built-in Functions. %Node. .PAGE. "PeopleCode Built-in Functions. MenuName. &sQueryString = &sQueryString | "&VOUCHER_ID=" | &rwCurrent. Chapter 1. NODE. MenuName.PeopleCode Built-in Functions Chapter 1 The question mark and the text following the question mark may or may not be included. &sPage = "Page. "PeopleCode Built-in Functions. "".portalname.]field1 [.Value. "CRM".menuname." GenerateComponentRelativeURL.VOUCHER_ID." GenerateComponentContentURL.gbl The following example uses a de-referenced name for the component. @&sPage.componentname. Oracle and/or its affiliates. /*.The Search Record keys -*/ &sQueryString = &sQueryString | "&BUSINESS_UNIT=" | &rwCurrent. depending on whether or not you specified a page and action or not.

use either the GenerateComponentContentURL or GenerateComponentPortalURL function. prefixed with the reserved word NODE. You can also use a string. If you specify a page name. for this value. Specify the name of the menu containing the content. You can also use a string. prefixed with the reserved word COMPONENT. for this value. prefixed with the reserved word MARKET. All Rights Reserved. Parameters Parameter Description portalname Specify the name of the portal used for this request. . You can also use a string. Description Use the GenerateComponentRelativeURL function to create a URL string that represents a relative reference the specified content (component). it must be prefixed with the keyword PAGE. Specify the name of the page that contains the content.Chapter 1 PeopleCode Built-in Functions OR &RecordObject1 [. prefixed with the reserved word PORTAL. such as %Component. prefixed with the reserved word MENUNAME. You can also use a string. such as %Portal. Oracle and/or its affiliates. . for this value. for this value. Specify a single-character code. Specify the name of the node that contains the content. If you want to generate an absolute URL for a component. Copyright © 1988. Specify the name of the market of the component. Valid actions are: nodename menuname Marketname ComponentName Pagename Action • • • • • "A" ( add) "U" (update) "L" (update/display all) "C" (correction) "E" (data entry) You can also specify a Null string ("") for this value. The relative reference is suitable for use on any page that itself has the simple URL format. You can also specify a Null string ("") for this value. &RecordObject2]. Specify the name of the component. such as %Menu. such as %Market. 293 . You can also use a string. for this value. such as %Node. 2009.

CUSTOMERINFO.. "")." GenerateComponentPortalURL. It can also be an already instantiated record object. Component. "PeopleCode Built-in Functions. Example The following code example: &MyCompURL = GenerateComponentRelativeURL("EMPLOYEEPORTAL"./EMPLOYEEPORTAL/CRM/c/sfa. depending on whether or not you specified a page and action or not. "PeopleCode Built-in Functions. "Internet Script Classes (iScript)" 294 Copyright © 1988.gbl See Also Chapter 1. page 288 and Chapter 1. by matching keys in the page you are transferring from. If a record object is specified.. any field of that record object that is also a field of the search record for the destination component is added to keylist.././. "".50 PeopleBook: PeopleCode API Reference.. MenuName. Chapter 1. page 283. "CRM"..." GenerateComponentPortalRelURL./. . Chapter 1./. "PeopleCode Builtin Functions. Might yield the following: . 2009.SFA. the search dialog appears.customerinfo. The keys in the fieldlist must uniquely identify a row in the "to" page search record.market?parameters If the node has a Node Type of ICType. If the keylist parameter is not supplied the destination component's search key must be found as part of the source components level 0 record buffer. page 290 Enterprise PeopleTools 8." GenerateComponentContentRelURL. page 285.. This function returns a Null string if you specify an invalid portal or node.PeopleCode Built-in Functions Chapter 1 Parameter Description Keylist An optional list of field specifications used to select a unique row at level zero in the page you are transferring to." GenerateComponentContentURL./. If a unique row is not identified. of if Force Search Processing has been selected.. a string of the following format is returned: . a string of the following format is returned: ./portal/node/?ICType=Panel&Menu=menu&Market= market&PanelGroupName=component?parameters The question mark and the text following the question mark may or may not be included.. All Rights Reserved./. Returns If the node has a Node Type of PIA. Oracle and/or its affiliates. "PeopleCode Built-in Functions. "GBL".component./portal/node/c/menu.

for this value. If you want to generate a relative URL. such as %Node. 295 .excite. Specify the name of the node that contains the content.Chapter 1 PeopleCode Built-in Functions GenerateExternalPortalURL Syntax GenerateExternalPortalURL(PORTAL. This function returns a Null string if you specify an invalid portal or node.com"). "CRM". The PortalURI of the node that hosts the specified portal is used in the generated URL. so %Node can always be passed in for the Node parameter. Example The following code: &url = GenerateExternalPortalURL("EMPLOYEEPORTAL". prefixed with the reserved word PORTAL.excite.nodename. use the GenerateExternalRelativeURL function. for this value. Might create the following URL: http://myserver/psp/ps/EMPLOYEEPORTAL/CRM/e/http%3a%2f%2fwww. 2009. URL) Description Use the GenerateExternalPortalURL function to create a URL string that represents an absolute reference the specified external content (URL) on the portal servlet. All Rights Reserved. Specify the URL to be used for this content. NodeName URL Returns A string of the following format is returned: http://Portal URI of host node/Portal/node/e/encodedURL When the portal servlet evaluates an external URL. the Node is ignored.portalname. NODE. You can also use a string. Parameters Parameter Description portalname Specify the name of the portal used for this request. Oracle and/or its affiliates. "http://www.com Copyright © 1988. The generated URL contains a reference to the portal service (psp) servlet. prefixed with the reserved word NODE. You can also use a string. such as %Portal.

/Portal/node/e/encodedURL This function returns a Null string if you specify an invalid portal or node.. such as %Portal. such as %Node." GenerateExternalRelativeURL. You can also use a string. All Rights Reserved. for this value./. NODE. If you want to generate an absolute URL.PeopleCode Built-in Functions Chapter 1 See Also Chapter 1. NodeName EncodedURL Returns A string of the following format is returned: . prefixed with the reserved word NODE. The relative reference is suitable for use on any page that itself has the simple URL format and which is served by the portal servlet (psp). "PeopleCode Built-in Functions.. 296 Copyright © 1988.excite. use the GenerateExternalPortalURL function. EncodedURL) Description Use the GenerateExternalRelativeURL function to create a URL string that represents a relative reference the specified external content (URL).com"). . 2009. Specify the URL to be used for this content. page 296 Enterprise PeopleTools 8.. prefixed with the reserved word PORTAL. Specify the name of the node that contains the content. "CRM". "http: //www.50 PeopleBook: PeopleCode API Reference.portalname. for this value.nodename. "Internet Script Classes (iScript)" GenerateExternalRelativeURL Syntax GenerateExternalRelativeURL(PORTAL. Parameters Parameter Description PortalName Specify the name of the portal used for this request./. Example The following code: &url = GenerateExternalRelativeURL("EMPLOYEEPORTAL". You can also use a string. Oracle and/or its affiliates.

excite. the default tab is used. for this value. Tabname Returns If the node has a Node Type of PIA. such as %Portal.nodename.. a string of the following format is returned: Copyright © 1988.. nodename Specify the name of the node that contains the content. The PortalURI of the node that hosts the specified portal is used in the generated URL. The value specified for this parameter is ignored. page 296 Enterprise PeopleTools 8. The generated URL contains a reference to the portal service (psp) servlet. you must still specify a value for this parameter. All Rights Reserved. for this value. The node name that is used is automatically calculated. This should be the node that hosts the specified portal./. You can also use a string. If you specify a null string ("")./. If you want to generate a relative URL. "Internet Script Classes (iScript)" GenerateHomepagePortalURL Syntax GenerateHomepagePortalURL(PORTAL. 2009. You can also use a string.Chapter 1 PeopleCode Built-in Functions Might create the following URL: . Specify the name of the tab on the homepage that you want to generate a URL for.Tabname) Description Use the GenerateHomepagePortalURL function to create a URL string that represents an absolute reference the specified homepage tab on the portal servlet. prefixed with the reserved word PORTAL. Note. Oracle and/or its affiliates. "PeopleCode Built-in Functions." GenerateExternalRelativeURL. However. 297 . Parameters Parameter Description portalname Specify the name of the portal used for this request./EMPLOYEEPORTAL/CRM/e/http%3a%2f%2fwww. NODE.portalname. such as %Node. use the GenerateHomepageRelativeURL function.com See Also Chapter 1. prefixed with the reserved word NODE.50 PeopleBook: PeopleCode API Reference..

Tabname) Description Use the GenerateHomepageRelativeURL function to create a URL string that represents a relative reference the specified homepage on the portal servlet. NODE. NODE. for this value. Example Specifying the following code: &HomePage = GenerateHomepagePortalURL(%Portal. Might generate the following string: http://bejing/psp/psoft/crm/North_Asia/h/?tab=DEFAULT See Also Chapter 1. "PeopleCode Built-in Functions. .50 PeopleBook: PeopleCode API Reference. You can also use a string. ""). Parameters Parameter Description portalname Specify the name of the portal used for this request.50 PeopleBook: PeopleCode API Reference. for this value. page 298 Enterprise PeopleTools 8. 2009. You can also use a string. "PortalRegistry Classes" Enterprise PeopleTools 8.North_Asia. nodename 298 Copyright © 1988." GenerateHomepageRelativeURL. prefixed with the reserved word NODE. . This should be the node that hosts the specified portal. The relative reference is suitable for use on any page that itself has the simple URL format. such as %Portal. "Internet Script Classes (iScript)" GenerateHomepageRelativeURL Syntax GenerateHomepageRelativeURL(PORTAL. All Rights Reserved. prefixed with the reserved word PORTAL.nodename. Specify the name of the node that contains the content. If you want to generate an absolute URL.PeopleCode Built-in Functions Chapter 1 http://Portal URI of host node/Portal/node/h/?tab=tabname This function returns a Null string if you specify an invalid portal or node. Oracle and/or its affiliates.portalname. such as %Node. use the GenerateHomepagePortalURL function.

299 .. "PortalRegistry Classes" Enterprise PeopleTools 8. This mobile function currently exists for backward compatibility only../crm/North_Asia/h/?tab=DEFAULT See Also Chapter 1. the default tab is used. Copyright © 1988. a string of the following format is returned: .Chapter 1 PeopleCode Built-in Functions Parameter Description Tabname Specify the name of the tab on the homepage that you want to generate a URL for. Use the GenerateMobileTree function to display data in a tree format. Might generate the following string: . "PeopleCode Built-in Functions. page 297 Enterprise PeopleTools 8. The result of the GenerateMobileTree function is an HTML string././. "Internet Script Classes (iScript)" GenerateMobileTree Syntax GenerateMobileTree(&CIObject [. All Rights Reserved.North_Asia./?cmd=start This function returns a Null string if you specify an invalid portal or node./Portal/node/h/?tab=tabname If the node has a Node Type of ICType. 2009.CIObject_property]) Description Note.50 PeopleBook: PeopleCode API Reference. Returns If the node has a Node Type of PIA../.50 PeopleBook: PeopleCode API Reference. Oracle and/or its affiliates. NODE. a string of the following format is returned: .. "").. with nodes and leaves.. PeopleSoft Mobile Agent is a deprecated product. Example The following code: &HomePage = GenerateHomepageRelativeURL(%Portal." GenerateHomepagePortalURL. If you specify a null string ("")./. which can be displayed in an HTML area control.

50 PeopleBook: PeopleCode Developer's Guide. so you must populate your tree data one item at a time. Previous. these records do not have to contain any data. and cannot be expanded or collapsed. and the icon has a . When a node is collapsed. When the icon for a node has no + or − sign in it. You can collapse and expand a node by clicking in the icon. Mobile does not support standalone rowsets. all the nodes that report to it are displayed.PeopleCode Built-in Functions Chapter 1 Use this function in the OnInit event to display the mobile tree. Left. "Using HTML Trees and the GenerateTree Function. collapsing or selecting nodes. This enables you to view the tree at different levels of detail. and the icon has a + sign. Last. depending on whether the node is collapsed or expanded. they can be populated using PeopleCode. • • The GenerateMobileTree function does not take a standalone rowset for data. These links are automatically generated as part of the execution of GenerateTree. Right) enable the user to navigate around the tree. Define the Component Interface. You must use a Component Interface that is created from a component that contains the TREECTL_HDR and TREECTL_NODE records. All Rights Reserved." Using HTML Tree Rowset Records. See Enterprise PeopleTools 8. Using the GenerateMobileTree Function The GenerateMobileTree function is similar to the GenerateTree function. You cannot use the Tree Classes with the GenerateMobileTree function. When a node is expanded. The icon next to a node can have a + sign or a . there are several important differences.sign. 300 Copyright © 1988. none of the nodes that report to the collapsed node are displayed. and on the OnChange event for programs related to expanding. Next. Mobile HTML Tree The positional links at the top of the page (First. When the Component Interface is synched to the device. it is a terminal node. To use the GenerateMobileTree function: 1. .sign in it. Oracle and/or its affiliates. 2009. however.

This is a property on the mobile object that is to be viewed in a hierarchy tree view. The action an end user takes (selecting a row. 3. Copyright © 1988. leaves. This property must be a character field that is at least 46 characters long. CIObject_property Returns None. and so on. 2009. or expanding or collapsing a node) is accessible to this property. 301 . specifying how it displays on the mobile page. images. generate the mobile tree. Populate the tree. The value of the Component Interface long text field is what is displayed in the HTML area. Determine what property on the Component Interface is going to contain the OnChange PeopleCode used to evaluate the end user action and call the appropriate PeopleCode programs. The field can be made invisible.Chapter 1 PeopleCode Built-in Functions 2. This object is from a peer reference. specify values for the nodes. and so on. Specify this property as the value for the PAGE_FIELD_NAME field on the TREECTRL_HDR_SBR record. Add an HTML area to the mobile page. Parameters Parameter Description &CIObject This is the mobile object that is to be viewed in a hierarchy tree view. Example In the OnInit event. All Rights Reserved. This involves adding a long text field to the Component Interface. 4. Oracle and/or its affiliates. 5.

LEAF_FLAG = "N".RELTREE_NDE.DESCR = "Descr 3".RDM. Oracle and/or its affiliates. &MyCI. &OB.RDM.GetCompIntfc(ComIntfc.Item(2). &MyCI.RDM. &MyCI. The following PeopleCode is used in the OnChange event (used for when a user selects a node.RDM.TREE_NODE = "NAME 3".Item(3). &MyCI. &ob = %ThisMobileObject. See Also Chapter 1. &MyCI.RELTREE_NDE.Key_01 = "2". &MyCI = %Session.Create().Item(2).GetCompIntfc(ComIntfc.RDM. &MyCI.Item(3).RELTREE_NDE.RDM. &ob = %ThisMobileObject. &MyCI.RDM.RDM.RELTREE_NDE. &MyCI. &MyCI. 1) = "S" Then Warning ("This node has been selected"). &MyCI. &MyCI.RELTREE_NDE.RELTREE_NDE.TREE_NODE = "NAME 1".RELTREE_NDE.RELTREE_NDE. All Rights Reserved.RDM.Item(2). .RDM.RELTREE_NDE.TREELEVENT).TREELEVENT. &MyCI.InsertItem(2). &MyCI.RDM_RELTREE). &MyCI.PAGE_FIELD_NAME = "TREELEVELNT". page 317 302 Copyright © 1988.PARENT_FLAG = "Y".RDM.RELTREE_NDE. &MyCI.QE_COMMENTS = GenerateMobileTree(&MyCI).RELTREE_NDE.Item(2).InsertItem(3).RDM.RELTREE_NDE.Item(3). End-If.RELTREE_NDE.Item(3).Item(3).TREE_LEVEL_NUM = 1.Item(2).LEAF_FLAG = "N".DESCR = "Descr 1".Item(1). &MyCI. &MyCI.PAGE_FIELD_NAME = "TREECTLEVENT" If Left(%ThisMobileObject. &ob. &MyCI.Item(1).RDM.RELTREE_NDE.TREE_NODE = "NAME 1".Key_01 = "2".Get().RDM. &MyCI.PARENT_FLAG = "Y". &MyCI.RDM.RELTREE_NDE.TREE_LEVEL_NUM = 2.Item(1). %ThisMobileObject.RELTREE_NDE.RDM. &MyCI.DESCR = "Descr 2".RELTREE_NDE.PeopleCode Built-in Functions Chapter 1 Local ApiObject &ob.Item(1).InsertItem(1).RELTREE_NDE.QE_COMMENTS = GenerateMobileTree(&MyCI.TREE_LEVEL_NUM = 1. 2009. &MyCI.RDM.RDM. &MyCI. &MyCI = %Session. expands a node or closes a node): Local ApiObject &ob.LEAF_FLAG = "N".Item(1)." GenerateTree.PARENT_FLAG = "Y". "PeopleCode Built-in Functions.RDM_RELTREE). &MyCI.

If you want to generate a relative URL. 303 . When Query is being run on a PeopleTools version prior to 8.16 and higher. This does not automatically open a new browser instance. False otherwise. Specify the name of the query you want to generate a URL for. 2009.QueryName. the query URL does not include the ability to specify if a query is public or private. the query is public. If you are building a URL for a portal node that is on a PeopleTools release prior to 8. such as %Node.portalname. If you want to generate a URL for the portal service (psp) servlet. the URL is for a new browser instance. Specify whether the URL is for a new browser instance. you must remove the public or private keyword before trying to use the URL. This parameter takes a Boolean value: True. use the GenerateQueryPortalURL function. On PeopleTools versions 8. False otherwise. All Rights Reserved. IsNewWindow]) Description Use the GenerateQueryContentURL function to create a URL string that represents an absolute reference the specified query (URL) on the content servlet. If the value is True this function generates a new state block for use in a separate browser instance. for this value. prefixed with the reserved word NODE. The PortalURI of the node that hosts the specified portal is used in the generated URL. It just supports it.16. You can also use a string. Oracle and/or its affiliates. This parameter takes a Boolean value: True.IsPublic [.Chapter 1 PeopleCode Built-in Functions GenerateQueryContentURL Syntax GenerateQueryContentURL(PORTAL. for this value.nodename. Parameters Parameter Description portalname Specify the name of the portal used for this request. such as %Portal. The generated URL contains a reference to the portal content (psc) servlet. prefixed with the reserved word PORTAL.16. the generated URL contains either the keyword PUBLIC or PRIVATE prepended to the query name. Copyright © 1988. nodename Queryname IsPublic IsNewWindow Note. use the GenerateQueryRelativeURL function. Specify whether the query is public or private. The default is False. You can also use a string. This parameter takes a string value. Specify the name of the node that contains the query.NODE.

QUERYNAME See Also Chapter 1. might produce a string as follows: http://bsto091200/psc/ps_newwin/EMPLOYEE/RMTNODE/q/?ICAction=ICQryNameURL= PUBLIC. and the node has a Node Type of PIA. Example The following code example: &url = GenerateQueryContentURL(%Portal. Oracle and/or its affiliates.nodename. .QueryName This function returns a Null string if you specify an invalid portal or node. True. True)." GenerateQueryRelativeURL. IsNewWindow]) 304 Copyright © 1988. "Internet Script Classes (iScript)" Enterprise PeopleTools 8. "RMTNODE". "PeopleCode Built-in Functions.PeopleCode Built-in Functions Chapter 1 Returns If IsPublic is specified as True. True). page 306 Enterprise PeopleTools 8. a string of the following format is returned: http://PortalURI/Portal/node/q/?ICAction=ICQryNameURL=PRIVATE.50 PeopleBook: PeopleCode API Reference. 2009." GenerateQueryPortalURL.50 PeopleBook: PeopleCode API Reference. might produce a string as follows: http://bsto091200/psc/ps/EMPLOYEE/RMTNODE/q/?ICAction=ICQryNameURL=PUBLIC. All Rights Reserved. "RMTNODE".portalname.NODE.QUERYNAME The following code example uses the optional parameter to produce a URL that supports a new browser instance: &url = GenerateQueryContentURL(%Portal. "Getting Started with PeopleSoft Query" GenerateQueryPortalURL Syntax GenerateQueryPortalURL(PORTAL.IsPublic [. "QUERYNAME".QueryName.QueryName If IsPublic is specified as False. and the node has a Node Type of PIA. "Query Classes" Enterprise PeopleTools 8. "PeopleCode Built-in Functions.50 PeopleBook: PeopleSoft Query. a string of the following format is returned: http://PortalURI/Portal/node/q/?ICAction=ICQryNameURL=PUBLIC. page 304 and Chapter 1. "QUERYNAME".

such as %Node. If you want to generate a URL for the portal content (psc) servlet.Chapter 1 PeopleCode Built-in Functions Description Use the GenerateQueryPortalURL function to create a URL string that represents an absolute reference the specified query (URL) on the portal servlet. Oracle and/or its affiliates. The generated URL contains a reference to the portal service (psp) servlet. False otherwise. and the node has a Node Type of PIA. for this value.16 and higher. use the GenerateQueryRelativeURL function. If you are building a URL for a portal node that is on a PeopleTools release prior to 8. You can also use a string. 2009. When Query is being run on a PeopleTools version prior to 8. prefixed with the reserved word PORTAL. for this value. On PeopleTools versions 8. This does not automatically open a new browser instance. 305 . This parameter takes a Boolean value: True. Parameters Parameter Description portalname Specify the name of the portal used for this request. prefixed with the reserved word NODE. The PortalURI of the node that hosts the specified portal is used in the generated URL. such as %Portal. nodename Queryname IsPublic IsNewWindow Note. Specify the name of the node that contains the query. This parameter takes a string value. Specify whether the query is public or private. use the GenerateQueryContentURL function. you must remove the public or private keyword before trying to use the URL. Returns If IsPublic is specified as True. the generated URL contains either the keyword PUBLIC or PRIVATE prepended to the query name.QueryName Copyright © 1988. If you want to generate a relative URL. This parameter takes a Boolean value: True. the query is public.16. The default is False. the query URL does not include the ability to specify if a query is public or private. It just supports it. a string of the following format is returned: http://PortalURI/Portal/node/q/?ICAction=ICQryNameURL=PUBLIC. If the value is True this function generates a new state block for use in a separate browser instance. Specify the name of the query you want to generate a URL for. Specify whether the URL is for a new browser instance. the URL is for a new browser instance. False otherwise. You can also use a string.16. All Rights Reserved.

"PeopleCode Built-in Functions. "RMTNODE".50 PeopleBook: PeopleCode API Reference. a string of the following format is returned: http://PortalURI/Portal/node/q/?ICAction=ICQryNameURL=PRIVATE." GenerateQueryContentURL.50 PeopleBook: PeopleSoft Query.50 PeopleBook: PeopleCode API Reference. "QUERYNAME". 306 Copyright © 1988.QueryName This function returns a Null string if you specify an invalid portal or node. "RMTNODE". . Oracle and/or its affiliates. and the node has a Node Type of PIA. "PeopleCode Built-in Functions. All Rights Reserved. The relative reference is suitable for use on any page that itself has the simple URL format.portalname. page 306 Enterprise PeopleTools 8. "QUERYNAME".PeopleCode Built-in Functions Chapter 1 If IsPublic is specified as False.IsPublic [.nodename. "Getting Started with PeopleSoft Query" GenerateQueryRelativeURL Syntax GenerateQueryRelativeURL(PORTAL. Example The following code example: &url = GenerateQueryPortalURL(%Portal. might produce a string as follows: http://bsto091200/psp/ps/EMPLOYEE/RMTNODE/q/?ICAction=ICQryNameURL=PUBLIC.QueryName." GenerateQueryRelativeURL. page 303 and Chapter 1.QUERYNAME See Also Chapter 1. 2009. "Query Classes" Enterprise PeopleTools 8. True). True). True.QUERYNAME The following code example uses the optional parameter to produce a URL that supports a new browser instance: &url = GenerateQueryPortalURL(%Portal. might produce a string as follows: http://bsto091200/psp/ps_newwin/EMPLOYEE/RMTNODE/q/?ICAction=ICQryNameURL= PUBLIC. "Internet Script Classes (iScript)" Enterprise PeopleTools 8.NODE. IsNewWindow]) Description Use the GenerateQueryRelativeURL function to creates a URL string that represents a relative reference to the specified query on the portal servlet.

. use either the GenerateQueryPortalURL or GenerateQueryContentURL function. Specify the name of the query you want to generate a URL for. the generated URL contains either the keyword PUBLIC or PRIVATE prepended to the query name. Returns If IsPublic is specified as True. 307 . prefixed with the reserved word NODE. You can also use a string. False otherwise. the query URL does not include the ability to specify if a query is public or private. a string of the following format is returned: . False otherwise. Example The following code example: &url = GenerateQueryRelativeURL(%Portal. This parameter takes a string value. It just supports it. This parameter takes a Boolean value: True. you must remove the public or private keyword before trying to use the URL. prefixed with the reserved word PORTAL. the URL is for a new browser instance. such as %Portal.16 and higher. "QUERYNAME". On PeopleTools versions 8. 2009. Specify whether the query is public or private.. Specify the name of the node that contains the query.16. This does not automatically open a new browser instance. If the value is True this function generates a new state block for use in a separate browser instance. the query is public. and the node has a Node Type of PIA. Specify whether the URL is for a new browser instance.QueryName This function returns a Null string if you specify an invalid portal or node./. The default is False.16. You can also use a string.. a string of the following format is returned: . and the node has a Node Type of PIA.. True). Oracle and/or its affiliates./portal/node/q/q/?ICAction=ICQryNameURL=PRIVATE. If you are building a URL for a portal node that is on a PeopleTools release prior to 8. such as %Node.. nodename Queryname IsPublic IsNewWindow Note.. This parameter takes a Boolean value: True. for this value. Copyright © 1988. When Query is being run on a PeopleTools version prior to 8. Parameters Parameter Description portalname Specify the name of the portal used for this request./.QueryName If IsPublic is specified as False./.Chapter 1 PeopleCode Built-in Functions If you want to generate an absolute URL./. "RMTNODE". for this value. All Rights Reserved./portal/node/q/?ICAction=ICQryNameURL=PUBLIC.

Oracle and/or its affiliates." GenerateQueryContentURL.nodename. prefixed with the reserved word RECORD.QUERYNAME See Also Chapter 1. &RecordObject2]. You can also use a string. "PeopleCode Built-in Functions. [recordname. .RECORD. The generated URL contains a reference to the portal content (psc) servlet.function_name. nodename recordname 308 Copyright © 1988..portalname. You can also use a string.50 PeopleBook: PeopleSoft Query. for this value. "Internet Script Classes (iScript)" Enterprise PeopleTools 8. use the GenerateScriptContentURL function.]field1 [. 2009. Parameters Parameter Description portalname Specify the name of the portal used for this request.PeopleCode Built-in Functions Chapter 1 might produce a string as follows: . "Query Classes" Enterprise PeopleTools 8.event_name. Description Use the GenerateScriptContentRelURL function to create a URL string that represents a relative reference to the specified iScript. If you want to generate an absolute URL for an iScript for the portal content servlet.recordname. All Rights Reserved. page 303 and Chapter 1. prefixed with the reserved word NODE." GenerateQueryPortalURL. Specify the name of the record containing the iScript.50 PeopleBook: PeopleCode API Reference. page 304 Enterprise PeopleTools 8. Specify the name of the node that contains the iScript. such as %Node. prefixed with the reserved word PORTAL.]field2]. for this value. . NODE. keylist]) where keylist is a list of field references in the form: [recordname. "PeopleCode Built-in Functions. FIELD.50 PeopleBook: PeopleCode API Reference.. "Getting Started with PeopleSoft Query" GenerateScriptContentRelURL Syntax GenerateScriptContentRelURL(PORTAL./. OR &RecordObject1 [. . . ..fieldname./EMPLOYEE/RMTNODE/q/?ICAction=ICQryNameURL=PUBLIC. such as %Portal./. [.

IScript_SFAHOME See Also Chapter 1. Specify the name of the event containing the iScript.50 PeopleBook: PeopleCode API Reference. Chapter 1. Chapter 1." GenerateScriptPortalURL. "CRM". a string of the following format is returned: /psc/s/recname. "FieldFormula".function_name?parameters The question mark and the text following the question mark may or may not be included." GenerateScriptRelativeURL. "Internet Script Classes (iScript)" Copyright © 1988.function_name?parameters If the node has a Node Type of ICType.SFASCRIPTS. page 313 and Chapter 1. Might yield the following URL: /psc/s/WEBLIB_CRM. Example The following code: &MyScriptURL = GenerateScriptContentRelURL("EMPLOYEEPORTAL".event_name. page 310.event_name. Oracle and/or its affiliates. It can also be an already instantiated record object.fieldname. 2009. 309 . This is generally the FieldFormula event. "PeopleCode Built-in Functions. All Rights Reserved. Record. "PeopleCode Built-in Functions." GenerateScriptContentURL.FieldFormula.fieldname. depending on whether or not you specified a page and action or not. event_name function_name keylist Returns If the node has a Node Type of PIA. An optional list of parameters used with the function.WEBLIB_ CRM.SFASCRIPTS. page 315 Enterprise PeopleTools 8. prefixed with the reserved word FIELD. page 311.Chapter 1 PeopleCode Built-in Functions Parameter Description fieldname Specify the name of the field containing the iScript. This function returns a Null string if you specify an invalid portal or node. a string of the following format is returned: /portal/node/?ICType=Script&ICScriptProgramName= recname. "PeopleCode Built-in Functions." GenerateScriptPortalRelURL. Field. "PeopleCode Built-in Functions. "Iscript_SFAHOME "). Specify the name of the iScript function.

. OR &RecordObject1 [.portalname. Specify the name of the iScript function. This is generally the FieldFormula event. prefixed with the reserved word FIELD. Description Use the GenerateScriptContentURL function to create a URL string that represents an absolute reference to the specified iScript for the content servlet. nodename recordname fieldname event_name function_name keylist 310 Copyright © 1988. NODE.]field1 [. for this value. &RecordObject2]. An optional list of parameters used with the function.function_name. . Oracle and/or its affiliates. Parameters Parameter Description portalname Specify the name of the portal used for this request. for this value.PeopleCode Built-in Functions Chapter 1 GenerateScriptContentURL Syntax GenerateScriptContentURL(PORTAL. Specify the name of the event containing the iScript. All Rights Reserved. . Specify the name of the record containing the iScript. The ContentURI of the specified node is used in the generated URL. [recordname. Specify the name of the field containing the iScript. 2009.event_name. You can also use a string.RECORD. prefixed with the reserved word RECORD.fieldname. such as %Node. FIELD. It can also be an already instantiated record object. prefixed with the reserved word PORTAL. If you want to generate a URL for an iScript for the portal servlet. use the GenerateScriptPortalURL function. The URL contains a reference to the portal content (psc) servlet.]field2].recordname. prefixed with the reserved word NODE. You can also use a string. keylist]) where keylist is a list of field references in the form: [recordname. .nodename. such as %Portal. . [. Specify the name of the node that contains the iScript.

All Rights Reserved. . Oracle and/or its affiliates. . &RecordObject2].function_name?parameters The question mark and the text following the question mark may or may not be included. a string of the following format is returned: http://Content URI of host node/portal/node/?ICType=Script&ICScriptProgramName= recname.SFASCRIPTS.RECORD. "Internet Script Classes (iScript)" GenerateScriptPortalRelURL Syntax GenerateScriptPortalRelURL(PORTAL.fieldname. "PeopleCode Built-in Functions.event_name." GenerateScriptRelativeURL.function_name.portalname. depending on whether or not you specified a page and action or not. .nodename. Field. 311 . "Iscript_SFAHOME ")." GenerateScriptPortalRelURL.event_name. "PeopleCode Built-in Functions. page 308. Copyright © 1988. Record. "CRM"." GenerateScriptPortalURL. page 311.FieldFormula. "FieldFormula". "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." GenerateScriptContentRelURL. 2009. NODE. OR &RecordObject1 [.function_name?parameters If the node has a Node Type of ICType. page 313 and Chapter 1. Chapter 1. page 315 Enterprise PeopleTools 8.fieldname.WEBLIB_ CRM.IScript_SFAHOME See Also Chapter 1.50 PeopleBook: PeopleCode API Reference.com/servlets/psc/testsite/EMPLOYEEPORTAL/CRM/s/WEBLIB_ CRM. keylist]) where keylist is a list of field references in the form: [recordname. [recordname.event_ name. Might yield the following URL: http://mike.Chapter 1 PeopleCode Built-in Functions Returns If the node has a Node Type of PIA. Example The following code: &MyScriptURL = GenerateScriptContentURL("EMPLOYEEPORTAL". Chapter 1.]field2]. This function returns a Null string if you specify an invalid portal or node. [. a string of the following format is returned: http://Content URI of host node/portal/node/s/recname.SFASCRIPTS.fieldname.recordname. FIELD. .]field1 [.

Specify the name of the event containing the iScript. for this value. use the GenerateScriptPortalURL function. for this value. prefixed with the reserved word RECORD.function_name?parameters If the node has a Node Type of ICType. depending on whether or not you specified a page and action or not. nodename recordname fieldname event_name function_name keylist Returns If the node has a Node Type of PIA. This is generally the FieldFormula event. prefixed with the reserved word PORTAL. Specify the name of the field containing the iScript. . The generated URL contains a reference to the portal service (psp) servlet. a string of the following format is returned: /psp/s/recname. such as %Node.event_name. prefixed with the reserved word NODE. An optional list of parameters used with the function.fieldname. 2009. You can also use a string. Specify the name of the node that contains the iScript. Parameters Parameter Description portalname Specify the name of the portal used for this request. It can also be an already instantiated record object. a string of the following format is returned: /portal/node/?ICType=Script&ICScriptProgramName= recname.function_name?parameters The question mark and the text following the question mark may or may not be included. such as %Portal. Specify the name of the record containing the iScript. All Rights Reserved.PeopleCode Built-in Functions Chapter 1 Description Use the GenerateScriptPortalRelURL function to create a URL string that represents a relative reference to the specified iScript. Specify the name of the iScript function.fieldname. This function returns a Null string if you specify an invalid portal or node. 312 Copyright © 1988.event_name. You can also use a string. Oracle and/or its affiliates. If you want to generate an absolute URL for an iScript for the portal service servlet. prefixed with the reserved word FIELD.

" GenerateScriptContentRelURL.WEBLIB_ CRM. . "PeopleCode Built-in Functions. [. 313 . keylist]) where keylist is a list of field references in the form: [recordname. "FieldFormula". "CRM".event_name." GenerateScriptRelativeURL. Description Use the GenerateScriptPortalURL function to create a URL string that represents an absolute reference to the specified iScript for the portal servlet.RECORD. use the GenerateScriptContentURL function. Oracle and/or its affiliates. The PortalURI of the node that hosts the specified portal is used in the generated URL. FIELD.IScript_SFAHOME See Also Chapter 1. Chapter 1. page 315 Enterprise PeopleTools 8. . . Copyright © 1988. 2009.FieldFormula.nodename. OR &RecordObject1 [. "PeopleCode Built-in Functions. Might yield the following: /psp/s/WEBLIB_CRM.portalname.SFASCRIPTS. Record. page 308.Chapter 1 PeopleCode Built-in Functions Example The following code: &MyScriptURL = GenerateScriptPortalRelURL("EMPLOYEEPORTAL". "Internet Script Classes (iScript)" GenerateScriptPortalURL Syntax GenerateScriptPortalURL(PORTAL." GenerateScriptContentURL. If you want to generate a URL for an iScript for the portal content (psc) servlet. All Rights Reserved. The URL contains a reference to the portal service (psp) servlet. page 310. "PeopleCode Built-in Functions. "IScript_SFAHOME"). page 313 and Chapter 1.]field1 [. &RecordObject2].50 PeopleBook: PeopleCode API Reference.]field2]. "PeopleCode Built-in Functions.SFASCRIPTS. . Chapter 1.recordname. [recordname. NODE. Field.function_name." GenerateScriptPortalURL.fieldname.

Record.SFASCRIPTS. a string of the following format is returned: http://Portal URI of host node/portal/node/?ICType=Script&ICScriptProgramName= recname.com/servlets/psp/testsite/EMPLOYEEPORTAL/CRM/s/WEBLIB_ CRM. "IScript_SFAHOME"). a string of the following format is returned: http://Portal URI of host portal/portal/node/s/recname.fieldname. nodename recordname fieldname event_name function_name keylist Returns If a node has a Node Type of PIA. for this value. .function_name?parameters If the node has a Node Type of ICType. prefixed with the reserved word PORTAL. This function returns a Null string if you specify an invalid portal or node. prefixed with the reserved word RECORD. such as %Node. An optional list of parameters used with the function. Specify the name of the iScript function. You can also use a string.fieldname. depending on whether or not you specified a page and action or not. All Rights Reserved. Specify the name of the record containing the iScript.event_ name. "CRM". Specify the name of the field containing the iScript.IScript_SFAHOME 314 Copyright © 1988. for this value. It can also be an already instantiated record object. Specify the name of the event containing the iScript.WEBLIB_CRM. 2009. Might yield the following: http://mike. such as %Portal. prefixed with the reserved word FIELD. Example The following code: &MyScriptURL = GenerateScriptPortalURL("EMPLOYEEPORTAL". prefixed with the reserved word NODE. "FieldFormula".function_name?parameters The question mark and the text following the question mark may or may not be included.PeopleCode Built-in Functions Chapter 1 Parameters Parameter Description portalname Specify the name of the portal used for this request.FieldFormula.SFASCRIPTS. Specify the name of the node that contains the iScript. Field. This is generally the FieldFormula event. Oracle and/or its affiliates.event_name. You can also use a string.

2009. "PeopleCode Built-in Functions. prefixed with the reserved word FIELD. prefixed with the reserved word RECORD. such as %Node. .nodename.fieldname. NODE. FIELD. for this value. page 308.]field2]. Parameters Parameter Description portalname Specify the name of the portal used for this request. nodename recordname fieldname Copyright © 1988. Chapter 1. "PeopleCode Built-in Functions." GenerateScriptContentRelURL. "PeopleCode Built-in Functions. Chapter 1. page 310.function_name. You can also use a string. .event_name.50 PeopleBook: PeopleCode API Reference. OR &RecordObject1 [. &RecordObject2]. "Internet Script Classes (iScript)" GenerateScriptRelativeURL Syntax GenerateScriptRelativeURL(PORTAL. prefixed with the reserved word PORTAL. Description Use the GenerateScriptRelativeURL function to create a relative URL string that represents a relative reference to the specified iScript.Chapter 1 PeopleCode Built-in Functions See Also Chapter 1. If you want to generate an absolute URL for an iScript. page 311 and Chapter 1.recordname.portalname." GenerateScriptPortalRelURL. keylist]) where keylist is a list of field references in the form: [recordname. The relative reference is suitable for use on any page that has the simple URL format." GenerateScriptContentURL. 315 . for this value. . [recordname. use either the GenerateScriptContentURL or GenerateScriptPortalURL function. "PeopleCode Built-in Functions. Specify the name of the node that contains the iScript. prefixed with the reserved word NODE.RECORD. page 315 Enterprise PeopleTools 8. such as %Portal. Specify the name of the field containing the iScript. All Rights Reserved. Oracle and/or its affiliates. You can also use a string.]field1 [." GenerateScriptRelativeURL. . Specify the name of the record containing the iScript. [.

. depending on whether or not you specified a page and action or not. function_name keylist Returns If the node has a Node Type of PIA././." GenerateScriptPortalURL. "PeopleCode Built-in Functions. Chapter 1.event_ name.function_name?parameters If the node has a Node Type of ICType. page 310.PeopleCode Built-in Functions Chapter 1 Parameter Description event_name Specify the name of the event containing the iScript. . Field.function_name?parameters The question mark and the text following the question mark may or may not be included.SFASCRIPTS.50 PeopleBook: PeopleCode API Reference. Chapter 1." GenerateScriptContentURL.SFASCRIPTS. page 313 Enterprise PeopleTools 8. An optional list of parameters used with the function. Record." GenerateScriptContentRelURL. "PeopleCode Built-in Functions.fieldname. It can also be an already instantiated record object. page 308.IScript_SFAHOME See Also Chapter 1. All Rights Reserved.. This function returns a Null string if you specify an invalid portal or node.event_name. "IScript_SFAHOME"). "FieldFormula". a string of the following format is returned: portal/node/?ICType=Script&ICScriptProgramName=recname. "PeopleCode Built-in Functions. Might yield the following: .fieldname. Oracle and/or its affiliates. "CRM". a string of the following format is returned: portal/node/s/recname.WEBLIB_ CRM.. Example The following code: &MyScriptURL = GenerateScriptRelativeURL("EMPLOYEEPORTAL". Specify the name of the iScript function./EMPLOYEEPORTAL/CRM//s/WEBLIB_CRM. This is generally the FieldFormula event. "PeopleCode Built-in Functions.FieldFormula. page 311 and Chapter 1. 2009. "Internet Script Classes (iScript)" 316 Copyright © 1988." GenerateScriptPortalRelURL.

The first time the GenerateTree function is used. The GenerateTree function can be used in conjunction with the Tree Classes to display data from trees created using Tree Manager. with nodes and leaves. Oracle and/or its affiliates. Subsequent calls require this parameter. that is. 317 . collapses a node. All Rights Reserved.50 PeopleBook: PeopleCode Developer's Guide. The result of the GenerateTree function is an HTML string. or uses one of the navigation links. The GenerateTree function works with both an HTML area control and a hidden field. to generate the initial tree. "Using HTML Trees and the GenerateTree Function. which can be displayed in an HTML area control. expands a node. "Using HTML Trees and the GenerateTree Function. that event (end-user action) is passed to the invisible field. Returns A string that contains HTML code that can be used with the HTML control to display a tree. 2009. Copyright © 1988. When an end-user selects a node.50 PeopleBook: PeopleCode Developer's Guide. and the invisible field's FieldChange PeopleCode is executed. The TreeEventField parameter contains the contents of the invisible character field used to process the HTML tree events. See Also Enterprise PeopleTools 8. The tree generated by GenerateTree is called an HTML tree. Specify the contents of the invisible character field used to process the HTML tree events.Chapter 1 PeopleCode Built-in Functions GenerateTree Syntax GenerateTree(&rowset [." Using HTML Tree Actions (Events) Enterprise PeopleTools 8." Building HTML Tree Pages Parameters Parameter Description &rowset TreeEventField Specify the name of the rowset you've populated with tree data. TreeEventField]) Description Use the GenerateTree function to display data in a tree format. you do not need to include this parameter.

Specify the name of the node that contains the content. nodename BusProc Activity Event Instance 318 Copyright © 1988. TREECTLEVENT is the name of the invisible control field that contains the event string that was passed from the browser.portalname. such as %Portal.Worklist. The generated URL contains a reference to the portal service (psp) servlet. If you want to generate a relative URL. You can also use a string. All Rights Reserved. The PortalURI of the node that hosts the specified portal is used in the generated URL. for this value. "Using HTML Trees and the GenerateTree Function. See Also Enterprise PeopleTools 8.nodename.Instance) Description Use the GenerateWorklistPortalURL function to create a URL string that represents an absolute reference the specified Worklist (URL) on the portal servlet. Specify the instance of the Worklist. prefixed with the reserved word NODE. use the GenerateWorklistRelativeURL function. Specify the activity of the Worklist. Oracle and/or its affiliates. 2009. such as %Node.BusProc. Specify the event of the Worklist. . HTMLAREA = GenerateTree(&TREECTL. Specify the business process of the Worklist.NODE. prefixed with the reserved word PORTAL.PeopleCode Built-in Functions Chapter 1 Example In the following example. Parameters Parameter Description portalname Specify the name of the portal used for this request.50 PeopleBook: PeopleCode Developer's Guide. You can also use a string. for this value.Activity. TREECTLEVENT)." Using the GenerateTree Function GenerateWorklistPortalURL Syntax GenerateWorklistPortalURL(PORTAL. Event.

nodename.Worklist. page 319 Enterprise PeopleTools 8.Instance This function returns a Null string if you specify an invalid portal or node. Specify the activity of the Worklist.50 PeopleBook: PeopleCode API Reference." GenerateWorklistRelativeURL. "Internet Script Classes (iScript)" Enterprise PeopleTools 8.Instance) Description Use the GenerateWorklistRelativeURL function to create a URL string that represents a relative reference to the specified Worklist on the portal servlet. Oracle and/or its affiliates. Specify the business process of the Worklist. "Understanding PeopleSoft Workflow" GenerateWorklistRelativeURL Syntax GenerateWorklistRelativeURL(PORTAL. use the GenerateWorklistPortalURL function. You can also use a string. See Also Chapter 1.Event. The relative reference is suitable for use on any page that itself has the simple URL format. "PeopleCode Built-in Functions.Worklist. If you want to generate an absolute URL.Activity. such as %Node. Event. Specify the name of the node that contains the content. prefixed with the reserved word PORTAL.portalname. prefixed with the reserved word NODE. 319 . nodename BusProc Activity Event Copyright © 1988.50 PeopleBook: Workflow Technology. for this value.BusProc.NODE. such as %Portal. Specify the event of the Worklist. All Rights Reserved. for this value. Parameters Parameter Description portalname Specify the name of the portal used for this request. You can also use a string.Activity. 2009.Chapter 1 PeopleCode Built-in Functions Returns A string of the following format: http://PortalURI/Portal/node/w/BusProc.

" GenerateWorklistPortalURL. "Understanding PeopleSoft Workflow" 320 Copyright © 1988. "Timeout Notification".Event./. "Administer Workflow". Oracle and/or its affiliates./Portal/Node/w/BusProc. All Rights Reserved. See Also Chapter 1. page 318 Enterprise PeopleTools 8.Activity..Instance This function returns a Null string if you specify an invalid portal or node./. .. 1). %Node. "PeopleCode Built-in Functions.50 PeopleBook: Workflow Technology. "Internet Script Classes (iScript)" Enterprise PeopleTools 8. 2009.. Returns A string of the following format: .PeopleCode Built-in Functions Chapter 1 Parameter Description Instance Specify the instance of the Worklist. "Worklist Current Operator". "Find Timeout Worklists".Worklist.50 PeopleBook: PeopleCode API Reference. Example Given the following activity: Example activity The following is an example PeopleCode statement used to access this activity: GenerateWorklistRelativeURL(%Portal.

" %AuthenticationToken. "System Variables. Oracle and/or its affiliates. page 769 GetAESection Syntax GetAESection(ae_applid. 2009. Returns A string containing the authentication token. 321 .ae_section [. (that is. This enables you to create base sections as needed. However. Warning! When you open or get an AESection object. effdt]) Description Use the GetAESection function to open and associate an AESection PeopleCode object with the base section. The token that is generated is usually passed to another process that has no token. one is created. Generally this function is used in an application engine program when an authentication token is not automatically generated. as a string. Parameters None.Chapter 1 PeopleCode Built-in Functions GenToken Syntax GenToken() Description Use the GenToken function to create an authentication token for the user currently logged in. as specified. See Also Chapter 3. All Rights Reserved. it can be used anytime. If no base section by the specified name is found. Copyright © 1988. the base section) any existing steps in the section are deleted.

"AESection Class.50 PeopleBook: PeopleCode API Reference. 2009. You can copy steps from the template section to the base section before you start the Application Engine program. "AESection Class. "AESection Class" Enterprise PeopleTools 8.gridname) 322 Copyright © 1988. effdt Returns An AESection object is returned. Oracle and/or its affiliates. set the template section using the SetTemplate AESection class method. See Also Enterprise PeopleTools 8. . Typically.pagename. All Rights Reserved. database platform. dynamic sections should be constructed in response to an end user action.50 PeopleBook: PeopleCode API Reference. into Application Engine constructs. the system first looks to see if it exists with the given input parameters. the system looks for a similar section based on market. This is useful for applications that let users input their "rules" into a userfriendly page. If such a section doesn't exist. then convert these rules.50 PeopleBook: PeopleCode API Reference. at save time. Parameters Parameter Description ae_applid ae_section Specifies the application ID of the section you want to modify. Specifies the effective date of the section you want to modify (optional). and effective date. The AESection Object is designed for use within an online program. Note.PeopleCode Built-in Functions Chapter 1 After you've instantiated the AESection object." AESection Example GetAnalyticGrid Syntax GetAnalyticGrid(PAGE. use the CallSection action instead. If no base section by the specified name is found. Specifies the section name of the base section you want to modify." Open Enterprise PeopleTools 8. Do not call an AESection object from an Application Engine PeopleCode Action. When an AESection is opened (or accessed). one is created. If you need to access another section.

This is the name you use with the GetAnalyticGrid function. "@". 323 .50 PeopleBook: PeopleCode Developer's Guide. the earliest event you can use is the page Activate event.Chapter 1 PeopleCode Built-in Functions Description Use the GetAnalyticGrid function to instantiate an analytic grid object from the AnalyticGrid class.pagename gridname Specify the name of the page definition containing the grid you want to access. All Rights Reserved.) Note. Copyright © 1988. Returns A reference to an AnalyticGrid object. the grid is automatically named the same as the name of the primary record of the scroll for the grid (in the Page Field Name. and populates it with the grid specified by gridname. which is the Page Field Name on the General tab of that analytic grid's page field properties. Note. and "_". the Page Field Name is not automatically updated. If the name of the record changes. type the new grid name in Page Field Name. You must change this name if you want the name of the grid to reflect the name of the record. select the analytic grid and access the Analytic Grid control properties. Every grid on a page must have a unique name. Using the Grid Name When you place an analytic grid on a page. PeopleSoft builds a page grid one row at a time. 2009. You can change this name on the General tab of the Analytic Grid control properties." Activate Event. digits and "#". Because the AnalyticGrid class applies to a complete grid. Parameters Parameter Description PAGE. To change a grid name: 1. Note. Specify a grid name consisting of any combination of uppercase letters. Open the page in Application Designer. On the General tab. See Enterprise PeopleTools 8. you can't attach PeopleCode that uses the AnalyticGrid class to events that occur before the grid is built. 2. Specify the Page Field Name on the General tab of the grid's page field properties. Oracle and/or its affiliates. "PeopleCode and the Component Processor. "$".

Segment]) 324 Copyright © 1988. All Rights Reserved. 2009. Oracle and/or its affiliates.ChannelName. "Analytic Calculation Engine Classes.PubNode.50 PeopleBook: PeopleCode API Reference. The analytic instance specified by ID must already be created before using this function. Parameters Parameter Description ID Specify the analytic instance identifier that you want to access.VersionName[. . "Analytic Grid Classes" GetAnalyticInstance Syntax GetAnalyticInstance(ID) Description Use the GetAnalyticInstance function to return a reference to the AnalyticInstance object as specified by the ID. "PeopleCode Built-in Functions. Returns An AnalyticInstance object if successful.50 PeopleBook: PeopleCode API Reference. null otherwise." CreateAnalyticInstance. See Also Chapter 1." CheckStatus GetArchPubHeaderXmlDoc Syntax GetArchPubHeaderXmlDoc(PubID.PeopleCode Built-in Functions Chapter 1 See Also Enterprise PeopleTools 8. page 136 Enterprise PeopleTools 8.

You will receive an error if you use this function. Tracing. Logging.50 PeopleBook: PeopleSoft Integration Broker. This function has been deprecated.SubNode[. Segment]) Description Use the GetArchPubXmlDoc function to retrieve an archived message from the message queue. All Rights Reserved. See Also Enterprise PeopleTools 8. Copyright © 1988. and Debugging" GetArchSubXmlDoc Syntax GetArchSubXmlDoc(PubID. This function has been deprecated.MessageName. "Managing Error Handling.VersionName.ChannelName.VersionName. Oracle and/or its affiliates. You will receive an error if you use this function. "Consuming Services" GetArchPubXmlDoc Syntax GetArchPubXmlDoc(PubID.ChannelName. This function has been deprecated. You will receive an error if you use this function. 2009.MessageName[. Segment]) Description Use the GetArchSubXmlDoc function to retrieve an archived message from the message queue.50 PeopleBook: PeopleSoft Integration Broker.PubNode.PubNode. See Also Enterprise PeopleTools 8. 325 .Chapter 1 PeopleCode Built-in Functions Description Use the GetArchPubHeaderXMLDoc function to retrieve an archived message header from the message queue.

URLname • A string. in the form of: protocol://FTP_user_ID:FTP_password@FTP_server_address/path where protocol is "ftp" or "ftps". the specified destination subdirectories must exist on that application server machine at the time this function is called. All Rights Reserved.peoplesoft. "Understanding PeopleSoft Integration Broker" GetAttachment Syntax GetAttachment(URLSource. SFTP is not supported. and path is the path on the FTP server relative to the directory specified as the FTP server's root. 2009. If you want to use a different port you must specify it in the URL. See Enterprise PeopleTools 8. Oracle and/or its affiliates. in the form of: URL.SysFileName. URLDestination will be either of the following: • A URL definition. FTP_server_address is the FTP server's name or its IP address. LocalDirEnvVar[.PeopleCode Built-in Functions Chapter 1 See Also Enterprise PeopleTools 8. The following limitations apply to the FTP URL: 326 Copyright © 1988. as part of FTP_server_address. Furthermore. URLDestination must be a URL definition. then it may be difficult to predict which application server machine will receive the downloaded file. For example: ftp://user:password@ftpserver. . If the file is transferred using secure FTP (FTPS).com:6000/ Note. PreserveCase ]]) Description Use the GetAttachment function to transfer a file from its source storage location to the file system of the application sever.LocalFile [. If the web server load-balances via Jolt session pooling." Adding Secure FTP (FTPS) URLs. "Using PeopleTools Utilities.50 PeopleBook: PeopleSoft Integration Broker.50 PeopleBook: System and Server Administration. FTP Server Storage Considerations If your storage destination is a file server. The default FTP port is 21.

in the form of: URL. the following characters are replaced with an underscore: • • • • • • • • (space) . The actual error message can be found in the logs." Using Attachment Functions. Database Storage Considerations If your storage destination is a database table. All Rights Reserved. the process will be stopped and an error (%Attachment_Failed) will be returned to user.50 PeopleBook: PeopleCode Developer's Guide. Oracle and/or its affiliates.URLname • A string. The length of the full URL is limited to 254 characters. (semicolon) + (plus sign) % (percent sign) & (ampersand) ' (apostrophe) ! (exclamation point) # (pound sign) Copyright © 1988. in the form of: record://MYRECORD where MYRECORD is the record associated with a storage destination table.Chapter 1 PeopleCode Built-in Functions • • The FTP user name to is limited to 30 characters. See Enterprise PeopleTools 8. "Using File Attachments and PeopleCode. URLDestination will be either of the following: • A URL definition. File Name Considerations If the local source file name has any of the following characters. • • • • • • * (asterisk) : (colon) " (quotation mark) < (less than symbol) > (greater than symbol) ? (question mark) When the file is transferred. 2009. 327 . The FTP password to is limited to 16 characters.

File System Considerations If you are uncertain which type of file system the file is going to be transferred to. PutAttachment(&FTPINFO. Make sure that the user's environment supports the files being transferred. The following code example works for Windows systems.doc"). or different line endings. &TARGETFILENAME. 328 Copyright © 1988. It is the developer's responsibility to manage this issue in their environments. For instance. the ':' character must to be used as a delimiter between the FTP user ID and the FTP password or just before the FTP port number (if one is specified). but not Unix systems: GetAttachment(&FTPINFO. such as Japanese JIS and Unicode. you should simply specify a file name for the third parameter and either explicitly set the fourth parameter (LocalDirEnvVar) or accept its default value of "TMP ". The following two examples work for both Windows and Unix systems: GetAttachment(&FTPINFO. Similar issues can occur when two file systems have different character sets. either a Unix or Windows system. but not Windows systems: GetAttachment(&FTPINFO. "/tmp/resume.doc"). Of course. Some steps you can take to avoid conversion problems include: • • • • Educate your users.PeopleCode Built-in Functions Chapter 1 • $ (dollar sign) Note. A user viewing that file in a Windows environment might see garbled content because the text file viewer is expecting ANSI encoding. "c:\temp\resume. &TARGETFILENAME. Restrict attachments to file types that are known to be compatible across user platforms.doc". A number of text file conversion utilities are available for various platforms. "TMP"). &TARGETFILENAME. The following code example works for Unix systems. "PS_CFG_HOME"). . &TARGETFILENAME. when any file is uploaded. suppose a text file on a DB2 system is encoded in EBCDIC. Oracle and/or its affiliates. Considerations Attaching Text Files The PeopleCode file attachment functions do not provide text file conversions when files are attached or viewed. it is always copied to the specified destination byte-for-byte Warning! You may encounter problems when a text file is uploaded from one operating system or environment and then later viewed on another. Standardize on file formats and encodings. "resume. In general. 2009. "resume. you should exercise caution when using an '@' or ':' character in the name of a file selected for uploading or in the value of the URLDestination or DirAndFileName parameter. and the '@' character must be used as a delimiter between the FTP password and the FTP server address.doc". In fact. All Rights Reserved.

This parameter takes a string value. Note. The source directory specified by a full FTP URL will be taken to be relative to the FTP root directory (which may not be the same as the root directory of the FTP server machine). All directories that are part of the full path name must exist before GetAttachment is called. This is appended to URLSource to make up the full URL where the file is transferred from. Note. The URLSource requires "/" slashes. This can be either a URL name.50 PeopleBook: System and Server Administration. to the destination file on the application server. SysFileName The relative path and filename of the file on the file server. "Using PeopleTools Utilities. Copyright © 1988. LocalFile The name. URLSource must be a URL definition. If you specify only a file name. Oracle and/or its affiliates. If the file is not in the TMP directory and you do not specify LocalDirEnvVar you must use the full path name as appropriate to the operating system (that is. This parameter takes a string value. If the file is transferred using secure FTP (FTPS). 329 . Because SysFileName is appended to the URL. and possible full path. All Rights Reserved. it also requires only "/" slashes. in the form URL. 2009.Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description URLSource A reference to a URL. This (along with the SysFileName parameter) indicates the file's source location. URLName. The URLSource parameter requires forward slashes ("/"). The GetAttachment function will not create any directories. or a string. See Enterprise PeopleTools 8. "\" are NOT supported in anyway for either the URLSource or the SysFileName parameter. on Unix use "/"). the file is assumed to be in the directory specified by the TMP environment variable or the directory specified by LocalDirEnvVar." Adding Secure FTP (FTPS) URLs. Backward slashes ("\") are not supported for this parameter.

then the value of the TMP environment variable will be prepended to the value of the LocalFile parameter to form the full-path name that the downloaded file will have at its destination on the application server machine.PeopleCode Built-in Functions Chapter 1 Parameter Description LocalDirEnvVar If LocalDirEnvVar is specified. then that value will itself be used as the full-path name that the downloaded file will have at its destination on the application server machine. then the value of this environment variable will be prepended to the value of the LocalFile parameter to form the full-path name that the downloaded file will have at its destination on the application server machine. Note. All directories that are part of the full path name must exist before GetAttachment is called. rather than variables defined in configuration files. All Rights Reserved. PreserveCase Specify a Boolean value to indicate whether when searching for the file specified by the DirAndFileName parameter. Note. Only operating system environment variables are recognized with this parameter. Warning! If you use the PreserveCase parameter. . Use this if you do not wish to hard-code the full-path name the downloaded file will have at its destination on the application server machine. This parameter takes a string value. The GetAttachment function will not create any directories. Oracle and/or its affiliates. In order to use the optional parameter PreserveCase you must pass some value for LocalDirEnvVar. it is important that you use it in a consistent manner with all the relevant file-processing functions or you may encounter unexpected file-not-found errors. Note. The default value is False. If LocalDirEnvVar is not specified and the value of the LocalFile parameter is not a full-path file name. Then the function behaves as if no value is specified. Returns You can check for either an integer or a constant value: Numeric Value Constant Value Description 0 %Attachment_Success File was transferred successfully. False. 2009. If you want to use the default behavior of LocalDirEnvVar and also use PreserveCase you can specify "" (the empty string) for LocalDirEnvVar. Do not specify LocalDirEnvVar if you use an absolute path for the LocalFile parameter. its filename extension is preserved or not. If LocalDirEnvVar is not specified and the value of the LocalFile parameter is a full-path file name. convert the filename extension to all lowercase letters. 330 Copyright © 1988.

The following are some possible situations where %Attachment_Failed could be returned: • • • • • • 3 %Attachment_FileTransferFailed Failed to initialize the process due to some internal error. Failed to read local file to be uploaded No response from server. Failed to store the file on remote server. Copyright © 1988. Failed due to non-availability of space on FTP server. 331 .Chapter 1 PeopleCode Built-in Functions Numeric Value Constant Value Description 1 %Attachment_Failed File transfer failed due to unspecified error. Failed to write to local file. %Attachment_DestSystNotFound Cannot locate destination system for FTP. Failed due to timeout. The following are some possible situations where %Attachment_FileTransferFailed could be returned: • • • • • • Failed due to mismatch in file sizes. Failed to allocate memory due to some internal error. Oracle and/or its affiliates. Failed to close SSL connection. 4 %Attachment_NoDiskSpaceAppServ No disk space on the application server. Failed due to unexpected/bad reply from server. All Rights Reserved. Failed to connect to server mentioned. 2009. File transfer failed due to unspecified error during FTP attempt. Failed to overwrite the file on remote server. 7 • • Improper URL format.

ps. "NewHire /11042000resume.txt"). Problem reading SSL certificate . Failed to connect using SSL Failed to verify the certificates. Failed to read remote file. Oracle and/or its affiliates. The following are some possible situations where %Attachment_DestSysFailedLogin could be returned: • • • • • • • • 9 %Attachment_FileNotFound Unsupported protocol mentioned. 2009. Access denied to server. All Rights Reserved. "c:\NewHires\resume. Example The following downloads the file. 332 Copyright © 1988.txt on the application server machine. .com/HRarchive/". Failed due to problem in certificates used. Cannot locate file. Could not authenticate the peer certificate. Remote server denied logon. Failed to login with specified SSL level. from the FTP server to c:\NewHires\resume. The following are some possible situations where %Attachment_FileNotFound could be returned: • • Remote file not found. HRarchive/NewHire/11042000resume.PeopleCode Built-in Functions Chapter 1 Numeric Value Constant Value Description 8 %Attachment_DestSysFailedLogin Unable to login to destination system for FTP.txt.txt". &retcode = GetAttachment("ftp://anonymous:hobbit1@ftp.

Business Interlinks is a deprecated product. "PeopleCode Built-in Functions. Parameters Parameter Description XMLstring A string containing XML. See Enterprise PeopleTools 8. Return Value A BiDocs object." AddAttachment. page 207. puts it into a text string. 333 ." DeleteAttachment. "PeopleCode Built-in Functions. which enables PeopleCode to receive an XML request and return an XML response. Oracle and/or its affiliates. Chapter 1. the GetDoc method and the GetValue method can get the value of the skills XML element. You can populate the structure with data from XMLstring. "Using File Attachments and PeopleCode. page 37. "PeopleCode Built-in Functions." Using File Attachments in Applications GetBiDoc Syntax GetBiDoc(XMLstring) Description Use the GetBiDoc function to create a BiDocs structure.Chapter 1 PeopleCode Built-in Functions See Also Chapter 1. "PeopleCode Built-in Functions." CopyAttachments. page 191. that is. page 124." DetachAttachment. Chapter 1. two quotation marks ("") without a space between them. After this is done. All Rights Reserved. which is contained within the postreq XML element in the XML request. Note." PutAttachment. Copyright © 1988. Example The following example gets an XML request.50 PeopleBook: PeopleSoft Integration Broker. "PeopleCode Built-in Functions. and puts that into a BiDoc. "PeopleCode Built-in Functions. 2009. This is part of the incoming Business Interlink functionality. Chapter 1.50 PeopleBook: PeopleCode Developer's Guide." ViewAttachment. Use PeopleSoft Integration Broker instead. Chapter 1. You can specify a NULL string for this parameter. page 499 and Chapter 1. page 682 Enterprise PeopleTools 8.

periodadjustment. You can also create an empty BiDoc with GetBiDoc. &skills).periods.ParseXMLString(&blob). Rows are fetched from the result set until the value of comparedate falls between PAY_BEGIN_DT and PAY_END_DT. The function SELECTs all the values for outfieldname. Local number &ret. PAY_END_DT FROM PS_PAY_CALENDAR WHERE COMPAny=:1 AND PAYGROUP=:2 ORDER BY PAY_END_DT. the result may be negative. The value of outfieldname is stored in a storage stack. A work variable equal to the value in periods is set. &blob = %Request. /* process the incoming xml(request). Because periodadjustment may be negative. The result set is sorted in increasing PAY_END_DT order. 5. PAY_BEGIN_DT and PAY_END_DT from PS_PAY_CALENDAR. If the value of outfieldname in the located result row is equal to comparedate.Create a BiDoc and fill with the request*/ &rootInDoc = GetBiDoc(""). Local BIDocs &rootInDoc. 6. Oracle and/or its affiliates. as in the following example. &ret = &postreqDoc.outfieldname. PAY_BEGIN_DT. &postreqDoc = &rootInDoc.GetValue("skills". &postreqDoc = &rootInDoc.company. paygroup) Description Use the GetCalendarDate function to return the value of a Date field from the PS_PAY_CALENDAR table.PeopleCode Built-in Functions Chapter 1 Local BIDocs &rootInDoc. &blob = %Request. 334 Copyright © 1988. Local string &blob. &postreqDoc. GetCalendarDate returns 1899-01-01. &postreqDoc.GetValue("skills". 4. Processing Rules The following are the processing rules for GetCalendarDate: 1. A SQL SELECT statement is generated in the following form: 3. 2.GetContentBody(). If a table entry is not found. GetCalendarDate Syntax GetCalendarDate(comparedate. All Rights Reserved. Local number &ret. SELECT outfieldname. 2009. &ret = &postreqDoc. /* process the incoming xml(request).GetContentBody(). &skills). &ret = &rootInDoc. Local string &blob.GetDoc("postreq").GetDoc("postreq"). then the value in periodadjustment is added to the work variable.Create a BiDoc and fill with the request*/ &rootInDoc = GetBiDoc(&blob). .

0. comparedate and the result date are Date type fields defined in some record.Chapter 1 PeopleCode Built-in Functions 7. periodadjustment outfieldname company paygroup Returns Returns a Date value from the PS_PAY_CALENDAR table. For example PAY_BEGIN_DT. for example. Parameters Parameter Description comparedate periods A date field set by the caller as the date of interest. A field set by the caller to be equal to the company code of interest. for example. COMPANY PAYGROUP PAY_END_DT PAY_BEGIN_DT CHECK_DT CCB MO1 1997-01-31 1997-01-01 1997-01-31 CCB MO1 1997-02-28 1997-02-01 1997-02-28 CCB MO1 1997-03-31 1997-03-01 1997-03-29 Copyright © 1988. The value of outfieldname is returned from the most recently fetched (current) row. The name of a date field in the PS_PAY_CALENDAR table. or 1. "1997-02-17. "CCB"." A numeric variable set by the caller specifying the number of periods forward or backward to be returned. for example. but the name of the field is used to build a SQL SELECT statement and to indicate which value from the table to return in the return date. 335 . All Rights Reserved. Oracle and/or its affiliates. In the example. Example The following examples use the sample PS_PAY_CALENDAR entries in the following table. Usually the periodadjustment is either -1. 2009. If the work variable is positive then fetch forward the number of times specified by the work variable. "M01". The value of this field is not referenced or modified by the routine. This is typically used to adjust for period end dates. A variable set by the caller to be equal to the PayGroup code of interest. A numeric variable that adjusts the periods if the comparedate equals the period end date. If the work variable is negative then the saved value of outfieldname is returned from the storage stack at the level specified by the work variable.

All Rights Reserved. The result date returned would be 1997-05-01. Oracle and/or its affiliates. PAY_BEGIN_DT. 0. 1. . 336 Copyright © 1988. PAYGROUP). PAY_BEGIN_DT. -1. GetChart Syntax GetChart(RecordName. Or: &RESULT_Date = GetCalendarDate(&COMPAREDate. PAYGROUP). COMPAny. You associate a record and field name with a chart page control in Application Designer. 2009. 0. COMPAny.FieldName) Description Use the GetChart function to get a reference to a Chart class object. &RESULT_Date = GetCalendarDate(&COMPAREDate.PeopleCode Built-in Functions Chapter 1 COMPANY PAYGROUP PAY_END_DT PAY_BEGIN_DT CHECK_DT CCB MO1 1997-04-30 1997-04-01 1997-04-30 CCB MO1 1997-05-31 1997-05-01 1997-05-31 CCB MO1 1997-06-30 1997-06-01 1997-06-28 CCB MO1 1997-07-31 1997-07-01 1997-07-31 CCB MO1 1997-08-31 1997-08-01 1997-08-30 CCB MO1 1997-09-30 1997-09-01 1997-09-30 CCB MO1 1997-10-31 1997-10-01 1997-10-31 CCB MO1 1997-11-30 1997-11-01 1997-11-27 CCB MO1 1997-12-31 1997-12-01 1997-12-31 CCB SM1 1997-01-15 1997-01-01 1997-01-15 Find the begin date of the pay period containing the date 1997-05-11 (the value of &COMPAREDate).

See Also Enterprise PeopleTools 8. Parameters Parameter Description &Chart Specify an already instantiated chart object. Copyright © 1988. All Rights Reserved. GetChartURL is used only with the Chart class and Gantt class. Oracle and/or its affiliates.FieldName Specify the record and field name associated with the chart. Example &MyChart = GetChart(Chart_Record. "Charting Classes" GetChartURL Syntax GetChartURL(&Chart) Description Use the GetChartURL function to generate the URL of a chart object. Returns A URL as a string. This URL can then be used in your application for displaying a chart. 2009.50 PeopleBook: PeopleCode API Reference. Returns A reference to a chart object. 337 .Chart_Field).Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description RecordName.

&MyChart = CreateObject("Chart").Write("<HTML><IMG SRC="). &MyChart . and so on. &CWD = GetCwd(). %Response. %Response. .Write("</MAP></HTML>"). &sMap = &oChart. 338 Copyright © 1988. "Charting Classes" GetCwd Syntax GetCwd() Description Use the GetCwd function to determine the current working directory of the process that executes it. See Also Enterprise PeopleTools 8. /* xx will be a data row set */ &MyURL = %Response.50 PeopleBook: PeopleCode API Reference. local string &MyURL. %Response.Write(" USEMAP=#THEMAP></IMG><MAP NAME=THEMAP>"). All Rights Reserved.PeopleCode Built-in Functions Chapter 1 Example Function IScript_GetChartURL() local object &MyChart. in an Application Engine program it returns the current working directory of the Application Engine process.Write(&MyURL). %Response. %Response.ImageMap. End-Function. Oracle and/or its affiliates. 2009. Returns Returns a string containing the path of the current working directory. Example The example stores a string specifying the current working directory in &CWD.SetData = xx.Write(&sMap). This means that in PeopleSoft Pure Internet Architecture it returns the current working directory on the server.GetChartURL(&MyChart).

"PeopleCode Built-in Functions. Returns Returns a string equal to env_var_str with any enclosed environment variables expanded to their values. Example Assume that the environment string NETDRIVE is equal to "N:". All Rights Reserved. "PeopleCode Built-in Functions. page 257 Copyright © 1988.Chapter 1 PeopleCode Built-in Functions See Also Chapter 1. the environment variable names are case-sensitive." ExpandEnvVar. You could use this with the Exec function. page 338 and Chapter 1." GetEnv. That is. 339 . If the environment variable does not exist. page 339 and Chapter 1. See Also Chapter 1." GetCwd. 2009. "PeopleCode Built-in Functions. The following statement returns "N:" in &NETDRIVE: &NETDRIVE = GetEnv("netdrive"). Note that on UNIX systems. "netdrive" is a different variable from "NetDrive". page 257 GetEnv Syntax GetEnv(env_var_str) Description Use the GetEnv function to return the value of an environment variable specified by env_var_str as a string. it returns a null string. Oracle and/or its affiliates. You can use the GetEnv function to determine the actual path of PS_HOME. "PeopleCode Built-in Functions." ExpandEnvVar. which automatically prepends the command string with the path of PS_HOME. Parameters Parameter Description env_var_str A string containing an environment variable.

Returns This function returns a field object that references the field from the specified record. 2009. record. Note. the current field executing the PeopleCode is returned. 340 Copyright © 1988. &CHARID = GetField(FIELD. from the row containing the currently executing program.CHAR_ID).recname.fieldname. this function is valid.PeopleCode Built-in Functions Chapter 1 GetField Syntax GetField([recname. That is. Example Local Field &CHARACTER. you cannot use this function in PeopleCode programs on events associated with high-level objects like pages or components. For PeopleCode programs located in events that are not associated with a specific row. the following is assumed: &FIELD = GetRow(). but no assumed field name. as there is an assumed record. but it must be specified with a field name.fieldname If you do not want to refer to the field executing the PeopleCode. . When GetField is used with an associated record and field name on component buffer data. If you do not specify recname.fieldname]) Description Use the GetField function to create a reference to a field object for the current context. All Rights Reserved. For events associated with record level programs (like component record). Parameters Parameter Description recname. and field at the point of execution this function is invalid. Oracle and/or its affiliates. specify a record name and field name. that is.fieldname.

the next one is searched for. PS_SERVDIR\files\relative_path 3. If you want to use this environmental variable. PS_SERVDIR\files\relative_path The PS_FILEDIR environmental variable is not initialized and set to a path automatically. PS_FILEDIR\relative_path 2.50 PeopleBook: PeopleCode Developer's Guide. Copyright © 1988. This means if the first environment variable in order is found.Chapter 1 PeopleCode Built-in Functions See Also Enterprise PeopleTools 8. You need to instantiate multiple file objects with GetFile only if you expect to have multiple files open at the same time. the following environment variables are valid and are searched for in the following order: 1. "Accessing the Data Buffer" GetFile Syntax GetFile(filename. TEMP\relative_path If GeetFile is called from a program running within an application server domain. Environment variables are searched for in a particular order. and open the file so you can use File class methods to read from or write to it. GetFile is similar to the Open file class method. that's the one that is used." GetPageField. Oracle and/or its affiliates. but Open associates an existing file object with an external file. that path is appended to the path specified by an environment variable if the variable exists. charset] [. 2009. If you plan to access only one file at a time. page 369 Enterprise PeopleTools 8. If it isn't found. All Rights Reserved. If GetFile is called from an Application Engine program when running standalone—that is. is used. PS_FILEDIR\relative_path 2. Working With Relative Paths If you specify a relative path.mode [. "Field Class" and Chapter 1. 341 . when not within an application server domain—the following environment variables are valid and are searched for in the following order: 1.50 PeopleBook: PeopleCode API Reference. and if found. Use GetFile to instantiate a file object for the first external file you access. and so on. associate it with an external file. "PeopleCode Built-in Functions. then use Open to associate the same file object with as many different external files as you want. you need only one file object. you must set it yourself. pathtype]) Description Use the GetFile function to instantiate a new file object from the File class.

In Update mode. The system replaces the asterisk with numbers starting at 1 and incrementing by 1. Before attempting to write to the file.PeopleCode Built-in Functions Chapter 1 Note. if a user changes their TEMP environmental variable to a network drive they don't normally have access to. Currently. all but the first one are discarded. starting at the beginning. Any existing content is retained. Before attempting to read from the file. starting at the end. a backslash. "E" (Conditional "exist" read mode): opens the file for reading only if it exists. starting at the beginning. If you insert more than one asterisk. "W" (Write mode): opens the file for writing. Oracle and/or its affiliates. . 342 Copyright © 1988. Parameters Parameter Description filespec mode Specify the name. "U" (Update mode): opens the file for reading or writing. any write operation clears the file of all data that follows the position you set. Note. the Open method has no effect. your system security should detect this. If it doesn't exist. the path. If a file by the same name already exists. Your system security should verify if a user has the correct permissions before allowing access to a drive (for example. In the preceding examples. the effect of the Update mode and the GetPosition and SetPosition methods is not well defined for Unicode files. Warning! When you specify Write mode. any existing content in the file is discarded. All Rights Reserved. You can insert an asterisk (*) in the filename to ensure that a new file is created.) Using GetFile with Process Scheduler Any file opened for writing (using a call to the GetFile function or the File class Open method) by a PeopleCode program that runs in Process Scheduler is automatically managed by the Report Repository. "A" (Append mode): opens the file for writing. use the IsOpen property to confirm that it's open. Use this mode and the GetPosition and SetPosition methods to maintain checkpoints of the current read/write position in the file. of the file you want to open. and checks for the existence of a file by each resulting name in turn. The mode can be one of the following: "R" (Read mode): opens the file for reading. the Windows directory separator. "N" (Conditional "new" write mode): opens the file for writing. Use the Update mode only on files stored with a non-Unicode character set. starting at the beginning of the file. Any existing content is retained. only if it doesn't already exist. and optionally. use the IsOpen property to confirm that it's open. the directory separator is a forward slash. In this way you can generate a set of automatically numbered files. For UNIX directories. It uses the first name for which a file doesn't exist. A string indicating how you want to access the file. 2009. was used. the Open method has no effect.

Oracle and/or its affiliates. Note. However. if misinterpreted as ISO-8859-1. Copyright © 1988. In case the consuming application does expect the BOM for a UTF-8 file. Big5. Byte Order Marks are not expected or supported for files in other character sets. or the character set you want to use when you write to the file. If the UnicodeUCS–2 file being opened does not start with a BOM. Note. When a file is opened for reading using the "U" charset argument. If you attempt to read data from a file using a different character set than was used to write that data to the file. you must remember to include a charset declaration in the XML file. the character set used is dependent on the application server configuration.Chapter 1 PeopleCode Built-in Functions Parameter Description charset A string indicating the character set you expect when you read the file. When working with XML documents. ASCII. a BOM consisting of the hex value 0xFFEF indicates a little endian file. If "A" is specified as the character set. The BOM is automatically stripped from the file when it is read into the buffers by GetFile. A BOM consisting of the hex value 0xFEFF indicates a big endian file. or UTF8.50 PeopleBook: Global Technology. 343 . psappsrv. This mark indicates whether the file is written in big endian order or little endian order. "Selecting and Configuring Character Sets and Language Input and Output. You can abbreviate Unicode UCS—2 to "U" and the host operating system's default non-Unicode (sometimes referred to as the ANSI character set) to "A"." Character Sets in the PeopleSoft Pure Internet Architecture. All other character sets must be spelled out in full. The UTF-8 sequence 0xEF BB BF. GetFile expects the file to begin with a Unicode Byte Order Mark (BOM). On a Windows application server. the UTF8BOM character set is available as a GetFile character set to create a UTF-8 file with the BOM. the methods used generate a runtime error or the data returned is unusable. You can also use a record field value to specify the character set (for example.50 PeopleBook: Global Technology. or you do not specify a character set. On a Unix application server. an error is returned. specify UTF8 for charset.CHARSET. the default non-Unicode character set is specified in the application server configuration file. 2009.) A list of supported character set names valid for this argument can be found in PeopleTools 8. the appropriate Unicode BOM is automatically written to the start of the file depending on whether the application server hardware platform operates in little endian or big endian mode. All Rights Reserved. RECORD. including UTF8. When a file is opened for writing using the "U" charset argument.cfg. and can be modified using PSADMIN. the default non-Unicode character set is dependent on the Windows ANSI Codepage (ACP) which can be checked using the DOS command chcp. some applications allow or expect the UTF-8 sequence of the BOM (0xEF BB BF). Shift-JIS. See Enterprise PeopleTools 8. for example. If you are writing an XML file using a different character set. appears as ISO characters .

The following example opens a numbered file for writing in a non-Unicode format.Close(). Returns A file object if successful. &MYFILE. "E". UNIX "/" separators are converted to "\". 344 Copyright © 1988. On a WIN32 system.PeopleCode Built-in Functions Chapter 1 Parameter Description pathtype If you have prepended a path to the file name. use this parameter to specify whether the path is an absolute or relative path. The valid values for this parameter are: • • %FilePath_Relative (default) %FilePath_Absolute If you don't specify pathtype the default is %FilePath_Relative.IsOpen Then &MYFILE.WriteLine("Some text. &MYFILE. it depends only on the platform where your PeopleCode is executing.Close(). "N". All Rights Reserved. If &MYFILE. RECORD. 2009. and on a UNIX system. You must specify a drive letter as well as the complete path. Note.CHARSET). Oracle and/or its affiliates. "U")."). "R".txt".IsOpen Then while &MYFILE. Example The following example opens an existing Unicode file for reading: &MYFILE = GetFile(&SOMENAME. WIN32 "\" separators are converted to "/". The following example uses the CHARSET field to indicate the character set to be used: &MYFILE = GetFile("INPUT. The function automatically converts platform-specific separator characters to the appropriate form for where your PeopleCode program is executing. End-If. If the path is an absolute path. %FilePath_Absolute). You can't use any wildcards when specifying a path. . without overwriting any existing files: &MYFILE = GetFile("c:\temp\item*.DAT". If &MYFILE. The syntax of the file path does not depend on the file system of the platform where the file is actually stored. whatever path you specify is used verbatim. Null otherwise. End-If. /* Process the contents of each &SOMESTRING */ End-While.ReadLine(&SOMESTRING).

50 PeopleBook: PeopleCode API Reference.50 PeopleBook: PeopleCode API Reference." GetPosition Enterprise PeopleTools 8." File Access Interruption Recovery GetGanttChart Syntax GetGanttChart([RecordName. Example &gGantt = GetGanttChart(QE_CHART_DUMREC. Oracle and/or its affiliates.FieldName Specify the record and field associated with the chart you want to get. "File Class. "File Class.FieldName]) Description Use the GetGanttChart function to get a reference to a Gantt class chart object.50 PeopleBook: PeopleCode API Reference. page 341 Enterprise PeopleTools 8.50 PeopleBook: PeopleCode API Reference. "PeopleCode Built-in Functions. 2009.Chapter 1 PeopleCode Built-in Functions See Also Chapter 1." FileExists. Returns A reference to a Gantt object. "File Class.QE_CHART_FIELD)." GetFile.50 PeopleBook: PeopleCode API Reference." IsOpen Enterprise PeopleTools 8. Parameters Parameter Description RecordName. "File Class" Enterprise PeopleTools 8. Chapter 1." SetPosition Enterprise PeopleTools 8. Copyright © 1988." Open Enterprise PeopleTools 8." FindFiles. "PeopleCode Built-in Functions.50 PeopleBook: PeopleCode API Reference. All Rights Reserved. page 265. 345 . "File Class. You associate a record and field name with a page control in Application Designer. "File Class. page 270 and Chapter 1. "PeopleCode Built-in Functions.

"Charting Classes" Enterprise PeopleTools 8.50 PeopleBook: PeopleCode API Reference. Use the GetGrid function to return a reference to a grid object. "@". Note. Because the Grid class applies to a complete grid. See Enterprise PeopleTools 8.50 PeopleBook: PeopleCode Developer's Guide.gridname) Description Use the GetGrid function to instantiate a grid object from the Grid class. the grid is automatically named the same as the name of the primary record of the scroll for the grid (in the Page Field Name. All Rights Reserved. the earliest event you can use is the page Activate Event. which is the Page Field Name on the General tab of that grid's page field properties. 2009. If you want to access an AnalyticGrid. the Page Field Name is not automatically updated. Oracle and/or its affiliates. "Using Page Controls. and populates it with the grid specified by gridname. Specify a grid name consisting of any combination of uppercase letters.PeopleCode Built-in Functions Chapter 1 See Also Enterprise PeopleTools 8. If more than one occurs count was specified for the grid in Application Designer. PeopleSoft builds a page grid one row at a time." Using Charts GetGrid Syntax GetGrid(PAGE. you can't attach PeopleCode that uses the Grid class to events that occur before the grid is built.50 PeopleBook: PeopleSoft Application Designer Developer's Guide. You must change this name if you want the name of the grid to reflect the name of the record.) Note.50 PeopleBook: PeopleCode API Reference. You can change this name on the Record tab of the Grid properties. Using the Grid Name When you place a grid on a page. digits and "#". Note. 346 Copyright © 1988." Using the Gantt Class Enterprise PeopleTools 8. GetGrid will return only the first occurence of the grid.pagename. If the name of the record changes. This is the name you use with the GetGrid function. use the GetAnalyticGrid function instead. and "_". "PeopleCode and the Component Processor. . "$"." Activate Event. "Charting Classes.

&MYGRID = GetGrid(PAGE. 347 . Specify the Page Field Name on the General tab of the grid's page field properties. Open the page in Application Designer. 2009. "EMPL_GRID"). 2. On the General tab. Parameters Parameter Description PAGE. Note.EMPLOYEE_CHECKLIST. Example This example retrieves the second grid named "EMPL_GRID" within a scroll: local Grid &MYGRID. type the new grid name in Page Field Name. select the grid and access the page field properties. All Rights Reserved.Chapter 1 PeopleCode Built-in Functions Changing a grid name To change a grid name: 1. Oracle and/or its affiliates.pagename gridname Specify the name of the page definition containing the grid you want. Copyright © 1988. Returns A Grid object populated with the requested grid. Every grid on a page must have a unique name.

the parameter substitution does not take place.. and so on. use the GetJavaScriptURL response class method to access it..PeopleCode Built-in Functions Chapter 1 See Also Enterprise PeopleTools 8. See Enterprise PeopleTools 8. paramlist]) Where paramlist is an arbitrary-length list of values of undetermined (Any) data type in the form: inval1 [.50 PeopleBook: PeopleCode API Reference. %BIND(:2) is the second.textname [." GetJavaScriptURL. from an HTML definition. Returns The resulting HTML text is returned as a string. they are substituted into the HTML text based on positional reference (for example.) Note.textname Specify the name of an existing HTML text from an HTML definition. All Rights Reserved. inval2] . . "PeopleCode Built-in Functions. If run from a 2 tier environment. Description Use the GetHTMLText function to retrieve a predefined HTML text from an HTML definition in the user's current language. Restrictions on Use Use this function with the PeopleSoft Pure Internet Architecture." GetColumn Chapter 1." GetAnalyticGrid. 348 Copyright © 1988. Parameters Parameter Description HTML. or HTML that contains a JavaScript program. Use the GetHTMLText function only to retrieve HTML.50 PeopleBook: PeopleCode API Reference. "Grid Classes. 2009. page 322 GetHTMLText Syntax GetHTMLText(HTML. If any values are included in paramlist. "Internet Script Classes (iScript). If you have an HTML definition that contains only JavaScript. %BIND(:1) is the first parameter. Oracle and/or its affiliates. or the base language if no entry exists in the user's current language.

50 PeopleBook: PeopleSoft Application Designer Developer's Guide. &string = GetHTMLText(HTML." Using HTML Definitions and the GetHTMLText Function Enterprise PeopleTools 8.ImageName) Description Use the GetImageExtents function to return the width and height of the image specified by ImageName.HTMLAREA. &HTMLfield = GetRecord(Record.50 PeopleBook: PeopleCode Developer's Guide. This image must exist on the page. "good". "Using Page Controls. 2009. Parameters Parameter Description ImageName Specify the name of the image on the page. The following is the PeopleCode program: Local Field &HTMLfield.50 PeopleBook: PeopleCode API Reference. 349 . "PeopleCode and PeopleSoft Pure Internet Architecture. Copyright © 1988. All Rights Reserved. See Also Enterprise PeopleTools 8. "simple"). The output from &string (displayed in an HTML area control) is: This is a good and simple test." Using HTML Areas GetImageExtents Syntax GetImageExtents(IMAGE. Returns An array of data type number.CHART_DATA).Chapter 1 PeopleCode Built-in Functions Example The following is the text in the HTML definition TEST_HTML: This is a %BIND(:1) and %BIND(:2) test. &HTMLfield. Oracle and/or its affiliates.TEST_HTML. where element 1 is the image height and element 2 is the image width.Value = &string. "Internet Script Classes (iScript)" Enterprise PeopleTools 8.

See Enterprise PeopleTools 8.name) Description Use the GetInterlink function to instantiate a Business Interlink definition object based on a Business Interlink definition created in Application Designer. If you drag a Business Interlink definition from the project workspace (in Application Designer) to an open PeopleCode editor window. you can refresh just that part. The Business Interlink object can provide a gateway for PeopleSoft applications to the services of any external system. 350 Copyright © 1988. This causes the page to be redrawn. Generally." Specifying Image Field Attributes GetInterlink Syntax GetInterlink(Interlink. Use PeopleSoft Integration Broker instead.PT_TREE_EXPANDED).Refresh() refreshes the entire page. do not use the GetInterlink function in a program you create from scratch. The Refresh rowset class reloads the rowset (scroll) using the current page keys. a "template" is created.50 PeopleBook: PeopleSoft Application Designer Developer's Guide. The following is the template created from dragging the Business Interlink definition LDAP_SEARCHBIND to an open PeopleCode editor window. . Oracle and/or its affiliates. All Rights Reserved. WinMessage("Height is " | &ImageExtents[1] | " and width is " | &ImageExtents[2]). Note. &ImageExtents = GetImageExtents(Image. "Creating Field Definitions. GetLevel0().PeopleCode Built-in Functions Chapter 1 Example Local array of number &ImageExtents. If you only want a particular scroll to be redrawn. with values filled in based on the Business Interlink definition you dragged in. you may want to refresh your page. 2009.50 PeopleBook: PeopleSoft Integration Broker. See Also Enterprise PeopleTools 8. After you use this function. Business Interlinks is a deprecated product.

&ret = &Directory_Search_ParmsDoc. /* If NOT &RSLT .AddValue("Base". &LDAP_SEARCHBI_1. <*>). <*>).UserID_Attribute_Name = "uid". All Rights Reserved. &LDAP_SEARCHBI_1.AddValue("Host".GetValue("return_status_msg". */ Copyright © 1988. &LDAP_SEARCHBI_1 = GetInterlink(INTERLINK.. /* ===> You might want to call the following statement in a loop if there is more⇒ than one row of data to be added. &ret = &Directory_Search_ParmsDoc. <*>).com". If ( &EXECRSLT <> 1 ) Then /* The instance failed to execute */ Else &outDoc = &LDAP_SEARCHBI_1.User_DN = "cn=Admin. /* ===> The following statement executes this instance: */ &EXECRSLT = &LDAP_SEARCHBI_1.Fields.dtd". */ &LDAP_SEARCHBI_1.AddValue("Connect_Password". &LDAP_SEARCHBI_1. Local BIDocs &outDoc. Local number &EXECRSLT.AddValue("Port". &Directory_Search_ParmsDoc = &inDoc.LDAP_SEARCHBIND). <*>).AddValue("Connect_DN".URL = "///file:C:/User/Documentum/XML%20Applications/proddoc/ peoplebook_upc/peoplebook_ upc.peoplesoft. Local BIDocs &inDoc. &ret = &outDoc.AddValue("User_Password".BIDocValidating = "Off". &ret = &Directory_Search_ParmsDoc. <*>). <*>). <*>).*/ /* ===> Declare and instantiate: */ Local Interlink &LDAP_SEARCHBI_1. &LDAP_SEARCHBI_1.Port = 389.AddValue("Scope". <*>). <*>). End-If. &ret = &outDoc. &ret = &Directory_Search_ParmsDoc. You need to replace all references to '<*>' OR default values with references to PeopleCode variables and/or a Rec. <*>).GetOutputDocs(""). &ret = &outDoc.Server = "jtsay111198. &ret = &inDoc. /* ===> You can use the following assignments to set the configuration parameters.Execute(). <*>).GetValue("Distinguished_Name".AddValue("Filter". &LDAP_SEARCHBI_1. 2009. &ret = &inDoc. Oracle and/or its affiliates. &ret = &Directory_Search_ParmsDoc.o=PeopleSoft". <*>). 351 . &ret = &inDoc.AddValue("User_ID". Local Boolean &RSLT. &LDAP_SEARCHBI_1.Password = &password. &ret = &inDoc..GetValue("return_status".AddDoc("Directory_Search_Parms").Chapter 1 PeopleCode Built-in Functions /* ===> This is a dynamically generated PeopleCode template to be used only as a helper to the application developer. */ /* ===> Add inputs: */ &inDoc = &LDAP_SEARCHBI_1.GetInputDocs("").

SomeStaticMethod(). Local Interlink &SRA_ALL_1. "Business Interlink Class" GetJavaClass Syntax GetJavaClass(ClassName) Description Use the GetJavaClass function to access a Java class so that you can manipulate it in PeopleCode. This is used for those classes that have static members.class.50 PeopleBook: PeopleCode API Reference. Returns A Business Interlink object. do the following: &Result = GetJavaClass("java. &SRA_ALL_1 = GetInterlink(Interlink.class. Example The following example instantiates a Business Interlink object based on the Business Interlink definition QE_RP_SRAALL. it can be located in a directory specified in the PS_CLASSPATH environment variable or in other specified locations. All Rights Reserved. . you access such static members of a class by using the class name: result = java. To do this in PeopleCode.name"). See Also Enterprise PeopleTools 8. Oracle and/or its affiliates. 352 Copyright © 1988. In Java. 2009. You can call only static methods.PeopleCode Built-in Functions Chapter 1 Parameters Parameter Description Interlink. that is.name Specify the name of the Business Interlink definition from which to instantiate a Business Interlink object.SomeStaticMethod(). class methods. The PeopleCode API Reference provides details on where you can place custom and third-party Java classes.QE_RP_SRAALL). Note. where it isn't appropriate to instantiate an object of the class. If you create a class that you want to call using GetJavaClass. with the object created with this function.name.

See Also Chapter 1. page 146 and Chapter 1. . .50 PeopleBook: PeopleCode API Reference. 4). . This code illustrates accessing the value of the fifth element of an integer array. All Rights Reserved. . One of these static methods is GetInt: public static int getInt(Object array. . "PeopleCode Built-in Functions.Array has no public constructors and has only static methods.getInt(&MyArray. Local JavaObject &RefArray.reflect. . . page 145 Enterprise PeopleTools 8. &MyArray = CreateJavaArray("int[]". &RefArray = GetJavaClass("java. Parameters Parameter Description ClassName Specify the name of an already existing class. .lang. The methods are used to manipulate Java array objects.Chapter 1 PeopleCode Built-in Functions See Enterprise PeopleTools 8.reflect." CreateJavaObject. 353 . 2009. &FifthElement = &RefArray. "Java Class" GetLevel0 Syntax GetLevel0() Copyright © 1988. Returns A JavaObject that refers to the named Java class. "Java Class. "PeopleCode Builtin Functions.Array"). int index) To use this method. . get the class by using GetJavaClass." System Setup for Java Classes." CreateJavaArray. &MyArray. Oracle and/or its affiliates.lang. Example The Java class java. 24).50 PeopleBook: PeopleCode API Reference. This parameter takes a string value.

&MSG. GetRow.LEVEL1_REC). If used from PeopleCode that isn't associated with a page. To reference a level 2 rowset you would have code similar to this: Local Rowset &ROWSET_LEVEL2.GetRow(5). /* or */ &ROWSET_LEVEL0 &ROWSET_LEVEL1 &ROWSET_LEVEL2 /* or */ &ROWSET_LEVEL2 = GetLevel0(). 354 Copyright © 1988.LEVEL1_REC). All Rights Reserved. The following is equivalent to the previous example.GetRowset(SCROLL.GetRowset(SCROLL.LEVEL2_REC). For a component. it returns the base rowset from the current context. . this is the level 0 of the page. &ROWSET_LEVEL0. and a shortcut. = &ROWSET_LEVEL0. this is the base rowset.GetRow(5).GetRowset(SCROLL. Example The following code sample returns the level one rowset. Specifying GetLevel0()(1) is the equivalent of specifying GetLevel0(). Returns This function returns a rowset object that references the base rowset.GetRow(1).LEVEL1_REC). Note. For a message. that is.LEVEL1_REC(5).GetRow(1).GetRowset(). Parameters GetLevel0 has no parameters. However. You can also get the base rowset for a message using the GetRowset message class method. Local Rowset &ROWSET.GetRowset(SCROLL.LEVEL1_REC). &ROWSET_LEVEL2 = GetLevel0().GetRow(1).PeopleCode Built-in Functions Chapter 1 Description Use the GetLevel0 function to create a rowset object that corresponds to level 0 of the component buffer. &ROWSET_LEVEL1.GetRow(1). &ROWSET = GetLevel0().LEVEL2_REC). Oracle and/or its affiliates. = GetLevel0()(1). Local Rowset &ROWSET.LEVEL2_REC).GetRowset(SCROLL. For a Application Engine program. it does have a default method. 2009. &ROWSET = GetLevel0()(1). = &ROWSET_LEVEL1. this is the state record rowset. GetRowset(SCROLL.GetRowset(SCROLL.

USER_PROFILE).Chapter 1 PeopleCode Built-in Functions See Also Chapter 1. Oracle and/or its affiliates.50 PeopleBook: PeopleCode API Reference.WEBLIB_PORTAL). Copyright © 1988. 2009. 355 . All Rights Reserved. &Array = GetMethodNames("CompIntfc". page 384 Enterprise PeopleTools 8. "PeopleCode Built-in Functions. Example Local array of string &Array. CompIntfc. or the function names of a WEBLIB record. Parameters Parameter Description Type Specify the type of methods or functions you want returned.50 PeopleBook: PeopleCode Developer's Guide." GetRowset. "Rowset Class" Enterprise PeopleTools 8. "Accessing the Data Buffer" GetMethodNames Syntax GetMethodNames(Type. The values are: • • Name WebLib CompIntfc Specify the name of the Component Interface or WEBLIB record that you want to know the methods or functions for. This parameter takes a string value. Returns An array of string containing the method or function names. &Array = GetMethodNames("WebLib". Record. Name) Description Use the GetMethodNames function to return either the method names for a Component Interface.

2009. &MSG = GetMessage(). Oracle and/or its affiliates.50 PeopleBook: PeopleCode API Reference. See Also Enterprise PeopleTools 8." GetMessage Parameters None. All Rights Reserved. Returns A reference to an empty message object if successful. such as GetRowset. In addition. It retrieves a message from the message queue for the current message being processed. Use the IntBroker class GetMessage method instead. This function has been deprecated and remains for backward compatibility only. The GetMessage function does not load the message with data. Note." Web Libraries GetMessage Syntax GetMessage() Description Use the GetMessage function to return a message. You must use another method. It always creates a new instance of a message object.50 PeopleBook: PeopleCode API Reference. "Component Interface Classes" Enterprise PeopleTools 8. . you must populate the message object with data before running any methods on it. NULL if not successful.PeopleCode Built-in Functions Chapter 1 See Also Enterprise PeopleTools 8. to populate the message object. 356 Copyright © 1988. "Message Classes. "Internet Script Classes (iScript). Note.50 PeopleBook: PeopleCode API Reference. Example Local message &MSG.

It creates and loads a data tree for the default message version. GetMessageXmlDoc Syntax GetMessageXmlDoc() Description Use the GetMessageXmlDoc function in any of the messaging PeopleCode events. This function has been deprecated and remains for backward compatibility only.Chapter 1 PeopleCode Built-in Functions See Also Chapter 1. An XML message is a message that is unstructured. "Message Classes. and returns NULL if not successful. that is." CreateMessage. Note." GetXmlDoc Copyright © 1988. See Also Enterprise PeopleTools 8. isn't based on a record hierarchy. This function has been deprecated and is no longer supported. 357 .channelname) Description Use the GetMessageInstance function to get a message from the message queue. Note." GetRowset Enterprise PeopleTools 8. either from the message queue for asynchronous messages. Use the Message class GetXMLDoc method instead.pub_nodename. "Message Classes" GetMessageInstance Syntax GetMessageInstance(pub_id. "Message Classes. It retrieves an XML message.50 PeopleBook: PeopleCode API Reference.50 PeopleBook: PeopleCode API Reference. or in memory for synchronous messages. Oracle and/or its affiliates. 2009. for the current message being processed.50 PeopleBook: PeopleCode API Reference. "PeopleCode Built-in Functions. All Rights Reserved. page 148 Enterprise PeopleTools 8.

Oracle and/or its affiliates. &node_array = &root. Record &SALES_ORDER_INFO. Local Local Local Local Local XmlDoc &BIGMAN.GetElementsByTagName("QE_PHONE"). &acct_id_node = &node_array. &node_array = &root.DESCRLONG). XmlNode &node.Value = &account_id_value.Get(2).QE_SALES_ORDER).Get(2). Rowset &LEVEL0. &SALES_ORDER_INFO.GetElementsByTagName("QE_ADDRESS"). .NodeValue. &BIGMAN = GetMessageXmlDoc().GetElementsByTagName("QE_ACCT_ID"). Example The following example uses the GetMessageXmlDoc built-in function. &child_count = &root. &phone_node = &node_array.ChildNodeCount.Update(). &address_node = &node_array.GetField(Field. &outstring = "GetMessageXMLDoc Test".PeopleCode Built-in Functions Chapter 1 Parameters None. &root. string &outstring.NodeValue. &SALES_ORDER_INFO. Returns A reference to an XmlDoc object if successful.GetElementsByTagName("QE_ACCOUNT_NAME"). &acct_name_node = &node_array.Value = &outstring.NodeValue. 2009. All Rights Reserved. &node_array = &root.Get(2).GetField(Field.NodeValue.DocumentElement. &root = &BIGMAN. &CRLF = Char(13) | Char(10). &SALES_ORDER_INFO.Get(2). &SALES_ORDER_INFO = CreateRecord(Record.QE_ACCT_ID). &outstring = &outstring | &CRLF | &account_id_value | &CRLF | &account_name_value | &CRLF | &address_value | &CRLF | &phone_value. &account_name_value = &acct_name_node. &REC. &account_id_value = &acct_id_node. &address_value = &address_node. &phone_value = &phone_node. /* Get values out of XMLDoc */ &node_array = &root. NULL if not successful. 358 Copyright © 1988.

INSERT. page 631 Enterprise PeopleTools 8. a negative value is returned and the field value isn't incremented.field | record_name.50 PeopleBook: PeopleCode API Reference. and DELETE) it should only be issued in the following events: • • • SavePreChange WorkFlow SavePostChange If you use this function in an event other than these. page 498 and Chapter 1.50 PeopleBook: PeopleCode API Reference. You might use this function to increment an employee ID field by one when you are adding a new employee. 2009. PeopleCode Event Considerations Because this function results in a database update (specifically. UPDATE. The maximum value possible for max_number is 2147483647. "XmlDoc Class" Enterprise PeopleTools 8. 359 .Chapter 1 PeopleCode Built-in Functions See Also Chapter 1. If the new value generated exceeds max_number." PublishXmlDoc. All Rights Reserved. "PeopleCode Built-in Functions.field_name}. max_number) Description Use the GetNextNumber function to increment the value in a record for the field you specify by one and returns that value. Oracle and/or its affiliates." SyncRequestXmlDoc. you need to ensure that the dataflow is correct and that you do not receive unexpected results. "PeopleCode Built-in Functions. "Message Classes" GetNextNumber Syntax GetNextNumber ({record.) AutoCommit (this can be a performance enhancement as table is not locked as long). Copyright © 1988. GetNextNumber and GetNextNumberWithGapsCommit The following is some of the differences between the two functions. as the table is locked until all Save events are finished. to enable you to better chose which one is better for your application. GetNextNumber GetNextNumberWithGapsCommit No AutoCommit (which can be a problem.

Returns A Number value equal to the highest value of the field specified plus one.PeopleCode Built-in Functions Chapter 1 GetNextNumber GetNextNumberWithGapsCommit Ability to use WHERE criteria for maintaining multiple sequence numbers in a single record. All Rights Reserved. 2009. you have to manually update these two parameters in your programs whenever that record or field is renamed. This parameter with record_name was used prior to PeopleTools 8. record_name field_name max_number Specify the highest allowed value for the field you're incrementing. Allowed in SavePostChange Can be used in any PeopleCode event. . Ability to increment by more than 1.field Specify the record and field identifiers for the field for which you want the new number. Note. Specify as a string the name of the field for which you want the new number. Parameters Parameter Description record. If you use the older syntax (record_name.field_name).field) is automatically updated. The function returns one of the following: Numeric Value Constant Value Description Number -1 -2 N/A %GetNextNumber_SQLFailure %GetNextNumber_TooBig The new number SQL failure Number too large. so you won't have to maintain it. This parameter with field_name was used prior to PeopleTools 8. Oracle and/or its affiliates. The new syntax (record. beyond max_number 360 Copyright © 1988. Specify as a string the name of the record containing the field for which you want the new number. This is the recommended way to identify the field. GetNextNumber returns an error if the value to be returned would be greater than max_number. The maximum value possible for max_number is 2147483647.

999). 2009. Use the GetNextNumberWithGapsCommit function instead. Oracle and/or its affiliates. WHERE_Clause. "PeopleCode Built-in Functions. Evaluate &VALUE When = %GetNextNumber_SQLFailure /* do processing */ When = %GetNextNumber_TooBig /* do processing */ When = %GetNextNumber_NotFound /* Do processing */ When-other /* do other processing */ End-Evaluate. 361 . End-if.DUN_ID_NUM. paramlist]) Where paramlist is an arbitrary-length list of values in the form: var1 [.DUN_ID_NUM.field. See Also Chapter 1.increment [.. Note.. This function also enables you to specify a SQL WHERE clause as part of the function for maintaining multiple sequence numbers in a single record. and return that value plus increment." GetNextNumberWithGaps. All Rights Reserved. This function has been deprecated and remains for backward compatibility only. The following uses the constant to check for the value returned: &VALUE = GetNextNumber(INSTALLATION_AR.Chapter 1 PeopleCode Built-in Functions Numeric Value Constant Value Description -3 %GetNextNumber_NotFound No number found. Copyright © 1988. invalid data format Example If %Component = "RUN_AR33000" Then DUN_ID_NUM = GetNextNumber(INSTALLATION_AR. page 361 GetNextNumberWithGaps Syntax GetNextNumberWithGaps(record. 99999999). Description Use the GetNextNumberWithGaps function to determine the highest value in a table for the field you specify. var2] .max_number.

field Specify the record and field identifiers for the field for which you want the new number. UPDATE. INSERT.PeopleCode Built-in Functions Chapter 1 Note. Specify the highest allowed value for the field you're incrementing. You can specify up to 31 digits for this value. PeopleCode Event Considerations Because this function results in a database update (specifically. Specify a WHERE clause for maintaining multiple sequence numbers. Specify the value you want the numbers incremented by. Oracle and/or its affiliates. Parameters for the WHERE clause. and DELETE) it should only be issued in the following events: • • SavePreChange WorkFlow If you use this function in an event other than these. max_number increment WHERE_Clause paramlist Returns A Number value equal to the highest value of the field specified plus one. GetNextNumberWithGaps also issues a COMMIT after incrementing the sequence number if no other database updates have occurred since the last COMMIT. . beyond max_number 362 Copyright © 1988. The function returns one of the following: Numeric Value Constant Value Description Number -1 -2 N/A %GetNextNumber_SQLFailure %GetNextNumber_TooBig The new number SQL failure Number too large. You can specify up to 31 digits for this value. GetNextNumberWithGaps returns an error if the value to be returned would be greater than max_number. 2009. All Rights Reserved. This limits the time a database lock is held on the row and so may improve performance. Parameters Parameter Description record. This is the recommended way to identify the field. you need to ensure that the dataflow is correct and that you do not receive unexpected results.

field ) is incremented right away and it doesn't hold any database internal row lock beyond the execution of this function. 363 .field.09 0.09 0.000 COM Stmt=UPDATE PS_GREG emplid = 8001 Dur=0.010 Dur=0. The sequence number (record. 2009. 999999.PTTST81B RC=0 2-945 21..09 0.09 0.09 0. Description Use the GetNextNumberWithGapsCommit function to return the sequence number value plus increment for the given field residing in the given record. Oracle and/or its affiliates.000 EXE Dur=0.PTTST81B RC=0 2-949 21. This function also enables you to specify a SQL Where clause as part of the function for maintaining multiple sequence numbers in a single record.max_number.010 Cur#4..000 Dur=0.PTTST81B RC=0 2-947 21.53.PTTST81B RC=0 SET DURATION_DAYS = DURATION_DAYS + 50 where 2-944 21.increment [. The GetNextNumberWithGapsCommit function can be used in any event.000 Cur#4.PTTST81B RC=0 2-948 21.09 0. for example.000 Cur#4.Chapter 1 PeopleCode Built-in Functions Numeric Value Constant Value Description -3 %GetNextNumber_NotFound No number found. invalid data format Example The following PeopleCode: &greg = GetNextNumberWithGaps(GREG. Copyright © 1988. 8001). 50. getting a new Purchase Order number to be used in the application transaction.53.000 Cur#4.000 Cur#4.53.000 Connect=PTTST81B/sa/ Dur=0.000 Cur#4. "where emplid = :1".53.010 EXE Fetch Commit Disconnect See Also Chapter 1.000 Cur#4. This function is typically used for obtaining a new sequence number for the application.PTTST81B RC=0 Dur=0.53. WHERE_Clause. results in the following: 2-942 21.DURATION_DAYS. Use this function instead of the GetNextNumberWithGaps function. The GetNextNumberWithGaps function is very restrictive in its usage.09 0.PTTST81B RC=0 2-943 21. "PeopleCode Built-in Functions. var2] .PTTST81B RC=0 DAYS FROM PS_GREG where emplid = 8001 2-946 21.000 Dur=0.53.000 COM Stmt=SELECT DURATION_ Dur=0. All Rights Reserved." GetNextNumber.53.010 Cur#4. paramlist]) Where paramlist is an arbitrary-length list of values in the form: var1 [. page 359 GetNextNumberWithGapsCommit Syntax GetNextNumberWithGapsCommit(record.53.09 0.

This is the recommended way to identify the field. Specify the highest allowed value for the field you're incrementing. on the same table. The default behavior is to keep the secondary database connection persistent in order to improve performance for the next GetNextNumberWithGapsCommit usage. If the database administrator finds the persistent connection too high an overhead for the production environment (which should not be the case since PeopleSoft uses application server to mulitplex the database connection). The second connection can be completely disabled using DbFlags bit four in the application server and process scheduler configuration files Considerations Using GetNextNumberWithGapsCommit The following restrictions apply to the GetNextNumberWithGapsCommit function: • The function is enabled for Application Engine programs running in stand-alone mode (via PSAE). This function is disabled for Application Engine programs that execute through the Application Engine server (PSAESRV). All Rights Reserved.50 PeopleBook: System and Server Administration. isolate the table that contains the sequence number to its own tablespace and set the locksize parameter to row. 2009. the database administrator can change the default behavior to use an on-demand connection method. . max_number increment WHERE_Clause paramlist 364 Copyright © 1988." PSTOOLS Options Parameters Parameter Description record. The persistent second connection is disabled using DbFlags bit eight in the application server and process scheduler configuration files. For a DB2 z/OS database. • • • See Also Enterprise PeopleTools 8. "Setting Application Server Domain Parameters. You can specify up to 31 digits for this value. Oracle and/or its affiliates. Specify the value you want the numbers incremented by. You can specify up to 31 digits for this value. This can lead to lock contention or deadlocking. PeopleSoft does not recommend Using both the GetNextNumberWithGapsCommit function and the GetNextNumber function in the same application.PeopleCode Built-in Functions Chapter 1 Note. A secondary database connection is used to increment and retrieve record. Specify the parameters for the SQL Where clause. in the same unit of work.field. Specify a SQL Where clause for maintaining multiple sequence numbers.field Specify the record and field names for the field for which you want the new number. This function is enabled for Application Engine programs running under Unix System Services on z/OS.

39.000 GNNWGC ---.39.39. 365 .54 0.010 COM Stmt=UPDATE PS_ MCF_INSTALL SET MCF_EMAIL_ID = MCF_EMAIL_ID + 1 1-195 10. invalid data format. 2009. -3 %GetNextNumber_NotFound Example The following PeopleCode increments the MCF_EMAIL_ID field by one and returns the new value.DB844901 RC=0 Dur=0.39. 2147483647.1980." GetNextNumber.000 Disconnect See Also Chapter 1.000 Commit 1-197 10. The function returns one of the following: Numeric Value Constant Value Description Number -1 -2 None %GetNextNumber_SQLFailure %GetNextNumber_TooBig The new number SQL failure Number returned is too large.1980.000 COM Stmt=SELECT MCF_ EMAIL_ID FROM PS_MCF_INSTALL 1-196 10.MCF_EMAIL_ID.320 Cur#2. page 359 GetNextProcessInstance Syntax GetNextProcessInstance([Commit]) Copyright © 1988.010 Cur#2. committing immediately.000 Cur#2.39.1980.1980.54 0.54 0.DB844901 RC=0 Dur=0.54 0. "PeopleCode Built-in Functions. The GetNextNumberWithGapsCommit function returns an error if the value to be returned would be greater than max_number.39. &LAST_AUTO_NBR = GetNextNumberWithGapsCommit(MCF_INSTALL. No number found.DB844901 RC=0 Dur=0.320 Connect=Secondry /DB844901/testdb2/ 1-193 10.DB844901 RC=0 Dur=0. All Rights Reserved.Chapter 1 PeopleCode Built-in Functions Returns A number value equal to the highest value of the field specified plus one increment. beyond max_number.54 0.000 Cur#2. The above code produces output similar to the following: 1-192 10. 1).000 Cur#2.DB844901 RC=0 Dur=0.54 0.1980.Successful obtain Second DB connection 1-194 10. Oracle and/or its affiliates.

50 PeopleBook: PeopleCode API Reference. Oracle and/or its affiliates. the function commits the changes to the Process Scheduler System table to set it to the next available process instance for the next available request. 1 if the system detected an error retrieving the next available process instance. It creates and loads a data tree for the default message version. and returns Null if not successful. categorized as non-repudiation. from the message queue for the specified non-repudiation ID. "ProcessRequest Class" GetNRXmlDoc Syntax GetNRXmlDoc(NRID. Parameters Parameter Description Commit Specify whether the current data instance should be committed to the database. All Rights Reserved. It retrieves an XML message. 366 Copyright © 1988. Returns Return a number: 0 if successful. isn't based on a record hierarchy. do not commit the data. specify "0" for Commit. When determining to find the next process instance in the sequence. If this function is called within a PeopleCode function where issuing a COMMIT to the database destroys a unit of work. 2009. the function ensures the next available process instance does not exist in both the Process Request and Message Log tables. See Also Enterprise PeopleTools 8.EntityName) Description Use the GetNRXmlDoc function in any of the messaging PeopleCode events. By default. This parameter takes a string value: "1". commit the data. that is. . "0". An XML message is a message that is unstructured.PeopleCode Built-in Functions Chapter 1 Description Use the GetNextProcessInstance function to retrieve the next available process instance from the Process Scheduler System table. "1" is the default value.

Oracle and/or its affiliates. 367 . You associate a record and field name with a chart page control in Application Designer.FieldName]) Description Use the GetOrgChart function to get a reference to an OrgChart class object.Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description NRID Specify the non-repudiation ID for the XML message that you want to retrieve. this is the node name. Copyright © 1988. See Also Enterprise PeopleTools 8. Returns A reference to a an OrgChart object. All Rights Reserved.FieldName Specify the record and field associated with the chart you want to get. 2009. This parameter takes a numeric value. "XmlDoc Class" GetOrgChart Syntax GetOrgChart([RecordName. Example &ocOrgChart = GetOrgChart(QE_CHART_DUMREC. EntityName Returns A reference to an XmlDoc object if successful. as a string. Null if not successful. For Peoplesoft. Parameters Parameter Description RecordName. Specify the name of the entity that signed the data.50 PeopleBook: PeopleCode API Reference.QE_CHART_FIELD).

PeopleCode Built-in Functions Chapter 1 See Also Enterprise PeopleTools 8." Using Charts GetPage Syntax GetPage(PAGE.pagename) Description Use the GetPage function to return a reference to a page object. . "Charting Classes" Enterprise PeopleTools 8. Parameters Parameter Description PAGE. "Using Page Controls.pagename The name of the page for which you want to create an object reference. 2009.50 PeopleBook: PeopleCode API Reference. All Rights Reserved. "Charting Classes. Returns A page object that references the page. 368 Copyright © 1988.50 PeopleBook: PeopleCode API Reference. Must be a page in the current context.50 PeopleBook: PeopleSoft Application Designer Developer's Guide. Note. don't instantiate this object in RowInit PeopleCode. Generally. page objects are used to hide or unhide pages in a component.property is equivalent to GetPage(name). The page object shouldn't be used until after the Component Processor has loaded the page: that is.property. use it in PostBuild or Activate instead. the PeopleCode used to manipulate a page object would be associated with PeopleCode in the Activate event. Note An expression of the form PAGE. Oracle and/or its affiliates." Using the OrgChart Class Enterprise PeopleTools 8. Generally.name.

Chapter 1 PeopleCode Built-in Functions Example In the following example. "PeopleCode Built-in Functions. 369 . Chapter 1.level1_row. you can use the GetField function. End-If. Copyright © 1988. by contrast. [RECORD. you can use SCROLL.level1_recname.scrollname.50 PeopleBook: PeopleCode Developer's Guide. "Accessing the Data Buffer. [scrollpath. The GetField function. a page is hidden based on the value of the current field.50 PeopleBook: PeopleCode API Reference. Oracle and/or its affiliates. See Chapter 1. which represent multiple instances of a record field." Understanding Current Context." Understanding Current Context GetPageField Syntax GetPageField(Page.JOB_EARNINGS). Description Use the GetPageField function to reference a specific page field anywhere in the current component. All Rights Reserved. ]] page_field_name) where scrollpath is: [RECORD. "Referencing Data in the Component Buffer." Idiv.pagename. page 340 and Enterprise PeopleTools 8. target_recname To prevent ambiguous references. If you need to reference a field that is unique in the current context. If PAYROLE_TYPE = "Global" Then GetPage(PAGE. "PeopleCode Built-in Functions. you will need to use GetPageField to reference radio buttons.50 PeopleBook: PeopleCode Developer's Guide. "PeopleCode Built-in Functions.level2_row. page 413. 2009.level2_recname.Visible = False. ]] RECORD. "Page Class" Enterprise PeopleTools 8. The page field name is the name specified on the General tab for the page field properties in the page definition in Application Designer. The page field name is not the same as the record field name. Chapter 1. page 413." GetField." Idiv. [target_row. Note. See Also Enterprise PeopleTools 8. uses the record field name as an argument. Generally. where scrollname is the same as the scroll level's primary record name.

End-If. The row number of the row in which the field occurs.Label = "SAMFAIL". /* Commit Radio Button */ "ROLLBACK"). The default is the current row. &Fld3.Label = "Initialize_Long_Label_Name". GetPageField(Page.Label = "Commit_Long_Label_Name". Example The following example initializes four Field objects to four specific radio button page fields and conditionally sets their labels to either a long version or a short version. &Fld4. 370 Copyright © 1988. /* SAMFAIL Radio Button */ If &SetLabel = "Long" Then &Fld1.Label = "Rollback". Else &Fld1. All Rights Reserved. Oracle and/or its affiliates. The name of the page field specified in the page field properties in the page definition. &Fld3.Label = "Initialize". &Fld1 &Fld2 &Fld3 &Fld4 = = = = GetPageField(Page.GNNWG_PAGE. "INITIALIZE").GNNWG_PAGE. A construction that specifies a scroll level in the component buffer. /* Initialize Radio Button */ "COMMIT"). GetPageField enables you to reference each radio button individually.PeopleCode Built-in Functions Chapter 1 Parameters Parameter Description Pagename The name of the page specified in the page definition. You can also pass the %page system variable in this parameter (without the Page reserved word). &Fld2. &Fld2. 2009. GetPageField(Page. /* Rollback Radio Button */ "SAMFAIL"). Even though all of the radio buttons represent the same record field. GetPageField(Page. &Fld4. The pagename page must be in the current component. scrollpath target_row page_field_name Returns This function returns a field object that references a specific instance of a page field in the component buffer. preceded by the keyword Page.Label = "Rollback_Long_Label_Name". . The default is the current scroll. This parameter is optional.GNNWG_PAGE.GNNWG_PAGE. This parameter is optional.Label = "SAMFAIL_Long_Label_Name".Label = "Commit".

FieldName.CIName.METHOD. 371 .Methods Description Use the GetProgramFunctionInfo function to determine the full signature and return values of a PeopleCode user-defined function. "PeopleCode Built-in Functions. or a Component Interface method. Parameters Parameter Description ProgramId Specify the full name of the function or the Component Interface method. "Accessing the Data Buffer" Chapter 1.50 PeopleBook: PeopleCode API Reference. Copyright © 1988. as a string. Oracle and/or its affiliates.Chapter 1 PeopleCode Built-in Functions See Also Enterprise PeopleTools 8. Returns An array of array of any. All Rights Reserved. Component Interface processing traps all errors that occur inside the invocation of the Component Interface and on failure simply returns a false value. "PeopleCode Built-in Functions.MethodName Where ProgramId is the following for Component Interface user-defined methods: COMPONENTINTERFACE." Idiv.METHODS.50 PeopleBook: PeopleCode Developer's Guide.RecordName." GetField. page 413 Chapter 1. Considerations Using Component Interfaces Component Interfaces only support type conversion of primitive data types back and forth between PeopleCode values and those using inside Component Interface processing. "Field Class" Enterprise PeopleTools 8. 2009. page 340 GetProgramFunctionInfo Syntax GetProgramFunctionInfo(ProgramId) Where ProgramId is the following for PeopleCode user-defined functions: RECORD.FIELD.

This only makes sense for Functions defined as CI methods in Component Interface PeopleCode. The signature of the result (see result list below. Value Description D d S A B V t T I i O f Dec Date String Any Boolean None Time DateTime Image Integer Object Float 372 Copyright © 1988. 5. The name of the function. A parameter reference (PARM_NAME) The possibly values of the result are as follows. 6. The default value is True. Note the use of both lower and upper case letters.PeopleCode Built-in Functions Chapter 1 There is one array for every function or method defined in the program. A repeated parameter. Each array contains the following information: 1. 2009.) 4. A boolean indicator of whether this function is permitted to be called by this user. The annotation of the Doc tag. 2. A boolean indicator of whether this function is to be exported (as indicated by the noexp tag). All Rights Reserved. The signature of the parameters as a comma-separated string (see additional information below. . Oracle and/or its affiliates. The parameters may be modified by the following values: Value Description ? * & An optional parameter.) 3.

[i indicates an array of integer. All Rights Reserved.QE_ABSENCE_HIST. */ The following PeopleCode program: Local array of array of any &r. Function Update(&1 As string) Returns number NoExport Doc "this is some attached annotation" Return 1.Field Change"). this code is associated with the record QE_ABSENCE_HIST. The following example is used with a Component Interface program: Copyright © 1988. Two brackets indicates a twodimensional array. and so on. &r = GetProgramFunctionInfo("RECORD. End-Function. three brackets a three-dimensional array. In this case it returns false.QE_REASON. .23. 373 . in the FieldChange event. on the field QE_REASON. For example. /* everything else . Returns a two-dimensional array with a single row that contains the following: &r[1][1] – the name of the function "Update" &r[1][2] – the signature of the parameter "S&" &r[1][3] – the signature of the result "9" &r[1][4] – the annotation of the doc tag "this is some attached annotation" &r[1][5] – a boolean indicator of whether this function is to be exported. Oracle and/or its affiliates.FIELD. 2009. Example In the following example. [[S indicates an array of array of string. The value following the bracket indicates the type of array.METHOD.Chapter 1 PeopleCode Built-in Functions Value Description 9 x [<value> Number Unknown Array A single bracket indicates a single array.

End-Function. LogText(&o). Function Returns Local Local /* /* // D // S // d SetupParameters(&Names As array of string. &log. End-Function. Return &CI.Len Local string &o." | &r [&i][3] | ") doc '" | &r [&i][4] | "'". Else &o = &o | " export ".PeopleCode Built-in Functions Chapter 1 Function Update(&1 As string) Returns number NoExport Doc "this is some attached annotation" Return 1. Local File &log.23. could use the parameter name to get values out of a dom?? */ Base types we could handle = Dec = String = Date 374 Copyright © 1988.Create(). If &r [&i][5] = 0 Then &o = &o | " noexport ". 2009. &CI. Oracle and/or its affiliates.RUNCONTROLID = 99. If &r [&i][6] = 0 Then &o = &o | " no permission "." | &Name)). &CI. End-Function. End-Function. . All Rights Reserved. &Sigs As array of string) array of any array of any &p = CreateArrayAny(). /** Get Component Interface **/ &CI = %Session.23. Function DisplayProgramFuncInfo(&r As array of array of any) Local integer &i.PROCESSTYPE = "Application Engine".WriteLine(&msg). Function Updateagain(&1 As string) Returns number Doc "this is some more attached annotation" Return 1. End-For. For &i = 1 To &r. Else &o = &o | " permitted ". End-If.PROCESSNAME = "AEMINITEST". &CI. Function LogText(&msg As string) If &log = Null Then Return End-If. /* instantiate */ &CI. End-If. integer &i. &o = &r [&i][1] | "(" | &r [&i][2] | ". End-Function.GetCompIntfc(@("CompIntfc. Function CreateCI(&Name As string) Returns ApiObject Local ApiObject &CI.

Break.Len. find it in the funcinfo */ Local integer &i = 1. Return False. 375 .Push("Unimplemented . Break. End-Function. End-If. When = "9" When = "i" &p.Push(&i). /* 2. 1) When = "D" &p."). Return &p. End-While. &funcInfo As array of array of any. &i = &i + 1. 2009. /* first name is create/get/?? */ /* Here is where you'd get the value for this particular parameter and then push it properly onto the parameter array */ Evaluate Substring(&Sigs [&i]. Break.Chapter 1 PeopleCode Built-in Functions // // // // // // // // // // // */ A B V t T I O i f 9 x = = = = = = = = = = = Any Boolean None Time DateTime Image Object Integer Float Number Unknown For &i = 1 To &Sigs. 1. When-Other &p.Push(1). When = "S" &p. . Local integer &nFuncs = &funcInfo. .Push("String for " | &parName). &methodName As string) Returns any /* an example of calling a user defined method on a ci */ /* 1.Len Local string &parName = RTrim(LTrim(&Names [&i + 1])). All Rights Reserved. Function CallUDMMethod(&ci As ApiObject. While &i <= &nFuncs /* name should match and it should be exportable (the default) and the doc tag should have something in it and it should be permitted */ If &funcInfo [&i][1] = &methodName And &funcInfo [&i][5] <> 0 And Len(&funcInfo [&i][4]) > 0 And &funcInfo [&i][6] <> 0 Then Break. Oracle and/or its affiliates. Next get the info necessary to call the function based on the signature Copyright © 1988. End-Evaluate End-For. End-If. If &i > &nFuncs Then LogText("not found").

/* do this the new way .Value = "". /* add in a bogus parameter . ".InvokeMethodUDF(&methodName. /* get the program information */ Local array of array of any &progInfo. 2009. rem LogText("&ci: " | &CI). Each row has the following ([i] = position i): [1] = program name (string) [2] = comma separated list of parameter signatures (string) [3] = result signature (string) [4] = text that was with the doc tag. &Pars = SetupParameters(&parNames." | &ciName | ". End-Function.Len .tested . Local array of string &parNames = Split(&funcInfo [&i][4]. /* check with variable for method name */ Local string &methodname = "FoxTest". 2). These are the names to be exposed as the web service⇒ parameter names 376 Copyright © 1988. Local array of any &pars = CreateArrayAny("First parameter". Return False. ". specifying what method has to be⇒ called first second and subsequent items are the names of the parameters (this information⇒ is not obtainable from the program information. QE_ABSENCE_HIST. Oracle and/or its affiliates. %FilePath_Absolute). &parSignature).⇒ &bogus */))."). Else &Pars = CreateArrayAny().txt".PeopleCode Built-in Functions Chapter 1 info */ Local string &parSignatures = &funcInfo [&i][2]. Convention here is a comma separated list of⇒ values: first item is one of either Create or Get. &Pars).QE_REASON. /* first one should be Create/get/? */ /* number of parameters should match number of parameter names */ If &parSignature.").Len <> &parNames. "a". &progInfo = GetProgramFunctionInfo(&ciObjid). . If Len(&parSignatures) > 0 Then &bPars = True.at least model how a webservices Peoplecode⇒ implementation could do it */ Local string &ciObjid = "COMPONENTINTERFACE. Call the udm method with our parameters */ Return &ci. LogText("====================================="). /* 3.works . End-If.fails with false return :-( as per⇒ usual in api objects*/ Local string &bogus = "bogus par". &pars /* . /* clean it up */ Local string &ciName = "PROCESSREQUEST". All Rights Reserved.InvokeMethodUDF(&methodname. /* returns a an array of arrays: an array for each function defined in the program.Methods".1 Then LogText("length mismatch").METHOD. Local ApiObject &CI = CreateCI(&ciName). &log = GetFile("C:\temp\junk\udflog. LogText("Result of direct call: " | &CI. Local array of string &parSignature = Split(&parSignatures. Local boolean &bPars = False. End-If. Local array of any &Pars.

LogText("Result of indirect call: " | CallUDMMethod(&CI.⇒ NumericParameter" [5] = an integer setting: 0=no export and 1=export (the default) [6] = an integer setting indicating the permission for user to call this (only⇒ applies to CI programs) 0=no permission and 1=permitted (the default) */ DisplayProgramFuncInfo(&progInfo). StringParameter. ChannelName. "Component Interface Classes" GetPubContractInstance Syntax GetPubContractInstance(pub_id. "PeopleCode Built-in Functions. Oracle and/or its affiliates. &progInfo.channelname. VersionName[. End-If. See Chapter 1.pub_nodename. 2009. Note. Copyright © 1988. Segment]) Description Use the GetPubHeaderXmlDoc function to retrieve the message header from the message queue.g. See Also Enterprise PeopleTools 8. is the published message before any transformations were performed. also known as the message instance. Use the IntBroker class GetMessage method instead. It has been replaced with the GetPubXmlDoc function.Chapter 1 PeopleCode Built-in Functions e. the above function would have a doc like "Create.50 PeopleBook: PeopleCode API Reference. The message header. This function has been deprecated and remains for backward compatibility only. All Rights Reserved. GetPubHeaderXmlDoc Syntax GetPubHeaderXmlDoc(PubID. 377 .sub_nodename) Description Note. PubNode. page 378." GetPubXmlDoc. This function is no longer available. &methodname)). If &CI = Null Then &CI = CreateCI(&ciName).

It should only be used when correcting or debugging a publication contract that is in error. Specify an integer representing which segment you want to access. MessageName. "PeopleCode Built-in Functions. SubNode [.50 PeopleBook: PeopleCode API Reference." GetMessage Parameters Parameter Description PubID PubNode ChannelName VersionName Segment Specify the PubID of the message. Segment]) Description Use the GetPubXmlDoc function to retrieve a message from the message queue. "PeopleCode Built-in Functions. This function should not be used in standard message processing." ReSubmitPubHeaderXmlDoc. See Also Enterprise PeopleTools 8. All Rights Reserved. which means that if you do not specify a segment. page 378 GetPubXmlDoc Syntax GetPubXmlDoc(PubID. The default value is one. Oracle and/or its affiliates. See Also Chapter 1. VersionName. "Message Classes. 378 Copyright © 1988.PeopleCode Built-in Functions Chapter 1 Note. . page 531 and Chapter 1. Returns A reference to an XmlDoc object if successful. Specify the version name of the message. Specify the channel name of the message. PubNode. ChannelName. the first segment is accessed." GetPubXmlDoc. Specify the Pub Node Name of the message. NULL if not successful. 2009.

This is the message after any transformations have been preformed. "PeopleCode Built-in Functions. which means that if you do not specify a segment. and returns NULL if not successful. This function is used for publication contract error correction when the error correction process needs to fetch a particular message instance for the publication contract in error.50 PeopleBook: PeopleCode API Reference." GetMessage Parameters Parameter Description PubID PubNode ChannelName VersionName MessageName SubNode Segment Specify the PubID of the message." ReSubmitPubHeaderXmlDoc." ReSubmitPubXmlDoc.Chapter 1 PeopleCode Built-in Functions Note. Use the IntBroker class GetMessage method instead. All Rights Reserved. Note. "PeopleCode Built-in Functions. Specify an integer representing which segment you want to access. Specify the subnode of the message. the first segment is accessed. NULL if not successful. See Also Chapter 1. Specify the Pub Node Name of the message. This function has been deprecated and remains for backward compatibility only. Specify the name of the message. The default value is one. This function should not be used in standard message processing. Specify the channel name of the message. page 531 Copyright © 1988. See Also Enterprise PeopleTools 8. Oracle and/or its affiliates. Specify the version name of the message. Returns A reference to an XmlDoc object if successful. SQL on the Publication Contract table is used to retrieve the key fields. 379 . "Message Classes. It should only be used when correcting or debugging a publication contract that is in error. 2009. page 532 and Chapter 1. It creates and loads a data tree for the specified message version.

All Rights Reserved." Using Charts GetRecord Syntax GetRecord([RECORD.50 PeopleBook: PeopleCode API Reference. 2009.FieldName]) Description Use the GetRatingBoxChart function to get a reference to an RatingBoxChart class object.PeopleCode Built-in Functions Chapter 1 GetRatingBoxChart Syntax GetRatingBoxChart([RecordName. Oracle and/or its affiliates. "Charting Classes. .50 PeopleBook: PeopleSoft Application Designer Developer's Guide.FieldName Specify the record and field associated with the chart you want to get.QE_CHART_FIELD). Example &rbRatingBoxChart = GetRatingBoxChart(QE_CHART_DUMREC." Using the RatingBoxChart Class Enterprise PeopleTools 8. You associate a record and field name with a chart page control in Application Designer. Parameters Parameter Description RecordName.50 PeopleBook: PeopleCode API Reference. "Charting Classes" Enterprise PeopleTools 8. Returns A reference to a RatingBoxChart object. "Using Page Controls. See Also Enterprise PeopleTools 8.recname]) 380 Copyright © 1988.

recname). If the code is running from a field on the EMPL_CHKLST_ITM record. that is. you cannot use this function in PeopleCode programs on events associated with high-level objects like pages (the Activate event) or components (component events). (the primary record) and CHKLST_ITM_TBL. This function is invalid for PeopleCode programs located in events that aren't associated with a specific row and record at the point of execution. or &REC = GetRow(). The following event uses the @ symbol to convert a record name that's been passed in as a string to a component name.recname must specify a record in the current row. That is. Returns GetRecord returns a record object.GetRecord(Record. Example In the following example. Oracle and/or its affiliates. this function returns a record object for the current context (the record containing the program that is running). &REC2 = GetRecord(RECORD. from the row containing the currently executing program. The following code: &REC = GetRecord(). /*returns primary record */ The following returns the other record in the current row. Note. RECORD. Parameters With no parameters. is equivalent to: &REC = GetRow().Chapter 1 PeopleCode Built-in Functions Description Use the GetRecord function to create a reference to a record object for the current context. the level 2 rowset (scroll) has two records: EMPL_CHKLST_ITM. 381 . If a parameter is given.CHKLST_ITM_TBL). 2009. the following returns a reference to that record: &REC = GetRecord(). All Rights Reserved. Copyright © 1988.recname.

page 154 Enterprise PeopleTools 8. End-If. even though the field is in the primary level-zero record. All Rights Reserved." CreateRecord. The field ctrl_field specifies the display control field.50 PeopleBook: PeopleCode Developer's Guide. "Field Class.PeopleCode Built-in Functions Chapter 1 Function set_sub_event_info(&REC As Record. You won't be able to reference this related display field directly. Adding a non-search-key level-zero field to the page would cause the Component Processor to load the entire row into the component buffer. you may occasionally want to make a level-zero display-only field a related display. See Enterprise PeopleTools 8. If all of a page's level-zero fields are search keys. &REC. "PeopleCode Built-in Functions. but controlled by different display control fields. "Referencing Data in the Component Buffer. "Accessing the Data Buffer" Enterprise PeopleTools 8. &NAME As string) &FLAGS = CreateRecord(RECORD. the Component Processor does not load the entire row of level-zero data into the component buffer. Oracle and/or its affiliates. &INFO = GetRecord(@("RECORD.CopyFieldsTo(&FLAGS).DR_LINE_FLG_SBR). In most cases. there are two instances where GetRelField can be useful: • • If there are two related display fields bound to the same record field." | &NAME)). and related_field specifies the name of the related display field whose value is to be retrieved.related_field) Description Use the GetRelField function to retrieve the value of a related display field and returns it as an unspecified (Any) data type. If All(&INFO) Then &FLAGS. use this function to specify which of the two related display fields you want. you could get the value of the field by referencing it directly. However.50 PeopleBook: PeopleCode Developer's Guide. but you can using GetRelField. it only loads the search keys." GetRelated.50 PeopleBook: PeopleCode API Reference. See Also Chapter 1." Understanding Current Context GetRelField Syntax GetRelField(ctrl_field. 382 Copyright © 1988.CopyFieldsTo(&INFO). . 2009. "Message Classes" Enterprise PeopleTools 8. Use the GetRelated field class method instead. This function remains for backward compatibility only. To prevent a large row of data from being loaded into the buffer. End-Function. Note.50 PeopleBook: PeopleCode API Reference.

"New Employee ID is already in use.50 PeopleBook: PeopleCode Developer's Guide. there are two related display fields in the page bound to PERSONAL_DATA. and that FieldChange is triggered by a change in the Related Edit field. End-If."). This may be a partial value that will subsequently be expanded to a complete value when the processing is complete. Using the GetRow function is equivalent to: &ROW = GetRowset(). PERSONAL_DATA. the other controlled by an editable DERIVED/WORK field in which the user can enter a new value. 65. One is controlled by the EMPLID field of the high-level key. you cannot use this function in PeopleCode programs on events associated with high-level objects like pages or components. Copyright © 1988. 383 . Please reenter. the functions return the value entered into the Related Edit. Oracle and/or its affiliates. That is. When this happens. that is the row containing the currently executing program.NAME) <> "" Then Error MsgGet(1000. For PeopleCode programs located in events that are not associated with a specific row at the point of execution. Note. "Accessing the Data Buffer" GetRow Syntax GetRow() Description Use the GetRow function to obtain a row object for the current context. there can be different behavior than with other types of fields: • • If the events are called from FieldEdit of the Control Field. and that FieldEdit is triggered by a change in the Related Edit field. this function is invalid. All Rights Reserved. 2009. If the events are called from FieldChange of the Control Field. /* Use a related display of a required non-default field to verify * that the new Employee Id is not already in use */ If GetRelField(EMPLID. See Also Enterprise PeopleTools 8. Use GetRelField to get the value of the related display controlled by EMPLID. the functions return the previous value.GetRow(CurrentRowNumber()). Example In the following example.NAME.Chapter 1 PeopleCode Built-in Functions Using GetRelField With a Control Field PeopleCode events on the Control Field can be triggered by the Related Edit field.

scrollname)." GetRowset. Oracle and/or its affiliates.50 PeopleBook: PeopleCode API Reference. or as part of a Message program) it references that data. the rowset is determined from the row containing the program that is running. 384 Copyright © 1988. "Row Class" Enterprise PeopleTools 8. If the program is not being run from a page (such as from Application Engine." Understanding Current Context GetRowset Syntax GetRowset([SCROLL.property or RECORD.scrollname. 2009. Returns GetRow returns a row object that references the current row in the component buffers.scrollname. Example Local Row &ROW. "Referencing Data in the Component Buffer. &ROW = GetRow(). . All Rights Reserved.PeopleCode Built-in Functions Chapter 1 Parameters None.50 PeopleBook: PeopleCode Developer's Guide.method(.scrollname]) Description Use the GetRowset function to get a rowset object based on the current context. That is. Syntax Format Considerations An expression of the form RECORD.) is converted to an object expression by using GetRowset(SCROLL. . page 384 Enterprise PeopleTools 8. "PeopleCode Built-in Functions. . See Also Chapter 1.

&RS2 = GetRowset(SCROLL. GetRowset returns a rowset object for the rowset containing the currently running program. Note. not a rowset object. Oracle and/or its affiliates. "PeopleCode Built-in Functions. &RS2.50 PeopleBook: PeopleCode Developer's Guide. and RS2 is a child rowset of RS1. If a parameter is specified. "Referencing Data in the Component Buffer. For example: Copyright © 1988. Example In the following example. it must be the name of the primary record for the scroll that is a child of the current context. 385 .Chapter 1 PeopleCode Built-in Functions Parameters If a parameter is specified. scrollname must be the name of the primary record for the scroll." Understanding Current Context GetRowsetCache Syntax GetRowsetCache([Rowset. Local Rowset &RS1. &RS1 = GetRowset(). it returns a rowset for that child scroll. All Rights Reserved." GetLevel0. page 353 Enterprise PeopleTools 8. Every time you use the GetRowsetCache function. See Also Chapter 1.50 PeopleBook: PeopleCode API Reference. This function returns a RowsetCache object. [language]) Description Use GetRowsetCache to return the existing rowset cache with the given name.]name. 2009.EMPL_CHKLST_ITM). You must use the Get RowsetCache method in order to convert a RowsetCache object into a rowset object. RS1 is a level 1 rowset. "Rowset Class" Enterprise PeopleTools 8. Returns With no parameters. you should verify that the function executed successfully by testing for a null object.

If it doesn't exist then return failure. If the rowset cache for the sign-on language doesn't exist then fetch the base language rowset cache. %RowsetCache_BaseLang – Fetch the rowset cache for the base language only.50 PeopleBook: PeopleCode API Reference. Parameters Parameter Description Record. "RowsetCache Class" 386 Copyright © 1988. %RowsetCache_SignonOrBaseLang – Fetch the rowset cache for the sign-on language. you must enclose the name in quotation marks. 2009. "PeopleCode Built-in Functions. Specify which language the rowset cache is retrieved from. If you just specify name. If the base language rowset cache doesn't exist then return failure.PeopleCode Built-in Functions Chapter 1 Local RowsetCache &RSC. This parameter is optional. page 158 Enterprise PeopleTools 8. Possible values are: %RowsetCache_SignonLang – Fetch the rowset cache for the sign-on language. Oracle and/or its affiliates. The default is %RowsetCache_SignonLang language Returns A RowsetCache object populated with the rowset cache instance specified. . If All(&RSC) Then /* do processing */ Else /* call to populate rowset cache */ End-if.MyRowset).name Specify the name of a RowsetCache. All Rights Reserved. Example &Cache1 = GetRowsetCache("AAROWSET1"). See Also Chapter 1." CreateRowsetCache. If it doesn't exist then return failure. &RSC = GetRowsetCache(Rowset.

If you are connecting to the existing session and not doing additional error checking. you may want to use the %Session system variable instead of GetSession. Oracle and/or its affiliates.recordname) Description Use the GetSelectedTreeNode function to determine what node the user has selected in a dynamic tree control. you can instantiate many other types of objects. Use the GenerateTree function or Tree Viewer." GenerateTree. 2009. and so on. "PeopleCode Built-in Functions. data trees. like Component Interfaces. %Session returns a connection to the existing session. Returns A PeopleSoft session object. See Also Chapter 1.Chapter 1 PeopleCode Built-in Functions GetSelectedTreeNode Syntax GetSelectedTreeNode(RECORD. All Rights Reserved. After you use GetSession you must connect to the system using the Connect property. After you use GetSession. Parameters None. Dynamic tree controls have been deprecated." page 807 GetSession Syntax GetSession() Description Use the GetSession function to retrieve a PeopleSoft session object. page 317 Appendix A. Copyright © 1988. 387 . "Viewing Trees From Application Pages. Note.

&MYSESSION = GetSession(). "Query Classes" Enterprise PeopleTools 8.50 PeopleBook: PeopleCode API Reference. a set control value.50 PeopleBook: PeopleCode API Reference. 2009. See Also Enterprise PeopleTools 8. "Search Classes" Enterprise PeopleTools 8. This function does not validate the parameters passed to it. you must pass an empty string in the text_recname parameter. In practice. Conversely. if you want to pass a tree name. "Tree Classes" Chapter 3. you must pass an empty string in the treename parameter. 388 Copyright © 1988. set_ctrl_fieldvalue. and one of the following: • • The name of a control table (or view) belonging to a record group in the TableSet Control controlled by the set control value.50 PeopleBook: PeopleCode API Reference. Oracle and/or its affiliates. It is up to your application to ensure that only valid data is used. "System Variables. recname | text_recname}. If an invalid value is used. "Component Interface Classes" Enterprise PeopleTools 8. "PortalRegistry Classes" Enterprise PeopleTools 8. treename) Description Use the GetSetId function to return a string containing a setID based on a set control field (usually BUSINESS_UNIT). The name of a tree in the TableSet Control controlled by the set control value. the defined default value is used.50 PeopleBook: PeopleCode API Reference.PeopleCode Built-in Functions Chapter 1 Example Local ApiObject &MYSESSION.50 PeopleBook: PeopleCode API Reference. Note. If you want to pass a control record name to the function." %Session. All Rights Reserved. "Session Class" Enterprise PeopleTools 8. page 788 GetSetId Syntax GetSetId({FIELD.50 PeopleBook: PeopleCode API Reference.fieldname | text_fieldname}. {RECORD. . tree names are rarely used in this function.

389 . Specify as a string the name of the control record belonging to the record group for which you want to obtain the setID corresponding to the set control field value. Oracle and/or its affiliates. and PAY_TRMS_TBL is a control table belonging to a record group controlled by the current value of BUSINESS_UNIT. Specify as a RECORD reference the name of the control record belonging to the record group for which you want to obtain the setID corresponding to the set control value. Use this parameter or the fieldname parameter. Specify as a string the name of the tree for which you want to obtain the setID corresponding to the set control field value. Specify the value of the set control field as a string. Use this parameter or the recname parameter. &SETID = GetSetId(FIELD.PAY_TRMS_TBL. and TableSets. See Also Enterprise PeopleTools 8.BUSINESS_UNIT. Use this parameter (recommended) or the text_fieldname parameter. ""). text_fieldname set_ctrl_fieldvalue recname text_recname treename Returns GetSetId returns a five-character setID string. RECORD. "Planning Records. Specify the name of the set control field as a string. All Rights Reserved. Control Tables." Control Tables GetSQL Syntax GetSQL(SQL. BUSINESS_UNIT is the Set Control Field. paramlist]) Where paramlist is an arbitrary-length list of values in the form: Copyright © 1988. The function returns the setID for the record group. Use this parameter (recommended) or the text_recname parameter. Example In this example.50 PeopleBook: PeopleSoft Application Designer Developer's Guide.sqlname [. &SET_CTRL_VAL. 2009.Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description fieldname Specify the set control field name as a FIELD reference.

sqlname paramlist Specify the name of a SQL definition.INSERT_TEST. Description Use the GetSQL function to instantiate a SQL object and associates it with the SQL definition specified by sqlname. . %DateTimeIn(:3).PeopleCode Built-in Functions Chapter 1 inval1 [. You can execute the insert by: GetSQL(SQL. %TextIn(:4). Because the Array of Any promotes to absorb any remaining select columns.. TESTF3.. 1. However.N). Oracle and/or its affiliates.TESTN) VALUES (:1. at runtime) generated the following SQL statement: "INSERT INTO PS_TESTREC (TESTF1. . inval2] . For example. . 2009. . it must be the only bind parameter. as it is expected to supply all the bind values needed. All Rights Reserved. :⇒ 2. suppose you had a SQL definition INSERT_TEST. . This is primarily used when you do not know the number of values being supplied until the code runs. For binding. that had PeopleCode that dynamically (that is. Suppose you have placed the values to be inserted into an Array of Any.N)". Processing of the SQL definition is the same as for a SQL statement created by the CreateSQL function. Parameters Parameter Description SQL. The SQL definition must already exist. TESTF4. Returns A SQL object. . Using Arrays With paramlist You can use a parameter of type "Array of Any" in place of a list of bind values. . either created using Application Designer or the StoreSQL function. it does set fields that aren't part of the Component Processor data buffers to NULL. Setting Data Fields to Null This function does not set Component Processor data buffer fields to NULL after a row not found fetching error. say &AAny: &AAny = CreateArrayAny("a". 390 Copyright © 1988. "abcdefg". . Specify input values for the SQL string. TESTF2. %DateTime. . it must be the last parameter for the SQL object Fetch method or (for results) SQLExec. &AAny).

23. "PeopleCode Built-in Functions." Open Copyright © 1988. Local date &EFFDT. 391 ." DeleteSQL. End-If.A. It binds the given input values. page 614 Enterprise PeopleTools 8. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. End-If. If the SQL.SETID = :1 AND A. this SQL definition won't have to change: SELECT %List(FIELD_LIST.ABCD_XY.FTP_⇒ TEMPLATE_SELECT). Local SQL &SQL." SQLExec. 2009.Status = 0 Then If &SQL. &TEMPLATE. &TITLE.Close(). The SQL definition FTP_TEMPLATE_SELECT has the following code. Oracle and/or its affiliates. &SQL. Function FTP_GET_TEMPLATE(&REC As Record) Returns Boolean . Return False. &EFFDT = EFFDT.Chapter 1 PeopleCode Built-in Functions Example The following code creates and opens an SQL object on the SQL definition stored as ABCD_XY (for the current market. &EMPLID). "SQL Object Not Found in SQL". SQL. Chapter 1.50 PeopleBook: PeopleCode API Reference. &TEMPLATE = FTP_RULE_TEMPLATE. "PeopleCode Built-in Functions. Local string &SETID. End-Function. All Rights Reserved.Close().:3) AND A. &SETID = SETID. "SQL Class" Enterprise PeopleTools 8. If &SQL. The following is a generic function that can be called from multiple places to retrieve a specific record using the SQL Objects. page 201. page 160. "SQL Error").50 PeopleBook: PeopleCode API Reference. &SETID. ABSENCE_HIST.FTP_RULE_TEMPLATE = :2 AND %EFFDTCHECK(FTP_DEFAULT_TBL A1. "SQL Class. 10640.FTP_DEFAULT_TBL A) FROM PS_FTP_TEMPLATE_TBL A WHERE A. page 260 and Chapter 1. this should be followed by a series of Fetch method calls.EFF_STATUS = 'A' See Also Chapter 1." FetchSQL. &SQL = GetSQL(SQL.FTP_TEMPLATE_SELECT. MessageBox(64. Return True. &TEMPLATE. and executes the statement. &EFFDT). Chapter 1." CreateSQL. This makes the code easier to maintain: if there are any changes to the underlying record structure. Note that it uses the %List and %EFFDTCHECK meta-SQL statements.Fetch(&REC) Then &SQL. 24. &SQL = GetSQL(SQL. Else &TITLE = MsgGet(10640.ABCD is a SELECT. database type and as of date).

. [recordname. The recordname prefix is required if the call to GetStoredFormat is not on the record definition recordname. To return the format for a field on level zero of the page. target_recname To prevent ambiguous references. pass 1 in target_row.]fieldname Returns Returns a String equal to the name of the stored custom format for the field. Use the StoredFormat field class property instead. Oracle and/or its affiliates. [RECORD.50 PeopleBook: PeopleCode Developer's Guide. An integer specifying the row of the target field. The field can be on any level of the active page. This function remains for backward compatibility only. See Also Enterprise PeopleTools 8. 2009.target_row.PeopleCode Built-in Functions Chapter 1 GetStoredFormat Syntax GetStoredFormat(scrollpath. [recordname. where scrollname is the same as the scroll level's primary record name." StoredFormat Enterprise PeopleTools 8. 392 Copyright © 1988. "Accessing the Data Buffer" Parameters Parameter Description scrollpath target_row A construction that specifies a scroll level in the component buffer. Note.50 PeopleBook: PeopleCode API Reference. If you are testing a field on level zero.level2_row. The name of the field from which to get the stored format name. ]] RECORD.scrollname. Description Use the GetStoredFormat function to return the name of a field's custom stored format.level1_row.level1_recname.]fieldname) where scrollpath is: [RECORD. "Field Class. you can also use SCROLL. pass 1 in this parameter. All Rights Reserved.level2_recname.

"PeopleCode Built-in Functions.pub_nodename. End-Function.Chapter 1 PeopleCode Built-in Functions Example This example returns a string containing the custom format for postal codes on level zero of the page or on the current row of scroll level one.50 PeopleBook: PeopleCode Developer's Guide. Oracle and/or its affiliates. CurrentRowNumber(1)). page 583 Enterprise PeopleTools 8. MessageName[. It has been replaced with the GetSubXmlDoc function. Segment]) Description Use the GetSubXmlDoc function to retrieve a message from the message queue. ChannelName.channelname. End-Evaluate. Copyright © 1988. All Rights Reserved. VersionName." SetDisplayFormat. "PeopleCode Built-in Functions.messagename. See Also Chapter 1. 393 . Evaluate &CURR_LEVEL When = 0 &FORMAT = GetStoredFormat(POSTAL. 1). Return (&FORMAT). so no looping is necessary. 2009.sub_name) Description Note. This function is no longer available. page 393. GetSubXmlDoc Syntax GetSubXmlDoc(PubID." Specifying Data with References Using Scroll Path Syntax and Dot Notation GetSubContractInstance Syntax GetSubContractInstance(pub_id. This function is called in the RowInit event. Function get_postal_format() Returns string &CURR_LEVEL = CurrentLevelNumber(). PubNode. When = 1 &FORMAT = GetStoredFormat(POSTAL. "Referencing Data in the Component Buffer. See Chapter 1." GetSubXmlDoc.

Returns A reference to an XmlDoc object if successful. which means that if you do not specify a segment. Specify an integer representing which segment you want to access. the first segment is accessed.50 PeopleBook: PeopleCode API Reference. when the error correction process needs to fetch a particular message instance for the subscription contract in error. The default value is one. . "PeopleCode Built-in Functions.PeopleCode Built-in Functions Chapter 1 Note. See Also Chapter 1. This function is used for subscription contract error correction. This function should not be used in standard message processing. Use the IntBroker class GetMessage method instead. Specify the Pub Node Name of the message. It should only be used when correcting or debugging a subscription contract that is in error. 2009. Oracle and/or its affiliates. See Also Enterprise PeopleTools 8. and returns NULL if not successful. It creates and loads a data tree for the specified message version. All Rights Reserved." GetMessage Parameters Parameter Description PubID PubNode ChannelName VersionName MessageName Segment Specify the PubID of the message. SQL on the Subscription Contract table is used to retrieve the key fields. Specify the version name of the message." ReSubmitSubXmlDoc. This function has been deprecated and remains for backward compatibility only. "Message Classes. Note. Specify the name of the message. NULL if not successful. page 533 394 Copyright © 1988. Specify the channel name of the message.

Specify the type of log data you want to obtain.pubnode.50 PeopleBook: PeopleCode API Reference. as a number. This function has been deprecated and remains for backward compatibility only. Specify the message definition name that you want to retrieve log data from as a string. Values are: 1: the original request 2: the transformed request 3: the original response 4: the transformed response pubnode chnlname msg_name Log_type message_version Specify the message version name as a string. 395 . Copyright © 1988. This function is used in the PeopleCode for the Message Monitor. Specify the name of the node that the synchronous message was published from as a string. message_version]) Description Use the GetSyncLogData to return a log containing information about the specified synchronous message. Oracle and/or its affiliates. See Also Enterprise PeopleTools 8. Note. This property is populated after the message is sent. 2009.chnlname.Chapter 1 PeopleCode Built-in Functions GetSyncLogData Syntax GetSyncLogData(GUID.msg_name. You can use this information for debugging. you can obtain the request and response data in a synchronous request. All Rights Reserved. Using this function. "Message Classes. Use the IntBroker class GetSyncLogData method instead. both pre.logtype [.and post-transformation." GetSyncLogData Parameters Parameter Description GUID Specify the GUID for the published synchronous message as a string. Specify the name of the channel the synchronous message was published to as a string.

All Rights Reserved.. &pubnode. &descrlong = GetSyncLogData(&guid. &msg_name. GetTreeNodeParent Syntax GetTreeNodeParent(node) Description Use the GetTreeNodeParent function to access data from dynamic tree controls. &log_type). Use the GenerateTree function or Tree Viewer. "PeopleCode Built-in Functions. Dynamic tree controls have been deprecated. &msg_name. 2009. Use the GenerateTree function or Tree Viewer. Dynamic tree controls have been deprecated. Oracle and/or its affiliates." page 807 GetTreeNodeRecordName Syntax GetTreeNodeRecordName(node) Description Use the GetTreeNodeRecordName function in accessing data from dynamic tree controls. &pubnode. See Also Chapter 1. "Viewing Trees From Application Pages. 396 Copyright © 1988.PeopleCode Built-in Functions Chapter 1 Returns An XML string containing the log data. &channel. page 317 Appendix A." GenerateTree. Local Number &log_type. . Note. . Note. &channel. .. Example Local String &guid.

"Viewing Trees From Application Pages." page 807 GetTreeNodeValue Syntax GetTreeNodeValue(node. and the user is not calling GetURL from a batch program. [recordname. "PeopleCode Built-in Functions. "Viewing Trees From Application Pages. the base language version of the URL is returned." GenerateTree. All Rights Reserved. page 317 Appendix A. Copyright © 1988." GenerateTree. it is returned.Chapter 1 PeopleCode Built-in Functions See Also Chapter 1. page 317 Appendix A. Dynamic tree controls have been deprecated. For example. Otherwise.]fieldname) Description Use the GetTreeNodeValue function in accessing data from dynamic tree controls. If the URL identifier contains spaces. 397 . you must use quotation marks around URLIdentifier." page 807 GetURL Syntax GetURL(URL. for the specified URLIdentifier. Use the GenerateTree function or Tree Viewer. "PeopleCode Built-in Functions. 2009. Note.URLIdentifier) Description Use the GetURL function to return the URL. Note. The URLIdentifier must exist and been created using URL Maintenance. as a string. If a language-specific URL exists for the user's current session language. GetURL(URL. See Also Chapter 1."My URL"). Oracle and/or its affiliates.

"Using PeopleTools Utilities. See Also Chapter 1.RequestURI | "?" | GetURL(URL. Oracle and/or its affiliates.FieldFormula.QE_PHONELIST.iScript_Call You could combine this in the following code to produce an HTML string used as part of a response: &output = GetHTMLText(HTML. "PeopleCode Built-in Functions. Example Suppose you have a URL with the identifier PEOPLESOFT.PEOPLESOFT). The language code does not come from the language that the user specified when logging into the system. page 690 Enterprise PeopleTools 8.peoplesoft. and the following URL: http://www. .PeopleCode Built-in Functions Chapter 1 When GetURL is called from an application engine program. Parameters Parameter Description URLIdentifier Specify a URL Identifier for a URL that already exists and was created using the URL Maintenance page. All Rights Reserved. %Request." URL Maintenance 398 Copyright © 1988.QE_CALL)).com Suppose you have the following URL stored in the URL Maintenance. with the name QE_CALL: /S/WEBLIB_QE_MCD. using the user's language preference. the URL is retrieved either from the base URL table or the related language table depending on the language code. The language code is provided by the User Profile for the user that executed the application engine program. &PS_URL has the following value: http://www. 2009.QE_MCD_MAIN.com From the following code example &PS_URL = GetURL(URL.50 PeopleBook: System and Server Administration. Returns A string containing the URL value for that URL Identifier.peoplesoft." ViewURL.

"TZONE"). &MyValue = GetUserOption("PPLT". Specify the option as a string.50 PeopleBook: Security Administration. "Managing PeopleSoft Personalizations" GetWLFieldValue Syntax GetWLFieldValue(fieldname) Copyright © 1988. Example Local Any &MyValue. Parameters Parameter Description Level OPTN Specify the option category level as a string. All Rights Reserved. 399 . Oracle and/or its affiliates. Returns The default value for the specified option. See Also Chapter 1.Chapter 1 PeopleCode Built-in Functions GetUserOption Syntax GetUserOption(Level. 2009. "PeopleCode Built-in Functions." SetUserOption.OPTN) Description Use the GetUserOption function to return the default value for the specified option. page 608 Enterprise PeopleTools 8.

"PeopleCode Built-in Functions. BUSINESS_UNIT = GetWLFieldValue(&TEMP_NAME). &TEMP_NAME = "DEMAND_STATUS". DEMAND_STATUS = GetWLFieldValue(&TEMP_NAME). once declared in any PeopleCode program.PeopleCode Built-in Functions Chapter 1 Description When the user has opened a page from a Worklist (by selecting one of the work items) use the GetWLFieldValue function to retrieve the value of a field from the current row of the application Worklist record. page 452 and Chapter 1. &TEMP_NAME = "SCHED_Date". populates page fields with values from the Worklist record. ORDER_NO = GetWLFieldValue(&TEMP_NAME). Returns Returns the value of a specified field in the Worklist record as an Any data type. page 793 Global Syntax Globaldata_type &var_name Description Use the Global statement to declare PeopleCode global variables. You can use the %WLName system variable to check whether the page was accessed from a Worklist. See Also Chapter 1. The variable must be declared with the Global statement in any PeopleCode program in which it is used. The %WLName system variable is used to determine whether there is a currently active Worklist (that is. Example This example. End-If. Oracle and/or its affiliates. remains in scope throughout the PeopleSoft session." TriggerBusinessEvent. SCHED_Date = &SCHED_Date. "System Variables. whether the user accessed the page using a Worklist). A global variable. &SCHED_Date = GetWLFieldValue(&TEMP_NAME). 2009. 400 Copyright © 1988. from RowInit PeopleCode." MarkWLItemWorked. . &WL = %WLName." %WLName. page 665 Chapter 3. If &WL > " " Then &TEMP_NAME = "ORDER_NO". All Rights Reserved. "PeopleCode Built-in Functions. &TEMP_NAME = "BUSINESS_UNIT".

Oracle and/or its affiliates.target_row.level1_recname.level2_recname. you can also use SCROLL. "PeopleCode Built-in Functions.]fieldname) where scrollpath is: [RECORD.Chapter 1 PeopleCode Built-in Functions Declarations tend to appear at the beginning of the program. [recordname. page 103 Enterprise PeopleTools 8. [RECORD. &AE_APPL_ID = AE_APPL_ID. A legal variable name. "PeopleCode Built-in Functions. "Understanding the PeopleCode Language. See Also Chapter 1. target_recname To prevent ambiguous references.level1_row. ApiObject data types can only be declared as Local. Not all PeopleCode data types can be declared as Global. 2009. you can use the following syntax: Gray(Fieldname) The more complex syntax can be used to loop through a scroll on a lower level than the PeopleCode program. where scrollname is the same as the scroll level's primary record name." Data Types Gray Syntax Gray(scrollpath. 401 ." Local.50 PeopleBook: PeopleCode Developer's Guide. If you put the function on the same scroll level as the field being changed. Example The following example declares a global variable and then assigns it the value of a field: global string &AE_APPL_ID. intermixed with function declarations. page 446 and Chapter 1.level2_row. All Rights Reserved.scrollname. Copyright © 1988. ]] RECORD. Parameters Parameter Description data_type &var_name Specify a PeopleCode data type. For example." Component.

preventing the user from making changes to the field. which would typically be found in the RowInit event. "Referencing Data in the Component Buffer. The name of the field to gray. while Hide makes it invisible." Enabled Enterprise PeopleTools 8. will not make it editable.50 PeopleBook: PeopleCode Developer's Guide. See Also Enterprise PeopleTools 8. "Accessing the Data Buffer" Enterprise PeopleTools 8. 402 Copyright © 1988. 2009. If you specify a field as Display Only in Application Designer. using the PeopleCode functions Gray.]fieldname Returns Optionally returns a Boolean value indicating whether the function succeeded.50 PeopleBook: PeopleCode API Reference. . This function remains for backward compatibility only.50 PeopleBook: PeopleCode Developer's Guide. Oracle and/or its affiliates. You can undo these effects using the built-in functions Ungray and Unhide. followed by Ungray. [recordname. The recordname prefix is required if the call to Gray is not on the record definition recordname. This function shouldn't be used in any event prior to RowInit. An integer specifying the row on the target scroll level where the referenced buffer field is located. or three of the active page. Note. disables the page's address fields if the value of the SAME_ADDRESS_EMPL field is "Y". Note. The field can be on scroll level one. Use the Enabled field class property instead. Gray makes a field display-only." Specifying Data with References Using Scroll Path Syntax and Dot Notation Parameters Parameter Description scrollpath target_row A construction that specifies a scroll level in the component buffer. All Rights Reserved.PeopleCode Built-in Functions Chapter 1 Description Use the Gray function to make a field unavailable for entry a page field. "Field Class. two. Example This example.

hash output should not be used as a unique key to a table of data. 403 . page 669 and Chapter 1. Gray(STATE). Chapter 1. "PeopleCode Built-in Functions. page 214 Hash Syntax Hash(ClearTextString) Description The Hash function returns a fixed length value." Unhide. See Also Chapter 1. All Rights Reserved." Hide.ITEMNAME. Because of this. Gray(COUNTRY). See Also Chapter 1. End-if. Given the output of hash. Regardless of the operating system platform.Chapter 1 PeopleCode Built-in Functions If SAME_ADDRESS_EMPL = "Y" Then Gray(STREET1). "PeopleCode Built-in Functions. New applications should use DisableMenuItem instead. Gray(ZIP). page 405. underlying character encoding or hardware byte order. Gray(STREET2). Oracle and/or its affiliates. The output is always 28 characters. "PeopleCode Built-in Functions. Gray(HOME_PHONE). based on the input. with no maximum size. it is impossible to determine the input. 2009. identical character strings always generate identical hash values regardless of the platform on which the hash generation is run." DisableMenuItem. Copyright © 1988. page 671 GrayMenuItem Syntax GrayMenuItem(BARNAME. The GrayMenuItem function is supported for compatibility with previous releases of PeopleTools." Ungray.menuitem_name) Description Note.menubar_name. Gray(CITY). The input is variable length. "PeopleCode Built-in Functions.

. even if you know the algorithm.OPERPSWD.Value.PeopleCode Built-in Functions Chapter 1 Some of the original data is deliberately lost during the conversion process. Example MessageBox("Please confirm password"). &HASHPW = Hash(&PASSWD). See Also Chapter 1. "PeopleCode Built-in Functions. Returns A hash string. All Rights Reserved. page 232 HermiteCubic Syntax HermiteCubic(DataPoints) Description Use the HermiteCubic function to compute a set of interpolating equations for a set of at least three datapoints. to compare hashed values to ensure they match. This particular Hermitian cubic is designed to mimic a hand-drawn curve. you can't "un-hash" the data. 2009." Encrypt." Decrypt. Generally the Hash function is used like a checksum. 404 Copyright © 1988. "PeopleCode Built-in Functions. Parameters Parameter Description ClearTextString Specify the string you want converted. &OPERPSWD = USERDEFN. If not (&HASHPW = &OPERPSWD) Then /* do error handling */ End-if. This way. Oracle and/or its affiliates. page 189 and Chapter 1.

b is the coefficient of the x1 term. All Rights Reserved. Hide.Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description DataPoints This parameter takes an array of array of number. The elements in the array correspond to the elements in the array used for DataPoints. target_recname To prevent ambiguous references.b. This reduces the complexity of the function's syntax to: Copyright © 1988. page 445 Hide Syntax Hide(scrollpath. The last four are the four coefficients to be returned from the function: a.level2_recname. page 163 and Chapter 1. a is the coefficient of the x0 term. You can display the field again using Unhide.level1_recname. you can also use SCROLL. Description Use the Hide function to make a page field invisible. and in FieldChange programs that change field display based on changes the user makes to a field. Returns A modified array of array of numbers. Generally.]fieldname) where scrollpath is: [RECORD.target_row. Oracle and/or its affiliates. where scrollname is the same as the scroll level's primary record name. but Unhide has no effect on a field that has been made displayonly in the page definition." LinearInterp. and d is the coefficient of the x3 term. c is the coefficient of the x2 term.level2_row. ]] RECORD. "PeopleCode Built-in Functions. This function remains for backward compatibility only. "PeopleCode Built-in Functions. Use the Visible field class property instead. Ungray. 2009. See Also Chapter 1. The first two of these six numbers are the x and y points to be fit. 405 . Note. The array's contents are an array of six numbers. [RECORD. and Unhide usually appear in RowInit programs that set up the initial display of data. Gray. [recordname.scrollname." CubicSpline.c and d. you put the functions on the same scroll level as the field that is being changed.level1_row.

"Field Class. Hide(HOME_PHONE)." Unhide. An integer specifying the row on the target scroll level where the referenced buffer field is located. Hide(CITY). Hide(STATE). "PeopleCode Built-in Functions. 2009. Chapter 1. This function shouldn't be used in any event prior to RowInit. two." Visible Enterprise PeopleTools 8. "Accessing the Data Buffer" Enterprise PeopleTools 8. Example This example hides the page's address fields if SAME_ADDRESS_EMPL is equal to "Y": If SAME_ADDRESS_EMPL = "Y" Then Hide(STREET1). page 401." Gray. or three of the active page. Hide(COUNTRY). Hide(STREET2). Oracle and/or its affiliates. See Also Enterprise PeopleTools 8. "PeopleCode Built-in Functions." Ungray. Hide returns a Boolean value indicating whether it executed successfully.50 PeopleBook: PeopleCode API Reference. page 671 406 Copyright © 1988. End-if. The recordname prefix is required if the call to Hide is not on the record definition recordname [recordname. . "Referencing Data in the Component Buffer." Specifying Data with References Using Scroll Path Syntax and Dot Notation Parameters Parameter Description scrollpath target_row A construction that specifies a scroll level in the component buffer. The name of the field to hide.50 PeopleBook: PeopleCode Developer's Guide. All Rights Reserved. Note.PeopleCode Built-in Functions Chapter 1 Hide(fieldname) The more complex syntax can be used to loop through a scroll on a lower level than the PeopleCode program. The field can be on scroll level one.]fieldname Returns Boolean (optional). page 669 and Chapter 1. "PeopleCode Built-in Functions. See Also Chapter 1.50 PeopleBook: PeopleCode Developer's Guide.

Oracle and/or its affiliates.menuitem_name) Description Use the HideMenuItem function to hide a specified menu item. Name of the menu item.) When a menu is first displayed. To apply this function to a pop-up menu. or.Chapter 1 PeopleCode Built-in Functions HideMenuItem Syntax HideMenuItem(BARNAME.DO_JOB_TRANSFER). the name of the pop-up menu that owns the menuitem. Parameters Parameter Description menubar_name Name of the menu bar that owns the menuitem. 407 .menubar_name. in the case of pop-up menus. use the PrePopup Event of the field with which the pop-up menu is associated. the first field listed in the Order view of the page in Application Designer. Example HideMenuItem(BARNAME.ITEMNAME. Restrictions on Use With a Component Interface This function is ignored (has no effect) when used by a PeopleCode program that's been called by a Component Interface. Copyright © 1988. all menus are visible by default. so there is no need for a function to redisplay a menuitem that has been hidden. If you're using this function with a pop-up menu associated with a page (not a field). the earliest event you can use is the PrePopup event for the first "real" field on the page (that is. ITEMNAME.MYPOPUP1. All Rights Reserved. 2009. menuitem_name Returns None.

it is not moved back to its original position. "Row Class. or deleting rows.50 PeopleBook: PeopleCode Developer's Guide. where scrollname is the same as the scroll level's primary record name. page 227 Enterprise PeopleTools 8. It hides the specified row and any associated rows at lower scroll levels. When you hide a row. updating changed values. "PeopleCode Builtin Functions. "PeopleCode Built-in Functions.50 PeopleBook: PeopleCode Developer's Guide. and the other rows are renumbered accordingly. Use the Visible row class property instead.50 PeopleBook: PeopleCode Developer's Guide. Note. If you later use UnHideRow to make the row visible again.PeopleCode Built-in Functions Chapter 1 See Also Chapter 1." EnableMenuItem. "Accessing the Data Buffer" Enterprise PeopleTools 8. Place the PeopleCode in a higher scroll level record. target_recname To prevent ambiguous references. "PeopleCode and the Component Processor. ]] RECORD. When HideRow is used in a loop. This function remains for backward compatibility only. See Also Enterprise PeopleTools 8. target_row]) Where scrollpath is: [RECORD. it becomes the last row in the scroll or grid. but remains in its new position." DisableMenuItem.scrollname. it does not affect database processing such as inserting new rows. Description Use the HideRow function to hide a row occurrence programmatically. Oracle and/or its affiliates." PrePopup Event HideRow Syntax HideRow(scrollpath)[. . Hiding a row just makes the row invisible." Specifying Data with References Using Scroll Path Syntax and Dot Notation 408 Copyright © 1988.level1_row.level1_recname.level2_row. you have to process rows from the highest number to the lowest to achieve the correct results. Note. you can also use SCROLL. "Referencing Data in the Component Buffer. or from a lower scroll level. 2009. All Rights Reserved. page 214 and Chapter 1." Visible Enterprise PeopleTools 8. [RECORD.50 PeopleBook: PeopleCode API Reference. HideRow cannot be executed from the same scroll level as the row that is being hidden.level2_recname.

level1_row. For &ROW = ActiveRowCount(RECORD. End-for. you can also use SCROLL. Else /* WinMessage("not hiding row " | &ROW). Copyright © 1988. where scrollname is the same as the scroll level's primary record name. Note that the loop has to count backwards from ActiveRowCount to 1. An integer specifying which row in the scroll to hide. Example This example hides all rows in scroll level 1 where the EXPORT_SW field is equal to "Y".level1_recname. &ROW). "PeopleCode Built-in Functions.EXPORT_OBJECT) to 1 step . All Rights Reserved.*/ End-if. See Also Chapter 1. ]] RECORD. HideRow returns a Boolean value indicating whether the function executed successfully.EXPORT_SW." UnhideRow. &ROW).Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description scrollpath target_row A construction that specifies a scroll level in the component buffer.EXPORT_OBJECT.scrollname. "PeopleCode Built-in Functions. Returns Boolean (optional). If this parameter is omitted. 409 . page 673 and Chapter 1." DeleteRow. If &EXPORT_SW "Y" Then HideRow(RECORD.1 &EXPORT_SW = FetchValue(EXPORT_OBJECT. 2009. page 199 HideScroll Syntax HideScroll(scrollpath) Where scrollpath is: [RECORD.level2_row. [RECORD. target_recname To prevent ambiguous references. Oracle and/or its affiliates. the row on which the PeopleCode program is executing is assumed.level2_recname.

from RowInit PeopleCode.APPR_RULE Then If APPR_AMT_SW = "N" Then HideScroll(RECORD. CurrentRowNumber(1). 2009. Oracle and/or its affiliates. Typically this function is used in RowInit and FieldChange PeopleCode to modify the page based on user action. End-If. . Else UnhideScroll(RECORD.PeopleCode Built-in Functions Chapter 1 Description Use the HideScroll function to programmatically hide a scroll bar and all data items within the scroll.APPR_RULE_AMT). "Rowset Class. Returns HideScroll returns a Boolean value indicating whether the function executed successfully." HideAllRows Enterprise PeopleTools 8.APPR_RULE_⇒ DETL. Use the HideAllRows rowset class method instead. All Rights Reserved. RECORD. Example This example. "Referencing Data in the Component Buffer. RECORD. "Accessing the Data Buffer" Enterprise PeopleTools 8. See Also Enterprise PeopleTools 8.⇒ CurrentRowNumber(2). End-If.50 PeopleBook: PeopleCode Developer's Guide.APPR_RULE_DETL." Specifying Data with References Using Scroll Path Syntax and Dot Notation Parameters Parameter Description scrollpath A construction that specifies a scroll level in the component buffer. CurrentRowNumber(1). RECORD. The corresponding FieldChange PeopleCode dynamically changes the appearance of the page based on user changes to the APPR_AMT_SW field: 410 Copyright © 1988.50 PeopleBook: PeopleCode API Reference. initializes the visibility of the scroll based on a field setting: If %Component = COMPONENT.50 PeopleBook: PeopleCode Developer's Guide. CurrentRowNumber(2).APPR_RULE_LN. This function remains for backward compatibility only. Note. RECORD.APPR_RULE_AMT).APPR_RULE_LN.

APPR_RULE_DETL. RECORD. See Also Chapter 1. page 674 HistVolatility Syntax HistVolatility(Closing_Prices. &AMT_ROWS = ActiveRowCount(RECORD." HideRow. End-If. The number of trading days in a year.Trading_Days) Description Use the HistVolatility function to compute the historical volatility of a market-traded instrument.APPR_RULE_DETL. RECORD.APPR_RULE_LN. &AMT_LOOP). RECORD.⇒ CurrentRowNumber(2).⇒ CurrentRowNumber(2). Else UnhideScroll(RECORD. CurrentRowNumber(1). "PeopleCode Built-in Functions.APPR_RULE_LN.Chapter 1 PeopleCode Built-in Functions If APPR_AMT_SW = "N" Then HideScroll(RECORD.APPR_RULE_AMT).⇒ CurrentRowNumber(2).APPR_RULE_AMT).APPR_RULEs_LN. "PeopleCode Built-in Functions. CurrentRowNumber(1). CurrentRowNumber(2).APPR_RULE_AMT. 411 . RECORD. See Also Chapter 1." UnhideRow. End-For.⇒ RECORD." UnhideScroll.APPR_RULE_DETL. Trading_Days Returns A number. "PeopleCode Built-in Functions. CurrentRowNumber(1). RECORD.1 DeleteRow(RECORD. For &AMT_LOOP = &AMT_ROWS To 1 Step . All Rights Reserved.APPR_RULE_LN. page 121 Copyright © 1988. RECORD. 2009." ConvertRate. page 673.APPR_RULE_AMT). Parameters Parameter Description Closing_Prices An array of number.APPR_RULE_DETL. "PeopleCode Built-in Functions. Chapter 1. CurrentRowNumber(1). page 408 and Chapter 1. RECORD. The elements in this array contain a vector of closing prices for the instrument. Oracle and/or its affiliates.

"PeopleCode Built-in Functions. 2009." Second. The value returned is a whole integer and is not rounded to the nearest hour. page 463 and Chapter 1. All Rights Reserved. 412 Copyright © 1988. See Also Chapter 1. Returns Returns a Number equal to a whole integer value from 0 to 23 representing the hour of the day. Example If &TIMEOUT contains a Time value equal to 04:59:59 PM." Minute.PeopleCode Built-in Functions Chapter 1 Hour Syntax Hour(time_value) Description Use the Hour function to extract a Number value for the hour of the day based on a Time or Datetime value. page 555 IBPurgeDomainStatus Syntax IBPurgeDomainStatus() Description Use the IBPurgeDomainStatus function to purge the domain status. "PeopleCode Built-in Functions. Parameters Parameter Description time_value A Datetime or Time value. the following example sets &TIMEOUT_HOUR to 16: &TIMEOUT_HOUR = Hour(&TIMEOUT). . Oracle and/or its affiliates.

Parameters Parameter Description X Specify an integer to be divided. 413 . false otherwise.Chapter 1 PeopleCode Built-in Functions Parameters None. It divides one number (x) by another (divisor). 2009. Returns Boolean: true if the function completes successfully. Parameters None.divisor) Description The Idiv function is an explicit integer division operation. Oracle and/or its affiliates. false otherwise. Copyright © 1988. All Rights Reserved. IBPurgeNodesDown Syntax IBPurgeNodesDown() Description Use the IBPurgeNodesDown function to purge the down nodes from the service operation monitor. Returns A boolean value: true if the functions completes successfully. Idiv Syntax Idiv(x.

2)." Int. "PeopleCode Built-in Functions. page 463. Returns An integer value. page 424. Chapter 1. Chapter 1. "PeopleCode Built-in Functions. Example The following example's first If statement checks for BEGIN_DT and RETURN_DT. "PeopleCode Built-in Functions. &I2 = Idiv(17." Round." Truncate. 10). "PeopleCode Built-in Functions. Example The following example sets &I1 to 1 and &I2 to -1: &I1 = Idiv(3. "PeopleCode Built-in Functions. 2009. all statements in the Then clause are executed.PeopleCode Built-in Functions Chapter 1 Parameter Description divisor Specify the integer used to divide the first parameter. page 680 If Syntax If condition Then [statement_list_1] [Else [statement_list_2]] End-If Description Use the If statement to execute statements conditionally. the execution continues at the following line. The Else clause may be omitted. If condition evaluates to True. See Also Chapter 1." Integer." Value. otherwise. "PeopleCode Built-in Functions. all statements in the Else clause are executed. If this is True. page 541. Oracle and/or its affiliates. and makes sure that RETURN_DT is greater (later) than BEGIN_DT. page 423. ." Mod. otherwise execution continues at the line beginning with WinMessage: 414 Copyright © 1988. depending on the evaluation of a conditional expression. page 666 and Chapter 1. All Rights Reserved. Chapter 1. The Then and Else clauses of an If consist of arbitrary lists of statements. Chapter 1.

End-if.BEGIN_DT.Chapter 1 PeopleCode Built-in Functions If All(BEGIN_DT. The node defines the target for the published message.MessageName. Specify an already existing nonrowset-based message. Though you are sending a message to yourself. 415 .Node. The &XmlDoc object must already be instantiated and populated. that is. All Rights Reserved. one that isn't based on a hierarchical record structure.50 PeopleBook: PeopleCode API Reference. RETURN_DT) and BEGIN_DT = RETURN_DT Then &DURATION_DAYS = RETURN_DT . it goes through all the inbound message processing on PubNodeName. Enqueue]) Description Use the InboundPublishXmlDoc function to send an asynchronous message that simulates an inbound request from an external node. This parameter takes a Boolean value. "Message Classes. This function has been deprecated and remains for backward compatibility only. Oracle and/or its affiliates. 2009.PubNodeName [. If &DURATION_DAYS 999 Then DURATION_DAYS = 999. This function is used to test inbound message processing. InboundPublishXmlDoc Syntax InboundPublishXmlDoc(&XmlDoc. Else DURATION_DAYS = &DURATION_DAYS." InBoundPublish Parameters Parameter Description &XmlDoc MessageName Specify an already instantiated and populated XmlDoc object that you want to test. PubNodeName Enqueue Copyright © 1988. Use the IntBroker class InboundPublish method instead. See Also Enterprise PeopleTools 8. This is for Sender Specified Routing (SSR). Else WinMessage("The beginning date is later then the return date!"). Specify if the message is enqueued. The message included in the function call should be a nonrowset-based message. prefixed with the reserved word Node. Specify a node. End-if. The content data is based on an XmlDoc object. prefaced with the reserved word Message.Message. Note.

See Also Chapter 1. priority][. Local XMLDOC &xmldoc = GetMessageXmlDoc()." GetMessageXmlDoc. False otherwise. [chat_subject ][. 2009. page 357 and Chapter 1. Oracle and/or its affiliates.customer username. It is a string value.PeopleCode Built-in Functions Chapter 1 Returns A Boolean value: True if the message was successfully published. Chats are only assigned to agents who have this language in their language list as specified on the Languages page of the Agents component.EXTERNAL). Parameters Parameter Description logical queue ID Specifies the logical queue in which the task should be queued. wizard_URL][. NODE. Example The following code example re-publishes the XmlDoc and simulates that it is coming from the node EXTERNAL. . All Rights Reserved. The case used in the InitChat function must exactly match the case used when creating the logical queue ID on the Queues page. page 631 InitChat Syntax InitChat(logical queue ID. 416 Copyright © 1988. "PeopleCode Built-in Functions. Note. InBoundPublishXmlDoc(&xmldoc. It places a chat request on a MultiChannel Framework queue and immediately launches a customer chat window. "PeopleCode Built-in Functions. Chats are implicitly queued with the current language setting of the initiator (%Language_user)." SyncRequestXmlDoc. The logical queue ID is a case-sensitive value. skill_level][. the system launches an agent chat window. When an agent accepts this task from the queue. chat_question][. cost]) Description Use the InitChat function to engage a customer and an agent in a chat session.application data URL.

you need to embed the HTML definition. The wizard page provided by the application must be able to write the URL generated by the wizard to the URL field. 417 . If you do not provide this value. If you do provide this value. wizard_URL This feature leads the agent to an application page from which the agent can select a URL to push to the customer. This could be prompted from the user or inferred from the page from which the chat is initiated. all text sent by the customer is prefixed with this name. This is because the Agent Chat Console is framed by the RenServer API which sends and receives the chat text. This is the relative URL of the application page you wish the agent to launch when the agent clicks the Grab button on the Agent Chat console. All Rights Reserved. a default wizard is launched with no applicationspecific functionality. customer username This reflects the name of the customer or end user initiating the chat request. This URL parameter must not point to content that includes JavaScript that breaks surrounding frames or that references the "top" window. the application page must provide a wizard for pushing a URL to the customer. Copyright © 1988. This is an optional string parameter. In addition. MCF_GRABURL. Note. 2009. This value can be derived from the signon mechanism (%UserID) or by prompting the user. The application can indicate a subject of the chat request. For example. This enables the agent to know the customer's question without having to ask.Chapter 1 PeopleCode Built-in Functions Parameter Description application data relative URL This is the relative URL of the application page you want the agent to see on the left side of the agent-to-customer chat window when the agent accepts the chat. This could be prompted from the user or inferred from the page from which the chat is initiated. which provides the Push and Push and Close buttons that push the URL in the URL field to the customer. In addition. The value appears in the agent's chat window history box immediately after accepting the chat. This value needs to be provided by your program. chat_question This is an optional string parameter. in the chat history window. The application can indicate a specific question to be addressed in the chat. Oracle and/or its affiliates. the application page should not contain URL links to such content. This is the name used to identify the chat requestor in the MultiChannel Framework chat console. chat_subject This is an optional string parameter. See the Example section for examples showing the PeopleCode that would be used to generate the relative URL that is passed in to InitChat and the PeopleCode that would be used to embed the provided MCF_GRABURL definition into your application page. The system displays the subject on the agent's chat console when it assigns the chat to an agent. The URL field is defined by PeopleSoft.

For example. the system places the task created at 11:15 AM before the task created at 11:16 AM. Specify the priority of this chat task. If you do not specify a value. the following PeopleCode could be used to generate the relative URL that is passed in to InitChat. 2009. 1302 is returned when an invalid task type or no value is provided. If the required skill level or cost submitted exceeds the highest skill level or maximum workload of any of the agents on that queue. In this case. suppose the following tasks exist: Priority 2 created at 11:15 AM and Priority 2 created at 11:16 AM. skill level This is an optional parameter. Example For example. If unsuccessful. the system uses the default value specified for that task type on the Task Configuration page. You can use this ID to reference the chat in the chat log. It is an integer value expressing the minimum skill level required of the agent to whom the system routes the request. The minimum value is 0. A higher value means a higher priority. The minimum value is 0 and there is no maximum value. the system orders the tasks according to time they were created. When tasks have the same priority.PeopleCode Built-in Functions Chapter 1 Parameter Description priority This is an optional parameter. If no value is specified. Note. You set an agent's skill level in the Agent page. A task can't be assigned to an agent if the difference between the current workload and the maximum workload defined for that agent on the Agent configuration page is less than the cost of this task. the system uses the default value specified for that task type in the Task Configuration page. For example. the system uses the default value specified for that task in the Task Configuration pages. The queue server assigns this task type to an available agent on that queue with the lowest skill level greater than or equal to the skill level required by the task. cost This is an optional parameter. The message set ID for MultiChannel Framework is 162. The minimum value is 0 and there is no maximum value. Oracle and/or its affiliates. The cost of a task is an estimate of the tasks's expected complexity and of the time required to resolve the task. If no value is specified. which means the system assigns a task of a higher priority before it assigns a task of a lower priority. MultiChannel Framework tasks are ordered on a physical queue based on their assigned priority. The cost of a task is added to an agent's workload after accepting a task on the MultiChannel Framework console. the task cannot be assigned. All Rights Reserved. Returns Returns a unique Chat ID in the form of an integer. It is an integer value measuring the workload each task places on an agent. it returns a message number. 418 Copyright © 1988. . and there is no maximum value. It is an integer value expressing the priority level of the request.

&cssPTSTYLEDEF. "Caught exception: " | &E.PTMCFDEF).target_row. "URL Wizard"). &question. Oracle and/or its affiliates. Component. %Node.UTILITIES.⇒ "GBL". &titleGrabURL. 2009. &HTML = GetHTMLText(HTML. &titleGrabURL = MsgGetText(162.MCF_DEMO_CMP. InsertImage Syntax InsertImage(scrollpath.Write(&HTML). Menu⇒ Name. &minskill).MESSAGE_CATALOG1. [SCROLL.]fieldname) where scrollpath is: [SCROLL. %Response. %Node.GetStyleSheetURL(StyleSheet. "GBL". [recordname. 1181. If (&psDomain = "") Then &psDomain = SetDocDomainToAuthTokenDomain().company. &labelBtPushClose = MsgGetText(162. "". target_recname Copyright © 1988. 0.html". try &ret = InitChat(&QUEUEID. "U"). &psDomain = SetDocDomainForPortal(). The following is an example of the usage of InitChat. &Username. End-Function. End-If.level1_row. catch Exception &E MessageBox(0. using the GetHTMLText function.PT_MCF. Page. Component. "U"). &urlTestComponent. "Widgets". "Push"). &cssPTSTYLEDEF = %Response.PT_MCF.MESSAGE_CATALOG.ToString()).Chapter 1 PeopleCode Built-in Functions &WizURL = GenerateComponentContentRelURL(%Portal. "GBL". MenuName. 2). "http://www. &labelBtPush.]] SCROLL. end-try. The following is an example of embedding the provided MCF_GRABURL definition into your application page. &subject. "How to order widgets". &ret = InitChat("SALES".MCF_DEMO_CMP. All Rights Reserved.support.GetStyleSheetURL(StyleSheet. %Node. "Push and Close"). Page. &psDomain. "". 2. MenuName. &urlTestComponent = GenerateComponentContentRelURL(%Portal. Page. &labelBtPushClose). 1170. The following example illustrates how to pass a PeopleCode-generated URL using the GenerateComponentContentRelURL function for Application Data URL and wizards. 1186.level2_row.⇒ Component. &WizURL = GenerateComponentContentRelURL(%Portal.MCF_URLWIZARD.PTSTYLEDEF). &labelBtPush = MsgGetText(162.level1_recname.MCF_GRABURL. Function IScript_GrabURL() &cssPTMCFDEF = %Response.com/products. &css⇒ PTMCFDEF. "John Smith".level2_recname.MCF_URLWIZARD.⇒ &wizurl. 0. "U"). &priority. 419 .

All Rights Reserved. See Enterprise PeopleTools 8. To update an image field using this function. Note. Image Size Considerations The size of the image that can be saved to the database depends on the database platform. 2009. which means it shouldn't be used in any of the following PeopleCode events: • • • • • SavePreChange SavePostChange Workflow RowSelect Any PeopleCode event that fires as a result of a ScrollSelect (or one of its relatives) function calls. After the image file is associated with the record field. Database Platform Size limitation DB2/400 30 KB DB2/MVS 31 KB DB2/Unix 31 KB 420 Copyright © 1988. The following are the valid types of image files that can be associated with a record field: • • • JPEG BMP DIB InsertImage uses a search page to enable the end-user to select the image file to be used. be sure that PSIMAGEVER field is also on the same record as the image field being updated. This is the same search page used to add an attachment. Oracle and/or its affiliates." Think-Time Functions. it can be saved to the database when the component is saved. Restrictions on Use in PeopleCode Events InsertImage is a "think-time" function. .50 PeopleBook: PeopleCode Developer's Guide. or a Select (or one of its relatives) Rowset class method.PeopleCode Built-in Functions Chapter 1 Description Use the InsertImage function to associate an image file with a record field on a page. "Using Methods and Built-In Functions.

1 %InsertImage_Failed 2 %InsertImage_Canceled 3 %InsertImage_ExceedsMaxSize Example &RC = InsertImage(EMPL_PHOTO. All Rights Reserved. that is. User canceled the transaction so image file isn't associated with record field. they allow for images equal to or greater than 2 GB. Oracle and/or its affiliates. page 197 Copyright © 1988. The name of the field to be associated with the image file. The row number of the target row. or three of the active page. Platform size limitations are subject to change. See Also Chapter 1. Image was not successfully associated with the record field. The field can be on scroll level one. Parameters Parameter Description scrollpath target_row [recordname.Chapter 1 PeopleCode Built-in Functions Platforms other than those listed here are effectively without a size limit. 421 ." DeleteImage. "PeopleCode Built-in Functions. 2009. Image exceeds the maximum allowed size. When the component is saved the image file will not be saved to the database.EMPLOYEE_PHOTO). two. The recordname prefix is required if the function call is not on the record definition recordname Returns The InsertImage function returns either a constant or a number: Numeric Value Constant Value Description 0 %InsertImage_Success Image was successfully associated with the record field.]fieldname A construction that specifies a scroll area in the component buffer.

50 PeopleBook: PeopleCode Developer's Guide. "Rowset Class. with is set to the current date. All Rights Reserved. and all the values from the previous current row are copied into the new row.level2_row. Note. InsertRow inserts a new row in the scroll buffer and causes a RowInsert PeopleCode event to fire.level2_recname.PeopleCode Built-in Functions Chapter 1 InsertRow Syntax InsertRow(scrollpath. then the new row is inserted before the target row. See Also Enterprise PeopleTools 8." InsertRow Enterprise PeopleTools 8. you can also use SCROLL. This function remains for backward compatibility only. However. [RECORD. ] RECORD. pass a value of True in the optional turbo parameter. 2009. "Accessing the Data Buffer" Enterprise PeopleTools 8. Place the PeopleCode in a higher scroll level record. the new row is inserted after the target row specified in the function call. as if the user had manually pressed ALT+7 and ENTER. Description Use the InsertRow function to programmatically perform the ALT+7 and ENTER (RowInsert) function.scrollname. Non-turbo mode is the default. followed by the events that normally follow a RowInsert. InsertRow cannot be executed from the same scroll level where the insertion will take place.50 PeopleBook: PeopleCode API Reference.target_row [.level1_row. InsertRow can be executed in turbo or non-turbo mode." Specifying Data with References Using Scroll Path Syntax and Dot Notation 422 Copyright © 1988. where scrollname is the same as the scroll level's primary record name.level1_recname. except for EffDt. Oracle and/or its affiliates. To execute the function in turbo mode. In turbo mode. or from a lower scroll level.50 PeopleBook: PeopleCode Developer's Guide. Note. if the scroll is effective-dated. . Use the InsertRow rowset class method instead. In scrolls that are not effective-dated. target_recname To prevent ambiguous references. default processing is performed only for the row being inserted. turbo]) where scrollpath is: [RECORD. "Referencing Data in the Component Buffer.

BUS_EXPENSE_PER. The largest integer value we support is 4294967295. Chapter 1." UnhideRow. See Also Chapter 1. Note. "PeopleCode Built-in Functions.Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description scrollpath target_row turbo A construction that specifies a scroll level in the component buffer. page 199. &L2_ROW). Pass a value of True to execute this parameter. 423 . The row number indicating the position where the new row will be inserted. Specifies whether default processing is performed on the entire table or just the row being inserted. Copyright © 1988. Example The example inserts a row on the level-two page scroll. "PeopleCode Built-in Functions.BUS_EXPENSE_DTL. All Rights Reserved." HideRow. 2009. page 673 Int Syntax Int(decimal) Description Use the Int function to truncate a decimal number x to an integer and returns the result as a Number value. page 408 and Chapter 1. Oracle and/or its affiliates." DeleteRow. Returns Optionally returns a Boolean value indicating whether the function executed successfully. PeopleSoft only supports 32 bit integers. The PeopleCode has to be in the scroll-level-one record: InsertRow(RECORD. "PeopleCode Built-in Functions. Non-turbo mode is the default. &L1_ROW. RECORD.

PeopleCode Built-in Functions Chapter 1 Parameters Parameter Description decimal A decimal number to be truncated.975). 2009.147." Value.999.483.648 to 2.999. page 666 and Chapter 1.999.999. Differences between Int and Integer There is one primary difference between the Int function and the Integer function.999. "PeopleCode Built-in Functions.999. "PeopleCode Built-in Functions. See Also Chapter 1.999." Mod.647.999 to 9. Chapter 1.999.999. • • The Int function rounds to a number in floating-decimal-point representation with a range of 9.147. The Integer function truncates to a number in 32 bit binary twos-complement representation with a range of -2. . &I2 = Int(-4. "PeopleCode Built-in Functions." Round.999. Example The following example sets &I1 to 1 and &I2 to -4: &I1 = Int(1.999. page 680 Integer Syntax Integer(decimal) Description Use the Integer function to convert decimal to an integer (32 bit signed twos complement number) by truncating any fraction part towards zero and returns the result as an Integer value.483. "PeopleCode Built-in Functions. Returns Returns a Number equal to decimal truncated to a whole integer." Truncate. page 463.999.999.999.999. 424 Copyright © 1988.0001). Oracle and/or its affiliates. Chapter 1.999. page 541.999. All Rights Reserved.999.999.

page 541." Value. including alphabetic characters from several scripts including Latin. "PeopleCode Built-in Functions. Cyrillic and Thai. Greek. Chapter 1." Int. page 423. punctuation or spaces. page 463. page 666 and Chapter 1. ideographic characters from Chinese. numerics. It excludes all punctuation. "PeopleCode Built-in Functions. Japanese and Korean and Japanese kana. Chapter 1." Mod. Chapter 1." Round. Copyright © 1988. If decimal is outside the range that can be represented by an integer type. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. Returns A Boolean value: true if the string contains only alphabetic and textual characters. page 680 IsAlpha Syntax IsAlpha(String) Description Use the IsAlpha function to determine if String contains only textual characters. the result isn't defined. All Rights Reserved. Oracle and/or its affiliates." Truncate. See Also Chapter 1.Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description decimal A decimal number to be truncated to an integer. Returns Returns an Integer equal to decimal truncated to a whole integer. 2009. false if it contains any numbers. 425 . "PeopleCode Built-in Functions. spaces and control codes Parameters Parameter Description String Specify the string you want to search for alphabetic and other textual characters.

" IsNumber. Alphanumeric characters do not include sign indicators and comma and period decimal points. page 428. Oracle and/or its affiliates." IsDateTime. page 430. page 427. Chapter 1. If IsAlpha(&Value) Then /* do textual processing */ Else /* do non-textual processing */ End-if. See Also Chapter 1.PeopleCode Built-in Functions Chapter 1 Example &Value = Get Field(). Chapter 1. 2009." IsDate. All Rights Reserved. If you want to check for numbers as well as sign indicators. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. 426 Copyright © 1988. Chapter 1. Returns A Boolean value: True if the string contains only alphanumeric characters. page 426. False otherwise. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. Textual characters include all characters valid for the IsAlpha function. page 438 and Chapter 1." IsDigits. Parameters Parameter Description String Specify the string you want to search for alphanumeric characters." IsAlphaNumeric.Value." IsTime. "PeopleCode Built-in Functions. page 440 IsAlphaNumeric Syntax IsAlphaNumeric(String) Description Use the IsAlphaNumeric function to determine if String contains only textual and numeric characters. Chapter 1. use the IsNumber function. "PeopleCode Built-in Functions. .

Unintialized date variables. All Rights Reserved. 2009. you should add an additional check to ensure there is a value. or blank strings return true. Oracle and/or its affiliates." IsNumber. page 438 and Chapter 1. 427 . You can use this function when you want to determine if a value is compatible with the Date built-in function. See Also Chapter 1. Example If IsDate(&Num) Then &Datevalue = Date(&Num).Chapter 1 PeopleCode Built-in Functions Example &Value = Get Field(). Value is a number of the format YYYYMMDD or string of the format YYYY-MM-DD. False otherwise.Value. Returns A Boolean value: True if the string contains a valid date." IsAlpha. Copyright © 1988. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. 0 numerics. Parameters Parameter Description Value Specify either a string or number you want to search for a valid date. such as using the All function. If IsAlphaNumeric(&Value) Then /* do alphanumeric processing */ Else /* do non-alphanumeric processing */ End-if. End-if. page 425 IsDate Syntax IsDate(Value) Description Use the IsDate function to determine if Value contains a valid date. If these values are possibilities for a variable passed to the IsDate function.

False otherwise.PeopleCode Built-in Functions Chapter 1 See Also Chapter 1. Chapter 1." IsAlphaNumeric. "PeopleCode Built-in Functions. Chapter 1. "PeopleCode Built-in Functions. page 426. "PeopleCode Built-in Functions. . All Rights Reserved. Chapter 1. page 430. page 438 and Chapter 1. "PeopleCode Built-in Functions." IsTime. that is." IsDateTime." IsDigits." IsNumber.Value) Then /* do date processing */ Else /* do non-date processing */ End-if. by combining the getting the field value with getting the value of IsDateTime and making it a conditional statement: If IsDateTime(GetField(). "PeopleCode Built-in Functions. in the following format: yyyy-mm-dd hh:mm:ss." IsAlphaNumeric. 2009. "PeopleCode Built-in Functions. Chapter 1. page 438 and Chapter 1. See Also Chapter 1." IsNumber. Example The following example uses the short form of dot notation. page 430. "PeopleCode Built-in Functions. page 440 IsDateTime Syntax IsDateTime(String) Description Use the IsDateTime function to determine if String contains a datetime string in the standard PeopleSoft format. page 428. "PeopleCode Built-in Functions. Chapter 1. Returns A Boolean value: True if the string contains a valid datetime. Oracle and/or its affiliates." IsTime. Chapter 1. page 427." IsDigits.mmmmmm Parameters Parameter Description String Specify the string you want to search for a valid datetime. "PeopleCode Built-in Functions. page 440 428 Copyright © 1988. "PeopleCode Built-in Functions." IsDate. page 426.

&OUTPUT returns False: 12:00am PST = 1:00am MST. TESTDTTM has value of 01/01/99 10:00:00AM. For time zones that don't observe daylight savings time. "EST") In this example. The system's base time zone is specified on the PSOPTIONS table. TESTDTTM has value of 04/05/99 12:00:00AM. &OUTPUT is False. Returns False otherwise. "MST") Copyright © 1988. &OUTPUT has a value of True: 12:00am PST = 3:00am EST. &OUTPUT = IsDaylightSavings(TESTDTTM. Base .Chapter 1 PeopleCode Built-in Functions IsDaylightSavings Syntax IsDaylightSavings(datetime. {timezone | "Local" | "Base"}). TESTDTTM has value of 04/05/99 12:00:00AM.use the base time zone for converting textdatetime. Local . so Daylight Savings Time has switched on. All Rights Reserved. Example In the first example. Specify a value for converting datetime. "EST") In this example. Parameters Parameter Description datetime timezone | Local | Base The datetime value you want to check. &OUTPUT = IsDaylightSavings(TESTDTTM. so Daylight Savings Time hasn't started yet.a time zone abbreviation or a field reference to be used for converting textdatetime. 2009. Description Use the IsDaylightSavings function to determine if daylight savings is active in the specified time zone at the specified datetime. this function always returns False. Oracle and/or its affiliates. Returns A Boolean value: True if daylight savings is active in the specified time zone at the specified datetime. 429 .use the local time zone for converting textdatetime. &OUTPUT = IsDaylightSavings(TESTDTTM. The values are: • • • timezone .

" TimeZoneOffset. 430 Copyright © 1988. False otherwise.50 PeopleBook: System and Server Administration. page 639 Enterprise PeopleTools 8. where they do not observe Daily Savings Time." DateTimeToTimeZone. Returns A Boolean value: True if the string contains digits. Chapter 1. Parameters Parameter Description String Specify the string you want to search. Oracle and/or its affiliates. "PeopleCode Built-in Functions. "Using PeopleTools Utilities" IsDigits Syntax IsDigits(String) Description Use the IsDigits function to determine if String contains only digit (numeric) characters. "PeopleCode Built-in Functions. page 178. "PeopleCode Built-in Functions. . page 637 and Chapter 1. 2009. &OUTPUT returns False: ESTA is Indiana time. Chapter 1. If you want to check for numbers as well as sign indicators. &OUTPUT = IsDaylightSavings(TESTDTTM. page 123. Example If IsDigits(&MyValue) Then /* do processing */ Else /* do error processing */ End-if. Numeric characters do not include sign indicators and comma and period decimal points. use the IsNumber function." TimeToTimeZone. Chapter 1. All Rights Reserved. page 120. "PeopleCode Built-in Functions." ConvertTimeToBase. "PeopleCode Built-in Functions.PeopleCode Built-in Functions Chapter 1 In this example. "ESTA") See Also Chapter 1. TESTDTTM has value of 07/07/99 10:00:00." ConvertDatetimeToBase.

" IsNumber. This function enables you to provide alternate code paths when running in a Disconnected Client environment. "PeopleCode Built-in Functions. This functionality is not available in all product lines. page 426. Note. "PeopleCode Built-in Functions. Use the IsDisconnectedClient function to determine whether the current environment that is being accessed is the Disconnected Client. Parameters None. 431 ." IsDateTime." IsAlphaNumeric. Oracle and/or its affiliates." IsDate. PeopleSoft Mobile Agent is a deprecated product. page 425. page 428. else WinMessage("DisconnectedClient = false"). page 440 IsDisconnectedClient Syntax IsDisconnectedClient() Description Note. "PeopleCode Built-in Functions. Chapter 1. This feature only returns true when running on a PeopleSoft Mobile Synchronization Client. Chapter 1. Copyright © 1988. "PeopleCode Built-in Functions. Chapter 1. page 427.Chapter 1 PeopleCode Built-in Functions See Also Chapter 1." IsTime. This function currently exists for backward compatibility only. 2009. Chapter 1. page 438 and Chapter 1. Example if (IsDisconnectedClient()) then WinMessage("DisconnectedClient = true"). false otherwise. Returns A boolean value: true if the current environment is the Disconnected Client. "PeopleCode Built-in Functions. end-if." IsAlpha. "PeopleCode Built-in Functions. All Rights Reserved.

See Also Enterprise PeopleTools 8. Description Use the IsHidden function to verify whether a row is hidden or not. Use the Visible row class property instead. .scrollname. Note. "Accessing the Data Buffer" Parameters Parameter Description scrollpath target_row A construction that specifies a scroll level in the component buffer.level2_recname. Example The following example tests whether a specific row on scroll level one is hidden: 432 Copyright © 1988.target_row) Where scrollpath is: [RECORD.50 PeopleBook: PeopleCode API Reference.level1_recname. IsHidden must be called in a PeopleCode program on a higher scroll level than one you are checking.level2_row. This function remains for backward compatibility only. otherwise it returns False. "Row Class.50 PeopleBook: PeopleCode Developer's Guide. [RECORD. where scrollname is the same as the scroll level's primary record name.PeopleCode Built-in Functions Chapter 1 IsHidden Syntax IsHidden(scrollpath. 2009. ] RECORD. you can also use SCROLL. target_recname To prevent ambiguous references.level1_row. It returns True if the row is hidden. Oracle and/or its affiliates." Visible Enterprise PeopleTools 8. The row number indicating the position of the row. All Rights Reserved.

menuitem_name." GenerateScriptContentURL. 1).ITEMNAME. See Also Chapter 1. If None(&ORDER) Then &FOUND = False. prefixed with the reserved word BARNAME. All Rights Reserved. If &FOUND Then For &I = 1 To &ROW_CNT If Not IsHidden(RECORD. page 310 and Chapter 1.Chapter 1 PeopleCode Built-in Functions &ROW_CNT = ActiveRowCount(RECORD. &FOUND = True.menuname. "PeopleCode Built-in Functions. The name of the menu item where the page is located. 433 .component_item_name[. "PeopleCode Built-in Functions. End-If. The name of the menu bar where the page is located. prefixed with the reserved word ITEMNAME. End-If. Parameters Parameter Description menuname The name of the menu where the page is located.LD_SHP_INV_VW.ORDER_NO.barname. Note. barname menu_itemname Copyright © 1988. page 673 IsMenuItemAuthorized Syntax IsMenuItemAuthorized(MENUNAME. End-For. Oracle and/or its affiliates.LD_SHP_INV_VW). &I) Then UpdateValue(ITEM_SELECTED. prefixed with the reserved word MENUNAME. End-If. BARNAME. "N"). 2009." UnhideRow. &I. This function is generally used for transfers that are part of some PeopleCode processing. PAGE. End-If. action]) Description The IsMenuItemAuthorized function returns True if the current user is allowed to access the specified menu item. You do not need to use this function to gray internal link pushbuttons/hyperlinks. If &ROW_CNT = 1 Then &ORDER = FetchValue(LD_SHP_INV_VW.

"PeopleCode Built-in Functions. page 217. Chapter 1. String representing the action mode in which to start up the page." DoModalComponent." DoModal. . it must be prefixed with the keyword PAGE. You can also specify a null ("") for this parameter. The component item name is specified in the component definition. page 642 and Chapter 1.PeopleCode Built-in Functions Chapter 1 Parameter Description component_item_name Specify the component item name of the page to be displayed on top of the component when it displays. "PeopleCode Built-in Functions." Transfer." TransferPage. Oracle and/or its affiliates. page 658 IsMessageActive Syntax IsMessageActive(Message. the current action is used. "PeopleCode Built-in Functions. All Rights Reserved.Message_Name) 434 Copyright © 1988. False otherwise. See Also Chapter 1. page 220. Values are: action Constant Description %Action_Add Add %Action_UpdateDisplay Update/Display %Action_UpdateDisplayAll Update/Display All %Action_Correction Correction %Action_DataEntry Data Entry %Action_Prompt Prompt Returns A Boolean value: True if the user is authorized to access the specified page. 2009. If action is omitted. If you specify a page. Chapter 1. "PeopleCode Built-in Functions.

" IsOperationActive Parameters Parameter Description Message_Name Specify the name of the message you want to inquire about. populating it and publishing it */ End-if. False otherwise.MyMessage).50 PeopleBook: PeopleCode API Reference. See Also Enterprise PeopleTools 8. Use the IsActive message class property to determine if a rowset-based message definition is active. Example &Active = IsMessageActive(Message. Note. 435 . This function is used only with XmlDoc messages. Note. you might use this function to check if the message is active before you publish it. "XmlDoc Class" Copyright © 1988. The message name must be prefixed with the reserved work Message. All Rights Reserved. If you have a lot of PeopleCode associated with publishing an XmlDoc message. Oracle and/or its affiliates." IsActive and Enterprise PeopleTools 8. False if it's been inactivated from Application Designer. See Also Enterprise PeopleTools 8. 2009. This function returns True if the message definition for the XmlDoc message is active. This function has been deprecated and remains for backward compatibility only.Chapter 1 PeopleCode Built-in Functions Description Use the IsMessageActive built-in function to determine whether the specified message definition has been set to inactive in Application Designer.50 PeopleBook: PeopleCode API Reference. "Message Classes. Use the IntBroker class IsOperationActive method instead. after you get an XmlDoc message (using GetMessageXmlDoc) use this function to determine if the message is active. that is. If &Active Then /* code for getting message. This function is used only with XmlDoc message definitions. "Message Classes.50 PeopleBook: PeopleCode API Reference. Returns A Boolean value: True if the message is active.

") End-If. Break.") End-If. STATE) Then Warning MsgGet(1000. State. End-If. 5.PAY_OL_RE_ASSGN_S) Then Evaluate COUNTRY When = "USA" When = "CAN" If Not AllOrNone(ADDRESS1. 436 Copyright © 1988. and Country. CITY. Parameters None. End-Evaluate. COUNTRY) Then Warning MsgGet(1000. When-Other. 6. CITY. Example The following example executes logic specific to a secondary page: If Not IsModal() Or Not (%Page = PAGE. All Rights Reserved. "Address should consist of at least Street (Line⇒ 1).PeopleCode Built-in Functions Chapter 1 IsModal Syntax IsModal() Description The IsModal function returns True if executed from PeopleCode running in a modal secondary page and False if executed elsewhere. "Address should consist of at least Street (Line⇒ 1). . If Not AllOrNone(ADDRESS1. City. Returns A Boolean value. This function is useful in separating secondary page-specific logic from general PeopleCode logic. and Country. Restrictions on Use With a Component Interface This function is ignored (has no effect) when used by a PeopleCode program that's been called by a Component Interface. City.PAY_OL_RE_ASSGN_C Or %Page = PAGE. 2009.PAY_OL_REV_RUNCTL Or %Page = PAGE. Oracle and/or its affiliates.

page 235 IsModalComponent Syntax IsModalComponent() Description Use the IsModalComponent function to test whether a modal component is currently executing." EndModal. All Rights Reserved. False otherwise. page 217 and Chapter 1. */ See Also Chapter 1. page 220 IsModalPanelGroup Syntax IsModalPanelGroup() Copyright © 1988. Parameters None.Chapter 1 PeopleCode Built-in Functions See Also Chapter 1." DoModal. Example If IsModalComponent() then /* Logic that executes only if component is executing modally. "PeopleCode Built-in Functions. Oracle and/or its affiliates. Restrictions on Use With a Component Interface This function is ignored (has no effect) when used by a PeopleCode program that's been called by a Component Interface. enabling you to write PeopleCode that only executes when a component has been called with DoModalComponent. end-if. "PeopleCode Built-in Functions. 437 . 2009. "PeopleCode Built-in Functions. Returns Returns a Boolean value: True if the current program is executing from a modal component." DoModalComponent.

PeopleCode Built-in Functions Chapter 1 Description Use the IsModalPanelGroup function to test whether a modal component is currently executing. To determine if a value is a number and if it's in the user's local format. 438 Copyright © 1988.Value. Parameters Parameter Description Value Specify a string you want to search to determine if it is a valid number. use the IsUserNumber function. page 437 IsNumber Syntax IsNumber(Value) Description Use the IsNumber function to determine if Value contains a valid numeric value. New applications should use the IsModalComponent function instead. "PeopleCode Built-in Functions. . False otherwise. All Rights Reserved. Oracle and/or its affiliates. If IsNumber(&Value) Then /* do numeric processing */ Else /* do non-numeric processing */ End-if. 2009. The IsModalPanelGroup function is supported for compatibility with previous releases of PeopleTools. Note. Example &Value = Get Field(). Returns A Boolean value: True if Value contains a valid numeric value. See Also Chapter 1." IsModalComponent. Numeric characters include sign indicators and comma and period decimal points.

or data entry dialog box is currently executing. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions.Chapter 1 PeopleCode Built-in Functions See Also Chapter 1." IsAlphaNumeric. . Copyright © 1988. All Rights Reserved.) Description The IsInOperatorClass takes an arbitrary-length list of strings representing the names of operator classes and determines whether the current operator belongs to any class in a list of classes. page 428 and Chapter 1. The IsOperatorInClass function is supported for compatibility with previous releases of PeopleTools. page 440 Chapter 1. Chapter 1. Chapter 1. False otherwise. add dialog. "PeopleCode Built-in Functions. page 425. New applications should use the IsUserInPermissionList function instead. Chapter 1. page 427. page 442 IsOperatorInClass Syntax IsOperatorInClass(operclass1 [. page 430." IsTime. "PeopleCode Built-in Functions." IsDate." IsDigits. "PeopleCode Built-in Functions. See Also Chapter 1." IsAlpha. page 426. operclass2]. page 441 IsSearchDialog Syntax IsSearchDialog() Description Use the IsSearchDialog function to determine whether a search dialog. "PeopleCode Built-in Functions." IsUserNumber. "PeopleCode Built-in Functions. Chapter 1. Returns Returns a Boolean value: True if a search dialog box is executing. Use it to make processes conditional on whether a search dialog box is running. Note. 439 . "PeopleCode Built-in Functions. Oracle and/or its affiliates." IsDateTime. 2009." IsUserInPermissionList. .

440 Copyright © 1988. Oracle and/or its affiliates. All Rights Reserved. 2009. Example If IsTime(&Num) Then &Timevalue = Time(&Num). End-if. Returns A Boolean value: True if the string contains a valid Time value. page 597 IsTime Syntax IsTime(Value) Description Use the IsTime function to determine if Value contains a valid Time. End-If. False otherwise. End-If. calc_range_spread().SALARY_GRADE_TBL Then If All(SALARY_MATRIX_CD) Then Gray(RATING_SCALE) End-If. Parameters Parameter Description Value Specify either a string or number you want to search for to determine if it's a valid Time. . "PeopleCode Built-in Functions. You can use this function when you want to determine if a value is compatible with the Time function." SetSearchDialogBehavior. See Also Chapter 1.PeopleCode Built-in Functions Chapter 1 Example If Not (IsSearchDialog()) Then If %Component = COMPONENT.

Chapter 1." IsAlphaNumeric. page 440 IsUserInPermissionList Syntax IsUserInPermissionList(PermissionList1 [. page 786 Chapter 3. page 427. Chapter 1. Chapter 1. page 788 Chapter 3. PermissionList2]. Returns Returns a Boolean value: True if the current user has access to one or more of the Permission Lists. page 253. See Also Chapter 1. page 428. "PeopleCode Built-in Functions. Chapter 1. page 253 and Chapter 1. "PeopleCode Built-in Functions. "System Variables. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." %RowSecurityPermissionList. All Rights Reserved." IsTime." IsDate.50 PeopleBook: Security Administration. page 426. "PeopleCode Built-in Functions." %PrimaryPermissionList. each of which represents a Permission List." IsNumber." IsUserInRole. Oracle and/or its affiliates. "System Variables. page 425. "PeopleCode Built-in Functions." ExecuteRolePeopleCode. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "System Variables. 441 . False otherwise." IsDateTime. page 251. 2009." IsDigits." %Roles. page 442 Chapter 3. Chapter 1. "System Variables." %PermissionLists. Parameters Parameter Description PermissionList An arbitrary-length list of string.Chapter 1 PeopleCode Built-in Functions See Also Chapter 1. "Setting Up Permission Lists" Copyright © 1988." IsAlpha.) Description Use the IsUserInPermissionList function to take an arbitrary-length list of strings representing the names of Permission Lists and determine whether the current user belongs to any of the Permission Lists. Chapter 1. page 430. . page 785 Chapter 3. ." ExecuteRoleWorkflowQuery. Chapter 1. page 788 Enterprise PeopleTools 8. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions." ExecuteRoleQuery. page 438 and Chapter 1. "PeopleCode Built-in Functions.

50 PeopleBook: Security Administration. rolename2]. For example. Numeric characters include sign indicators and comma and period decimal points. "Setting Up Roles" IsUserNumber Syntax IsUserNumber(Value) Description Use the IsUserNumber function to determine if Value contains a valid numeric value that uses the localespecific form of the number for the current user. . Oracle and/or its affiliates. . False otherwise. 442 Copyright © 1988. use the IsNumber function. .) Description Use the IsUserInRole function to take an arbitrary-length list of strings representing the names of roles and determine whether the current user belongs to any role in an array of roles. if your regional settings specified periods for the thousands separator. 2009. To determine if a value is a number regardless if it's in the user's local format. this function returns false. See Also Enterprise PeopleTools 8. Returns Returns a Boolean value: True if the current user belongs to one or more of the roles in the user role array.PeopleCode Built-in Functions Chapter 1 IsUserInRole Syntax IsUserInRole(rolename1 [. and the number uses commas. Parameters Parameter Description rolename An arbitrary-length list of strings. each of which represents a role. All Rights Reserved.

Value. 443 ." ValueUser. "PeopleCode Built-in Functions." IsDateTime. "PeopleCode Built-in Functions.num_chars) Description Use the Left function to return a substring containing the leftmost number of characters in source_str." IsAlpha. page 426. Example &Value = Get Field(). "PeopleCode Built-in Functions. page 430. page 438 and Chapter 1. Chapter 1. False otherwise. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. All Rights Reserved." IsTime. Chapter 1. Returns A Boolean value: True if Value contains a valid numeric value in the correct format." IsDigits. 2009. each code unit of the surrogate pair is counted as a separate character and care should be taken not to split the surrogate pair. page 440 Chapter 1. page 681 Left Syntax Left(source_str.Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description Value Specify a string you want to search to determine if it is a valid number in the correct format. Chapter 1. "PeopleCode Built-in Functions. num_chars specifies how many characters to extract. If the string contains Unicode non-BMP characters." IsDate." IsNumber. See Also Chapter 1. "PeopleCode Built-in Functions. page 425. "PeopleCode Built-in Functions. Chapter 1. page 427." IsAlphaNumeric. page 428 and Chapter 1. Copyright © 1988. If IsUserNumber(&Value) Then /* display number */ Else /* do other processing */ End-if. Oracle and/or its affiliates.

including spaces. in str.PeopleCode Built-in Functions Chapter 1 Parameters Parameter Description source_str num_chars A String from which to derive the substring." Right. All Rights Reserved. it is assumed to be one. Returns Returns a String value derived from source_str. If num_chars is greater than the length of source_str. . Oracle and/or its affiliates. page 540 Len Syntax Len(str) Description Use the Len function to determine the number of characters in a string. A Number specifying how many characters to take from the left of source_str. The value of num_chars must be greater than or equal to zero. If the string contains Unicode nonBMP characters. Left returns the entire string. Example The following example sets &SHORT_ZIP to "90210": &SHORT_ZIP = Left("90210-4455". If num_chars is omitted. 2009. 5). "PeopleCode Built-in Functions. Returns Returns a Number value equal to the number of characters. each code unit of the surrogate pair is counted as a separate character. Example The following example sets &STRLEN to 10. See Also Chapter 1. then to 0: 444 Copyright © 1988.

This function has been deprecated and is no longer supported. The last four are the four coefficients to be returned from the function: a. Oracle and/or its affiliates. and d is the coefficient of the x3 term. c is the coefficient of the x2 term. See Also Chapter 1.c and d. &STRLEN = Len(""). page 445 Lenb Syntax Lenb(str) Description Note. The elements in the array correspond to the elements in the array used for DataPoints. "PeopleCode Built-in Functions.Chapter 1 PeopleCode Built-in Functions &STRLEN = Len("PeopleSoft"). Copyright © 1988. 2009. All Rights Reserved. Parameters Parameter Description DataPoints This parameter takes an array of array of number. Returns A modified array of array of numbers.b. 445 . The array's contents are an array of six numbers. LinearInterp Syntax LinearInterp(DataPoints) Description Use the LinearInterp function to compute a set of lines through a sequence of at least two points. The c and d elements contain zeros. The first two of these six numbers are the x and y points to be fit. b is the coefficient of the x1 term." Lenb. a is the coefficient of the x0 term.

which equals 2. "PeopleCode Built-in Functions. Oracle and/or its affiliates. Example The following examples set &I to 2. See Also Chapter 1. Ln is the inverse of the Exp function." HermiteCubic. page 163 and Chapter 1.7182818). . "PeopleCode Built-in Functions.71828182845904. "PeopleCode Built-in Functions. page 449 Local Syntax Localdata_type &var_name [= expression] Description Use the Local statement to explicitly define local variables in PeopleCode." Log10." CubicSpline. Returns A Number equal to the natural logarithm of i.302585 and &J to 1: &I = Ln(10)." Exp. "PeopleCode Built-in Functions. Natural logarithms are based on the constant e. page 255 and Chapter 1. All Rights Reserved. 2009.PeopleCode Built-in Functions Chapter 1 See Also Chapter 1. The number i must be a positive real number. 446 Copyright © 1988. page 404 Ln Syntax Ln(i) Description Use the Ln function to determine the natural logarithm of a number. &J = Ln(2.

Local Number &Constant = 42. The scope of local variables declared outside of a function is the PeopleCode program.) in the same manner as parameters. intermixed with function declarations." Component. the system automatically initializes temporary variables. including inside functions. "PeopleCode Built-in Functions. Oracle and/or its affiliates. Example local string &LOC_FIRST. page 103 Enterprise PeopleTools 8. that is. Undeclared local variables are initialized as null strings. Also. All Rights Reserved. Local variable declarations can also appear in the body of a program. page 400 and Chapter 1. See Also Chapter 1. Parameters Parameter Description data_type &var_name expression Any PeopleCode data type. "PeopleCode Built-in Functions. 2009.Chapter 1 PeopleCode Built-in Functions Variable declarations can appear at the start of the program. the variable can be set to a value at the same time it is declared. The following example scopes the local variable &Constant as a local variable. as well as initializing it." Data Types LogObjectUse Syntax LogObjectUse([annotation]) Copyright © 1988. Specify the value of the variable." Global. these function local variables are different variables for each call of the function (even for recursive calls. This parameter is optional. Declared variables always have values appropriate to their declared type.50 PeopleBook: PeopleCode Developer's Guide. In the absence of an initialization. Local variable declarations intermixed with the body of the program or inside functions can include initialization. 447 . "Understanding the PeopleCode Language. The scope of local variables declared inside a function is to the end of the function. A legal variable name.

the output is also an informative display of the object use in your system at a particular point in time. .PeopleCode Built-in Functions Chapter 1 Description Use the LogObjectUse function to write to the system log a list of all the current PeopleCode objects with the current count. the object class name. This enables you to easily identify output corresponding to your use of this built-in. 448 Copyright © 1988. Example The following is an example of output that can be generated in the system log. Oracle and/or its affiliates. All Rights Reserved. Parameters Parameter Description annotations Specify a string to become the first line in the log file. 2009. Returns None. and the maximum count of objects of this type. While this function is mainly used to determine memory usage.

Chapter 1 PeopleCode Built-in Functions PeopleCode side . page 784 Enterprise PeopleTools 8. All Rights Reserved. Oracle and/or its affiliates. 2009. "Improving Your PeopleCode" Log10 Syntax Log10(x) Copyright © 1988. "System Variables. 449 .50 PeopleBook: PeopleCode Developer's Guide." %PerfTime.after Java 1902 JavaPeerReference 0 Field 0 ContentRefCollection 0 PortalCollection 83 String 0 PT_NAV:NavEndNode 0 PT_NAV:NavFolderNode 0 PT_NAV:NavTheme 0 PT_NAV:NavNodeCollection 0 PortalRegistry 0 PT_BRANDING:HeaderLinkBase 0 PT_NAV:NavNode 0 PT_BRANDING:HeaderLinkHP 0 BIDocs 0 PT_NAV:NavPortal 1 SyncServer 0 TabDefinition 951 Rowset 0 FolderCollection 0 SQL 0 Folder 1 Response 1 Foxtest 0 Record 23 Array 1 Request 0 AttributeCollection 0 UserHomepage 0 Portal 0 NodeCollection 0 UserTabCollection 0 ObjPropRef 951 FOXTEST:Test 0 PT_BRANDING:BrandingBase 0 ContentRef 0 PT_NAV:NavPagelet 0 TabDefinitionCollection 0 Session 0 NetworkNode 14 4 3 116459 6 35 1 4 7 1 45 1 4 1 1 1 220001 4 5 69 14 3 1 264 15 40 2 3 3 1 3 110001 3 13 1 1 10 3 See Also Chapter 3.

Example The example sets &GOODKD to "k d lang": &GOODKD = Lower("K D Lang")." Exp. The number x must be a positive real number. &Y = Log10(25)." Ln. Returns Returns a Number equal to the base-10 logarithm of x.PeopleCode Built-in Functions Chapter 1 Description Use the Log10 function to return the base-10 logarithm of a number x as a number value. Returns A String value equal to string. page 446 Lower Syntax Lower(string) Description Use the Lower function to convert all uppercase characters in a text string to lowercase characters and returns the result as a String value. 2009. . Example The following example sets &X to 1 and &Y to 1. page 255 and Chapter 1. All Rights Reserved. "PeopleCode Built-in Functions. Lower does not change characters that are not letters or characters do not have case sensitivity. 450 Copyright © 1988. "PeopleCode Built-in Functions. Oracle and/or its affiliates. but in all lowercase format.39794: &X = Log10(10). See Also Chapter 1.

:!?").string2]) Description Use the LTrim function to return a string formed by deleting from the beginning of string1. If string2 is omitted.Chapter 1 PeopleCode Built-in Functions See Also Chapter 1. " " is assumed. See Also Chapter 1. that is." Proper." Upper.INP: &TRIMMED = LTrim(REC." RTrim. leading blanks are trimmed. page 497 and Chapter 1. "PeopleCode Built-in Functions. The following removes leading punctuation marks from REC.. all occurrences of each character in string2. Example The following removes leading blanks from &NAME: &TRIMMED = LTrim(&NAME). "PeopleCode Built-in Functions. ". Copyright © 1988. All Rights Reserved. Oracle and/or its affiliates..INP. 2009. page 679 LTrim Syntax LTrim(string1 [. "PeopleCode Built-in Functions. You can only have one primary email address per user. page 548 MarkPrimaryEmailAddress Syntax MarkPrimaryEmailAddress(Type) Description Use the MarkPrimaryEmailAddress function to specify which email address is the primary email address for the current user. 451 .

page 83 and Chapter 1. This function works only if you've invoked a page from the Worklist. 452 Copyright © 1988. "PeopleCode Built-in Functions. 2009. You can use the %WLName system variable to check whether the page has been accessed using a Worklist." AddEmailAddress. "PeopleCode Built-in Functions. All Rights Reserved. Chapter 1. See Also Chapter 1. page 196 MarkWLItemWorked Syntax MarkWLItemWorked() Description Use the MarkWLItemWorked function to mark the current Worklist entry as worked using this function. "PeopleCode Built-in Functions. . The valid values are: Value Description BB BUS HOME OTH WORK Blackberry email address Business email address Home email address Other email address Work email address Returns None. This parameter takes a string value." ChangeEmailAddress. This function should be called only in Workflow PeopleCode.PeopleCode Built-in Functions Chapter 1 Parameters Parameter Description Type Specify the type that you want to change the email address to. page 48." DeleteEmailAddress. Oracle and/or its affiliates.

. "System Variables. "PeopleCode Built-in Functions. you must use the WorklistEntry class SaveWithCustomData method to mark the Worklist entry as finished. Copyright © 1988.parameter2 [." GetWLFieldValue. For example. if you need to send additional data. "Notification Classes. The type of every item in the parameter list must be compatible with the first parameter in the list. parameter3.456. Returns Returns a Boolean value indicating whether it executed successfully." SaveWithCustomData. if the first parameter is a string and the second parameter is a number with value 123." %WLName. you can use this function to mark the Worklist entry as worked. Parameters None. the second parameter is converted to the string "123. Example This example. and you do not need to send any additional information other than the Mark Worked reply message. The return value is not optional. If the Worklist entry was created using a web service. 453 . Oracle and/or its affiliates.Chapter 1 PeopleCode Built-in Functions Note. page 793 Max Syntax Max(param_list) Where param_list has the form parameter1. it marks the item in the worklist as complete: If MARK_WORKED_SW = "Y" Then If MarkWLItemWorked() Then End-If. . and if so. 2009.50 PeopleBook: PeopleCode API Reference. . checks to see whether a page check box MARK_WORKED_SW is selected. See Also Chapter 1. End-If. parameterN] Description Use the Max function to determine the maximum value in the parameter list. page 399 and Chapter 3. All Rights Reserved. See Enterprise PeopleTools 8.456" before the comparison is performed. However. which would be in the WorkFlow event.

"A") returns "Z"." Min. All Rights Reserved. "E"). SenderId. Returns The item in the list that has the maximum value. to a queue. "PeopleCode Built-in Functions.SecurityLevel. "D".PeopleCode Built-in Functions Chapter 1 If all the values in the parameter list are alpha characters. Parameters Parameter Description ClusterID Specify the name of the cluster that you want to broadcast the message to.ChannelID. 2009. This function is used with the MultiChannel Framework. Oracle and/or its affiliates. . SALES.MessageNumber.QueueID.AgentPresence. RENCLSTR_001. such as. "B". MessageSetNumber. If a value isn't defined. the system assumes it's of the same type as the first parameter. or even system wide. You can specify whether to send the message to agents. such as. as a string. "C". page 462 MCFBroadcast Syntax MCFBroadcast(ClusterID.Message.ImportanceLevel. "Z" is greater than "A" so Max("Z". Specify the name of the physical or logical queue that you want to broadcast the message to.DefaultMessage. All items in the parameter list must be of the same type.NameValueString) Description Use the MCFBroadcast function to broadcast a notification message.AgentState. Example &RSULT = Max("A". QueueID 454 Copyright © 1988. Parameters Parameter Description param_list Specify a list of items to be compared. as a string. See Also Chapter 1.

Chapter 1 PeopleCode Built-in Functions Parameter Description ChannelID Specify the name of the channel. as a string. Specify the text of the message you want to broadcast. Voice or Generic. You must also specify values for the MessageSetNumber and DefaultMessageText parameters if you want to broadcast this type of message. such as Email. 2005-10-25:12:00:45"). such as Available. Example The following example would broadcast a message to a specific logical queue: MCFBroadcast("". Specify the presence of the agents you want to broadcast the message to. Specify the text to be used if the specified message catalog message isn't found. 2009. Specify the ID of the sender of the broadcast message. Specify the message number as a number. "EffDate. Chat. "". You must also specify values for the MessageNumber and DefaultMessageText parameters if you want to broadcast this type of message. as a string. "URGENT". such as Active. Use the MessageSetNumber and MessageNumber parameters to specify the catalog message. "Admin". Specify a string containing name-value pairs specific to your application. as a string. as a string.⇒ "PRIV1". Specify the message set number of a message from the message catalog if you want to broadcast a message from the message catalog. "SALES". 455 . Specify the state of the agents you want to broadcast the message to.50 PeopleBook: PeopleCode API Reference. Specify the default message text as a string. for the broadcast. Specify the message number of a message from the message catalog if you want to broadcast a message from the message catalog. as a string. Specify the security level for the broadcast message. "Best of Luck!". Oracle and/or its affiliates. "". See Also Enterprise PeopleTools 8. Specify the importance level of the broadcast message. AgentState AgentPresence Message MessageSetNumber MessageNumber DefaultMessageText SercurityLevel ImportanceLevel SenderID NameValueString Returns None. Specify the message set number as a number. "Universal Queue Classes" Copyright © 1988. or task. "Default Message". "". All Rights Reserved. "". as a string. as a string.

"PeopleCode Built-in Functions." MsgGet.paramlist]) where paramlist is an arbitrary-length list of parameters of undetermined (Any) data type to be substituted in the resulting text string. in the form: param1 [. title determines the title of message. "PeopleCode Built-in Functions. Description Use the MessageBox function to display a message box window.default_txt [. Message Retrieval MessageBox retrieves a message from the Message Catalog and substitutes the values of the parameters into the text message and explanation.title. 2009." MsgGetExplainText. more detailed information stored in the Message Catalog. This makes it a "user think-time" function. "PeopleCode Built-in Functions. Oracle and/or its affiliates. .50 the title of a message box is the severity set in Message Catalog. Note. Beginning with PeopleTools version 8. If MessageBox displays buttons other than OK. page 466. The style parameter selects the buttons to be included. MsgGetText. The remaining parameters are used to retrieve and process a text message selected from the Message Catalog. that is.PeopleCode Built-in Functions Chapter 1 MessageBox Syntax MessageBox(style. and your code can branch based on that value. then clicks an OK button to dismiss the message box. are included. style is ignored if the message has any severity other than Message. restricting its use to certain PeopleCode events. Chapter 1. Chapter 1. in which case the message box contains two or more buttons (such as OK and Cancel or Yes. The The title parameter is ignored for messages displayed in the PeopleSoft Pure Internet Architecture. and Cancel)." Think-Time Functions. the default title is "Message".50 PeopleBook: PeopleCode Developer's Guide. If this is not available. page 468." MsgGetText. or MsgGetExplainText. "Using Methods and Built-In Functions.message_num. . Use MessageBox as a way of branching based on user choice. The value returned by the function tells you which button the user clicked. page 467 and Enterprise PeopleTools 8. This function combines dialog-display ability with the text-selection functionality of MsgGet. it causes processing to stop while it waits for user response. 456 Copyright © 1988. . In the MessageBox dialogs. both the Text and the Explanation. where the user reads the message. See Chapter 1. MessageBox can be used for simple informational display. No. param2].message_set. All Rights Reserved. Also.

The Message Severity settings and processing options are: Severity Processing Message The message is displayed and processing continues. If the message has a severity of Message and style is %MsgStyle_OK (0). The parameters are referenced in the message text using the % character followed by an integer corresponding to the position of the parameter in the paramlist. Restrictions on Use in PeopleCode Events If MessageBox displays any buttons other than OK. %\ is used to indicate an end-ofstring and terminates the string at that point. the default message provided in default_txt is used.000 through 32. This is generally used to specify fixed-length strings with trailing blanks. use %%. In addition.Chapter 1 PeopleCode Built-in Functions You can access and update the Message Catalog through PeopleTools Utilities. if the first and second parameters in paramlist were &FIELDNAME and &USERNAME. The message_set and message_num parameters specify the message to retrieve from the catalog. This makes it a "user think-time" function. Message Severity MessageBox specifies processing for error handling functions based on the Message Severity of the message. The optional paramlist is a comma-separated list of parameters. Error The message is displayed and treated as an error. which you can set in the Message Catalog.767 can be used by PeopleSoft users. the message is displayed in a pop-up dialog box with a single OK button regardless of the value of the style parameter. To include a literal percent sign in the string. Message sets 1 through 19. Error. Oracle and/or its affiliates. For example. or Cancel. 2009.999 are reserved for use by PeopleSoft applications. If the message has a severity of Message and style is not %MsgStyle_OK (0). subject to the same restrictions as other think-time functions which means that it cannot be used in any of the following PeopleCode events: Copyright © 1988. in the PeopleSoft Pure Internet Architecture the Message Severity dictates how the message displays: • • • If the message has a severity of Warning. using the Message Catalog page located under the Use menu. All Rights Reserved. they would be inserted into the message string as %1 and %2. by setting the severity level for the message in the Message Catalog. 457 . Warning The message is displayed and treated as a warning. the message displays in a separate window. If the message is not found in the Message Catalog. You can enter message text in multiple languages. it returns a value based on the end-user response and interrupts processing until the end-user has clicked one of the buttons. Message sets 20. This enables you to change the severity of an error without changing the underlying PeopleCode. the number of parameters in the list is arbitrary. the message displays in a popup dialog box with the single OK button. Cancel The message is displayed and forces a Cancel.

Oracle and/or its affiliates. all GUI-related parameters like style and title are ignored.PeopleCode Built-in Functions Chapter 1 • • • • • SavePreChange. 2009. it should work as is.) In addition. You should use 0 and "". and the default button. the message is displayed in a new window with the OK and Cancel buttons. This parameter is calculated by cumulatively adding either a value or a constant from each of the following list of categories: Note.50 PeopleBook: PeopleCode Developer's Guide. Note. . Restrictions on Use With PeopleSoft Pure Internet Architecture In the PeopleSoft Pure Internet Architecture. If the message has a severity of Warning and the MessageBox PeopleCode is in a SaveEdit event. RowSelect. In PeopleSoft Pure Internet Architecture style is ignored if the message has any severity other than Message. If you have an existing MessageBox in code called from a page. You can change the number and type of buttons. the function can be called in any PeopleCode event. If the message has a severity of Warning and the MessageBox PeopleCode is in a SaveEdit event. Any PeopleCode event that fires as a result of a ScrollSelect (or one of its relatives) function calls. the syntax is the same. you can't change the message box title. The actual message data is routed to PS_MESSAGE_LOG at runtime. but the message always displays with the warning icon (a triangle with an exclamation mark in it. However. or a Select (or one of its relatives) Rowset class method." Think-Time Functions. If the style parameter specifies a single button (that is. SavePostChange. 458 Copyright © 1988. All Rights Reserved. you can't change the icon of a message box. Parameters Parameter Description Style Either a numerical value or a constant specifying the contents and behavior of the dialog box. the OK button). "Using Methods and Built-In Functions. Workflow. and you can view it from the Process Monitor by drilling down to the process details. The message box title is always 'Message'. Restrictions on Use With Application Engine If you call MessageBox from a PeopleCode action in an Application Engine program. the message is displayed in a new window with the OK and Cancel buttons. See Enterprise PeopleTools 8.

4 %MsgStyle_YesNo The message box contains two push buttons: Yes and No. and Cancel. 3 %MsgStyle_YesNoCance l The message box contains three pushbuttons: Yes. then PeopleTools provides an appropriate value. Oracle and/or its affiliates. and Ignore. The title parameter is ignored for messages displayed in the PeopleSoft Pure Internet Architecture. 2 %MsgStyle_AbortRetryI gnore The message box contains three pushbuttons: Abort. A value less than one indicates that the message comes from the provided text and not the Message Catalog. If a null string is specified. Parameter Description message_set The message set number of the message to be displayed. message_num default_txt Copyright © 1988. 2009. it overrides the specified text. 5 %MsgStyle_RetryCancel The message box contains two push buttons: Retry and Cancel. 1 %MsgStyle_OKCancel The message box contains two pushbuttons: OK and Cancel. Note. When message set and number are provided. Parameter Description title Title of message box. All Rights Reserved. Default text to be displayed in the message box. No.Chapter 1 PeopleCode Built-in Functions Category Value Constant Meaning Buttons 0 %MsgStyle_OK The message box contains one pushbutton: OK. The message number of the message to be displayed. 459 . The title of a message box in PeopleSoft Pure Internet Architecture is always "Message". Retry.

1 %MsgResult_OK OK button was selected. the number of parameters in the list is arbitrary. The parameters are referenced in the message text using the % character followed by an integer corresponding to the position of the parameter in the paramlist. In other cases the following menu values are returned: Value Constant Meaning -1 %MsgResult_Warning Warning was generated. The return value is zero if there is not enough memory to create the message box. 2 %MsgResult_Cancel Cancel button was selected. 7 %MsgResult_No No button was selected. pressing the ESC key has no effect. Only a director can approve this. . All Rights Reserved. Returns Returns either a Number value or a constant. 6 %MsgResult_Yes Yes button was selected. In PeopleSoft Pure Internet Architecture. 2009. Oracle and/or its affiliates. 460 Copyright © 1988. 5 %MsgResult_Ignore Ignore button was selected. 3 %MsgResult_Abort Abort button was selected. Note. Example Suppose the following string literal is stored in the Message Catalog as the message text: Expenses of employee %1 during period beginning %2 exceed allowance.PeopleCode Built-in Functions Chapter 1 Parameter Description paramlist A comma-separated list of parameters. The following is stored in the Explanation: You do not have the authority to approve this expense. 4 %MsgResult_Retry Retry button was selected.

"Message not found. All Rights Reserved. The following is stored in the Explanation: The file you specified wasn't found. BUS_EXPENSE_PER. The call would display a message box similar to this. if the message severity was Error or Warning. "Message not found. "". 2009. This is how the message displays: Example message with Retry and Cancel buttons If the message severity is of type Cancel."). The following MessageBox call provides bind variables corresponding to these placeholders at the end of its parameter list: MessageBox(0.Chapter 1 PeopleCode Built-in Functions Here %1 is a placeholder for the employee ID and %2 a placeholder for the expense period date.". Oracle and/or its affiliates. and specify a new file. Example of message box Suppose the following is stored in the Message Catalog as the message text: File not found. and you used the %MsgStyle_RetryCancel.⇒ or cancel. "".EXPENSE_PERIOD_DT). 30000.EMPLID. Either select retry. the message displayed looks like this: Copyright © 1988. in the following code: MessageBox(%MsgStyle_RetryCancel. 461 . Suppose this message had a Severity of message. 30000. 2. 1. BUS_⇒ EXPENSE_PER.

PeopleCode Built-in Functions Chapter 1 Critical type error message See Also Chapter 1. the second parameter is converted to the string "123. if the first parameter is a string and the second parameter is a number with value 123. page 466. "PeopleCode Built-in Functions. ." MsgGetExplainText.parameter2 [. "PeopleCode Built-in Functions.456" before the comparison is performed. All items in the parameter list must be of the same type. Oracle and/or its affiliates. . so Min("a". 2009. "a" is less than "m". "PeopleCode Built-in Functions.456. "m") returns "a". The type of every item in the parameter list must be compatible with the first parameter in the list. If a value isn't defined. . the system assumes it's of the same type as the first parameter." MsgGetText. page 468 and Chapter 1. Chapter 1. All Rights Reserved. Parameters Parameter Description param_list Specify a list of items to be compared. parameterN] Description Use the Min function to determine the minimum value in the parameter list." MsgGet. If all the values in the parameter list are alpha characters. 462 Copyright © 1988. . parameter3. For example. page 467 Min Syntax Min(param_list) Where param_list has the form parameter1.

page 555 Mod Syntax Mod(x. "PeopleCode Built-in Functions." Max. page 412 and Chapter 1. 463 ." Second. "-20").Chapter 1 PeopleCode Built-in Functions Returns The item in the list that has the minimum value. All Rights Reserved. page 453 Minute Syntax Minute(timevalue) Description Use the Minute function to extract the minute component of a Time value. 2009. &C." Hour. "PeopleCode Built-in Functions. Example If &TIMEOUT contains "16:48:01" then the example sets &TIMEOUT_MINUTES to 48: &TIMEOUT_MINUTES = Minute(&TIMEOUT). See Also Chapter 1. Oracle and/or its affiliates. See Also Chapter 1. Returns Returns the minute part of timevalue as a Number data type. Example &RES = Min(&A. "PeopleCode Built-in Functions. Max(&B. &D).divisor) Copyright © 1988.

3). 2009." Round. page 423." Truncate. Parameters Parameter Description datevalue A Date or DateTime value on the basis of which to determine the month. Returns Returns a Number equal to the remainder of the division of the number x by divisor. which divides one number (x) by another (divisor) and returns the remainder. All Rights Reserved.2). "PeopleCode Built-in Functions. page 666 Month Syntax Month(datevalue) Description Use the Month function to return the month of the year as an integer from 1 to 12 for the specified datevalue. Oracle and/or its affiliates. The Month function accepts a Date or DateTime value as a parameter. Chapter 1. See Also Chapter 1. "PeopleCode Built-in Functions. 464 Copyright © 1988. &NUM2 = Mod(10." Int. page 541 and Chapter 1. Returns Returns a Number value from 1 to 12 specifying the month of the year. . "PeopleCode Built-in Functions. Example The example sets &NUM1 to one and &NUM2 to zero: &NUM1 = Mod(10.PeopleCode Built-in Functions Chapter 1 Description The Mod function is the modulus math function.

Chapter 1 PeopleCode Built-in Functions Example This example sets &HIRE_MONTH to 3: &HIREDATE = DateTime6(1997. Chapter 1. Chapter 1." DateValue. "PeopleCode Built-in Functions. 2009. "PeopleCode Built-in Functions. page 183. You might use this function to increment an employee ID field by one when you are adding a new employee.Key2. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. This feature is only applicable when running on a PeopleSoft Mobile Synchronization Client. Chapter 1. 10. page 702 MSFGetNextNumber Syntax MSFGetNextNumber(Key1. This functionality is not available in all product lines. "PeopleCode Built-in Functions. Chapter 1. &HIRE_MONTH = Month(&HIRE_DATE)." Year. PeopleSoft Mobile Agent is a deprecated product. 9." Days365. Specify the second key field value used to identify the mobile object that contains the numeric field values. page 183. page 181. Chapter 1. "PeopleCode Built-in Functions. This mobile function currently exists for backward compatibility only." Date. "PeopleCode Built-in Functions." Weekday. Note. Oracle and/or its affiliates. Specify the third key field value used to identify the mobile object that contains the numeric field values. Parameters Parameter Description Key1 Specify the first key field value used to identify the mobile object that contains the numeric field values." Days360. 15. page 171. 465 . Use the MSFGetNextNumber function to return the next number from the mobile system that is specified by the key fields that are passed in. 3. All Rights Reserved. See Also Chapter 1. "PeopleCode Built-in Functions." Date3. page 170. Chapter 1. page 694 and Chapter 1. 20). Key2 Key3 Copyright © 1988." Day.Key3) Description Note. page 180.

The optional paramlist is a comma-separated list of parameters. The message_set and message_num parameters specify the message to retrieve from the catalog. param2]. the default message provided in default_msg_txt is used. paramlist]) where paramlist is an arbitrary-length list of parameters of undetermined (Any) data type to be substituted in the resulting text string. Description Use the MsgGet function to retrieve a message from the PeopleCode Message Catalog and substitutes in the values of the parameters into the text message. All Rights Reserved.PeopleCode Built-in Functions Chapter 1 Returns A number.999 are reserved for use by PeopleSoft applications. Message sets 20. &ds2. using the Message Catalog page located under the Use menu. 2. If the message is not found in the Message Catalog. Oracle and/or its affiliates. This is generally used to specify fixed-length strings with trailing blanks. use %%. You can access and update the Message Catalog through the PeopleTools Utilities. 2009.default_msg_txt [. . %\ is used to indicate an end-ofstring and terminates the string at that point. You can enter message text in multiple languages. if the first and second parameters in paramlist were &FIELDNAME and &USERNAME. MsgGet Syntax MsgGet(message_set.000 through 32. Example &nextNumber = MSFGetNextNumber(&ds1. Message sets 1 through 19. the number of parameters in the list is arbitrary. The parameters are referenced in the message text using the % character followed by an integer corresponding to the position of the parameter in the paramlist. .767 can be used by PeopleSoft users.message_num. 466 Copyright © 1988. . For example. they would be inserted into the message string as %1 and %2. &ds3). MsgGet suffixes the message with "[Message Set# and Message Error#]". To include a literal percent sign in the string. in the form: param1 [. "Message not found"). Example &MsgText = MsgGet(30000. The Message Catalog also enables you to enter more detailed "Explain" text about the message. so it can be processed by a user not conversant in the translated language.

Specify the text to be displayed if the message isn't found.default_msg_txt [. 2009. This parameter takes a string value. 467 . Message sets 20. Description Use the MsgGetExplainText function to retrieve the Explain text of a message from the PeopleCode Message Catalog and substitutes the values of the parameters in paramlist into the explain text. Oracle and/or its affiliates. using the Message Catalog. All Rights Reserved. Message sets 1 through 19. It returns the resulting message explain text as a String data type. This parameter takes a number value.999 are reserved for use by PeopleSoft applications. in the form: param1 [. Unlike the MsgGet function. page 468. Parameters Parameter Description message_set Specify the message set to be retrieved from the catalog. MsgGetExplainText returns the message without a message set and message number appended to the message.Chapter 1 PeopleCode Built-in Functions See Also Chapter 1.767 can be used by PeopleSoft users. . This parameter takes a number value. paramlist]) where paramlist is an arbitrary-length list of parameters of undetermined (Any) data type to be substituted in the resulting text string." MessageBox. "PeopleCode Built-in Functions. page 456 MsgGetExplainText Syntax MsgGetExplainText(message_set. "PeopleCode Built-in Functions." MsgGetExplainText. Specify the message number to be retrieved from the catalog. page 467 and Chapter 1. Chapter 1. message_num default_msg_txt Copyright © 1988.000 through 32.message_num." MsgGetText. param2]. You can access and update the Message Catalog through the PeopleTools Utilities. "PeopleCode Built-in Functions. . You can enter messages in multiple languages.

"PeopleCode Built-in Functions.%2) that is not defined within⇒ Application Designer. If you use a message box. This substitution only takes place in message explain text when the MsgGetExplainText function is used.PeopleCode Built-in Functions Chapter 1 Parameter Description paramlist Specify values to be substituted into the message explain text. See Also Chapter 1.field in error was MyRecord. This is generally used to specify fixed-length strings with trailing blanks.Field5. paramlist]) where paramlist is an arbitrary-length list of parameters of undetermined (Any) data type to be substituted in the resulting text string. . Check for typographical errors in the specification⇒ of the record. if the first and second parameters in paramlist were &FIELDNAME and &USERNAME. 468 Copyright © 1988. To include a literal percent sign in the string. they would be inserted into the message string as %1 and %2. use %%.field (%1. "PeopleCode Built-in Functions.field or use Application Designer to add the new field or record. "PeopleCode Built-in Functions. 2009. If the record. the above would resolve as follows: A reference was made to a record." MsgGetText. Chapter 1. For example. %\ is used to indicate an end-of-string and terminates the string at that point. page 466 and Chapter 1. Here %1 is a placeholder for the record name and %2 a placeholder for the field name.Field5) that is not defined⇒ within Application Designer.default_msg_txt [. The parameters listed in the optional paramlist are referenced in the message explain text using the % character followed by an integer referencing the position of the parameter in the function call.field (MyRecord. in the form: param1 [. page 468. Note. Oracle and/or its affiliates. Example Suppose the following explain text is stored in the Message Catalog: A reference was made to a record. the parameter substitution will not occur in the explain text." MessageBox." MsgGet. .field or use Application Designer to add the new field or record. page 456 MsgGetText Syntax MsgGetText(message_set.message_num. . param2]. Check for typographical errors in the specification of the⇒ record. All Rights Reserved.

It returns the resulting message text as a String data type. If the next record doesn't exist. if it's contained within a compound statement or a loop. "Message not found"). If the NextEffDt function isn't a top-level statement. MsgGetText returns the message without a message set and message number appended to the message.Chapter 1 PeopleCode Built-in Functions Description Use the MsgGetText function to retrieve a message from the PeopleCode Message Catalog and substitutes the values of the parameters in paramlist into the text message. Chapter 1. If the message is not found in the Message Catalog. the statement is skipped. "PeopleCode Built-in Functions. See Also Chapter 1. page 467 and Chapter 1. Message sets 20. To include a literal percent sign in the string. The return value is an Any data type. In the following example. if the first and second parameters in paramlist were &FIELDNAME and &USERNAME. "PeopleCode Built-in Functions. The parameters listed in the optional paramlist are referenced in the message text using the % character followed by an integer referencing the position of the parameter in the function call.999 are reserved for use by PeopleSoft applications. This function is valid only for effective-dated records. execution skips to the top If statement: Copyright © 1988. Example &MsgText = MsgGetText(30000. they would be inserted into the message string as %1 and %2. the statement is skipped and execution restarts with the next top-level statement." MessageBox. using the Message Catalog page located under the Use menu. The message_set and message_num parameters specify the message to retrieve from the catalog. "PeopleCode Built-in Functions. For example. that is. 2009. 2. This is generally used to specify fixed-length strings with trailing blanks.767 can be used by PeopleSoft users. Message sets 1 through 19." MsgGetExplainText. All Rights Reserved. You can access and update the Message Catalog through the PeopleTools Utilities window." MsgGet. 469 . %\ is used to indicate an end-of-string and terminates the string at that point. You can enter message text in multiple languages. use %%. Oracle and/or its affiliates.000 through 32. Unlike the MsgGet function. page 456 NextEffDt Syntax NextEffDt(field) Description Use the NextEffDt function to return the value of the specified field from the record with the next effective date (and effective sequence number if specified). page 466. the default message provided in default_msg_txt is used.

"PeopleCode Built-in Functions. The return value is an Any data type. If a next record doesn't exist. if it's contained within a compound statement or a loop. Description Use the NextRelEffDt function to locate the next occurrence of the search_field with the next effective date (and effective sequence number if the record contains an effective sequence number). See Also Chapter 1.⇒ Beschäftigungsgradänderungen sind nur zum ersten eines Monats zulässig. the statement is skipped. Chapter 1. Chapter 1. "Meldung nicht vorhanden . "PeopleCode Built-in Functions. Typically. "PeopleCode Built-in Functions.PeopleCode Built-in Functions Chapter 1 If ACTION <> "REH" Then /* skip to here if NextEffDt fails to find next record */ If STD_HOURS <> NextEffDt(STD_HOURS) And Day(EFFDT) <> 1 Then Error MsgGet(30000." PriorRelEffDt." PriorEffDt. . page 382. page 470. End-If. "PeopleCode Built-in Functions. 2009. that is. page 493 and Chapter 1. "PeopleCode Built-in Functions. .field2]. run to here directly */ See Also Chapter 1. 8. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions.") End-If. this function is used to retrieve values for related display fields." GetRelField. Chapter 1. page 469.fetch_field) where fieldlist is an arbitrary-length list of fields in the form: field1 [." PriorRelEffDt." NextRelEffDt." PriorEffDt. It then returns the value of the specified fetch_field corresponding to the search_field. page 492 NextRelEffDt Syntax NextRelEffDt(search_field. page 493 and Chapter 1." NextEffDt. the statement is skipped and execution restarts with the next top-level statement.WAZ bzw. /* if NextEffDt fails. Oracle and/or its affiliates. If the NextRelEffDt function isn't a top-level statement. This function is valid only for effective-dated records. page 492 NodeDelete Syntax NodeDelete(nodeName) 470 Copyright © 1988. . All Rights Reserved.

so the user has a chance to change their mind about deleting the node. */ End-If. the function completed successfully deleted. PeopleSoft recommends the following code in the FieldChange event: If %Page = Page. Oracle and/or its affiliates.) Warning! Once this function has completed. 2009. Parameters Parameter Description nodeName Specify the name of the node you want to delete. you cannot recover the node. Copyright © 1988.Chapter 1 PeopleCode Built-in Functions Description Use the NodeDelete function to delete the specified node and all subordinate objects (transactions. ClearKeyList(). Example &Rslt = NodeDelete("QEM_TEST_NODE"). node properties. In addition. and so on.DESCR | " ".YourDeletePage Then /* changes the record in the buffer so that the DoSaveNow fires */ PSMSGNODEDEFN. All node names are uppercase. certificates. DoSaveNow(). All Rights Reserved. Event Considerations PeopleSoft recommends only using this function in the SavePostChange event. Returns A Boolean value: True. /* Transfer to another component or display information message. as a string.DESCR = PSMSGNODEDEFN. If you use a pushbutton on a page to delete a node. False otherwise. you should put a warning in the SaveEdit event. 471 . If Not &Rslt Then /* Do error processing */ End-if.

"PeopleCode Built-in Functions. All Rights Reserved. If Not &Rslt Then /* Do error processing */ End-if." NodeRename. "PeopleCode Built-in Functions. "QE_TEST_NODE"). Example &Rslt = NodeRename("QEM_TEST_NODE". Oracle and/or its affiliates. which may be important because this function affects several tables. False otherwise. page 473 Enterprise PeopleTools 8. as a string. "Adding and Configuring Nodes" NodeRename Syntax NodeRename(oldNodeName. 472 Copyright © 1988. All node names are uppercase. This gives the user a chance to edit any other page fields before executing.newNodeName) Description Use the NodeRename function to rename a node. . as a string.50 PeopleBook: PeopleSoft Integration Broker Administration." NodeSaveAs. Returns A Boolean value: True.PeopleCode Built-in Functions Chapter 1 See Also Chapter 1. Parameters Parameter Description oldNodeName newNodeName Specify the name of the node that you want to change. page 472 and Chapter 1. 2009. the function completed successfully deleted. Event Considerations PeopleSoft recommends using this function only in the SavePreChange event. Specify the new name for the node.

Chapter 1 PeopleCode Built-in Functions See Also Chapter 1. "PeopleCode Built-in Functions. 2009.50 PeopleBook: PeopleSoft Integration Broker Administration. "Adding and Configuring Nodes" NodeSaveAs Syntax NodeSaveAs(oldNodeName. Returns A Boolean value: True." NodeDelete. False otherwise. as a string. Copyright © 1988. Oracle and/or its affiliates. the function completed successfully deleted. All node names are uppercase. "PeopleCode Built-in Functions. Example &Rslt = NodeSaveAs("PRODUCTION_NODE". and save it to the database as newNodeName.newNodeName) Description Use the NodeSaveAs function to create a copy of the node specified by oldNodeName. This gives the user a chance to edit any other page fields before executing. as a string. page 470 and Chapter 1. "MY_TEST_NODE"). Event Considerations PeopleSoft recommends using this function only in the SavePreChange event. All Rights Reserved. which may be important because this function affects several tables. Parameters Parameter Description oldNodeName newNodeName Specify the name of the node that you want to copy. If Not &Rslt Then /* Do error processing */ End-if." NodeSaveAs. Specify the name for the new node. page 473 Enterprise PeopleTools 8. 473 .

True if the function completed successfully. "ROLESYNCH_MSG". Oracle and/or its affiliates. Parameters Parameter Description MsgNodeName EffDt TrxType RqstMsgName RqstMsgVer Specify the message node name as a string. Specify the request message version as a string. Description Use the NodeTranDelete function to delete a node transaction. False otherwise.50 PeopleBook: PeopleSoft Integration Broker Administration. page 472 and Chapter 1. Example &ret = NodeTranDelete("QE_LOCAL". Specify the request message name as a string. Returns A Boolean value. "PeopleCode Built-in Functions. "1900-01-01". 2009.TrxType. .EffDt. "VERSION_1"). Specify the effective date as a string. Specify the transaction type as a string. any transaction modifier using that transaction is also deleted. page 470 Enterprise PeopleTools 8.RqstMsgName." NodeRename. 474 Copyright © 1988. "PeopleCode Built-in Functions.RqstMsgVer). Warning! If you delete a node transaction.PeopleCode Built-in Functions Chapter 1 See Also Chapter 1. "IA". All Rights Reserved. "Adding and Configuring Nodes" NodeTranDelete Syntax NodeTranDelete(MsgNodeName." NodeDelete.

Related Functions All Checks to see if a field contains a value. End-if. The following example uses None with a variable: Copyright © 1988. If any of the fields is Null. or leave them all empty. or none of them have values. None returns True if none of the specified fields contain a value. if the end-user puts can put a value into one field in a set of fields. [recordname. Use this when the end-user must fill in only one of a set of mutually exclusive fields. Checks if exactly one field in the set has a value. then All returns False. "PeopleCode Built-in Functions.]fieldname1 [. Checks if no more than one field in the set has a value. A blank character field. or a zero (0) numeric value in a required numeric field is considered a null value. Oracle and/or its affiliates.. Use this in cases where if an end-user fills in one field.]fieldname2] .Chapter 1 PeopleCode Built-in Functions See Also Chapter 1. 475 . Checks if either all the field parameters have values. 2009. It returns False if any one of the fields contains a value. Description The None function takes an arbitrary number of field names as parameters and tests for values. that is. Use this in cases when a set of fields is both optional and mutually exclusive. she must all fill in the other related values. AllOrNone OnlyOne OnlyOneOrNone Example The following example uses None to check whether REFERRAL_SOURCE has a value: If None(REFERRAL_SOURCE) or REFERRAL_SOURCE = "EE" Then Gray(EMP_REFERRAL_ID)." RelNodeTranDelete. or if all the fields in a list of fields contain values. page 517 None Syntax None(fieldlist) where fieldlist is an arbitrary-length list of fields in the form: [recordname. All Rights Reserved..

and NotifyQ notifies the queue server about a task's existence and location." AllOrNone. The logical queue ID is a case-sensitive value. 1).EMPLID." OnlyOne. If tasks of different types or tasks that are assigned to different logical queues are enqueued. and therefore affects performance. When you process a batch of tasks to be enqueued. The valid values are: • • email generic 476 Copyright © 1988. "PeopleCode Built-in Functions." OnlyOneOrNone. page 57. "PeopleCode Built-in Functions. PeopleSoft recommends calling NotifyQ just once (after the last task is processed). This ensures that the system is notified of tasks waiting to be assigned. If None(&ONETIME) Then /* do processing */ End-if. page 56. Parameters Parameter Description logical queue ID Specifies the logical queue in which the task should be queued. and should not be used for these tasks. "PeopleCode Built-in Functions. at least one NotifyQ is required for each logical queue and for each task type. NotifyQ is not required for chat or voice tasks. Oracle and/or its affiliates. The case used in the NotifyQ function must exactly match the case used when creating the logical queue ID on the Queues page. It is a string value. 2009.task type) Description Use the NotifyQ function to notify the queue server of an incoming task. NotifyQ forces the queue server to reorder its internal lists and save its state to the database. task type Specifies the type of task to be inserted. Chapter 1. Chapter 1. It is a string value. EnQueue inserts the task into the PeopleSoft database. NotifyQ should always follow the use of the EnQueue function. page 490 NotifyQ Syntax NotifyQ(logical queue ID.PeopleCode Built-in Functions Chapter 1 &ONETIME = FetchValue(POSN_INCUMB_WS. . All Rights Reserved. page 489 and Chapter 1. Note. See Also Chapter 1. "PeopleCode Built-in Functions." All.

*". &Precision). "QEDMO". 477 . The message set ID for MultiChannel Framework is 162. "email"). it returns a message number. &Num. and the precision to be 2: &MyValue = NumberToDisplayString("%6.Number [. &subject. &cost. The following example shows how both the width and the precision values are taken dynamically from the &Width and &Precision variables.2". End-If NumberToDisplayString Syntax NumberToDisplayString(Format.2". All Rights Reserved. 1547. Both width and precision can be set based on Format. Specify the Width and Precision parameters when you want to dynamically specify the width or precision. "email". 15. 1302 is returned when an invalid task type or no value is provided. 162. For example. &priority. The decimal and thousand's separator are formatted with what is with the current user's personalizations.Chapter 1 PeopleCode Built-in Functions Returns Returns 0 if the function was successful. &Width). 60. "Queue Successfully notified. &Num). &langcode. If unsuccessful."). Precision]) Description Use the NumberToDisplayString function to format Number according to the pattern specified in Format. "". 2009. Width] [. &MyValue = NumberToDisplayString("%*. For example. &MyCompURL. If &nret = 0 Then MessageBox(0. respectively. Oracle and/or its affiliates. &Num. &minskill). &Width. the following statically specifies the width to be 6. &nret = NotifyQ(&queueID. The following example show the width taken dynamically from the &Width variable: &MyValue = NumberToDisplayString("%*. Example &strtasknum = EnQueue(&queueID. Copyright © 1988.

Oracle and/or its affiliates. below. See Using the Format parameter. 2009. All Rights Reserved. Number Width Precision Using the Format Parameter The Format parameter has the following format: %[flags][width][.PeopleCode Built-in Functions Chapter 1 Parameters Parameter Description Format Specify the pattern for how Number is supposed to be formatted. Specify the width of the string to be formatted. .precision][R | T] [type] 478 Copyright © 1988. Specify the number to be formatted. Specify the precision of the string to be formatted.

This must be the last flag before any other pattern indicators. q Display zeros as blanks. The maximum precision is 50. R specifies rounding in conversion from the internal PeopleCode representation. • • • • Width must be specified as a non-negative integer. specifying 12. Copyright © 1988. In the absence of the R control rounding is the default. Specifying an asterisks ("*") allows for a dynamic precision specification. Specifying an asterisks ("*") allows for dynamic field width specification. Precision specifies how many digits follow the ". 2009. m Opposite of M: " (dr)" for negative and " (cr)" for positive.345 with precision of 2 (%n. It must be specified as a non-negative integer. Q Display zeros as "None". M Append " (cr)" on right for negative numbers and " (dr)" for positive numbers. specifying 2.2Tt) prints 12. a Bracket negative numbers with "(" and ")". blank Pad left hand side with blanks only indicating a negative number with a '-' sign. 0 Pad left hand side with zeroes. 479 . # Force the number to have a decimal point. The maximum width is 50.". All Rights Reserved. $ Fill out field on left hand side with international currency symbol. A Bracket negative numbers with "[" and "]". T specifies truncation in conversion from the internal PeopleCode representation.345 with precision of 2 (%n.2Rt) prints 12. + Prefix output with plus sign.34.35. that is.Chapter 1 PeopleCode Built-in Functions • Flags have the following format: Flag Description - Left align the number. Oracle and/or its affiliates. that is.

d specifies 1 decimal digit and dddd specifies an arbitrary number. &Str4 would be "1. W Scientific format (like above.23456e+003".56". Example In the following example. if the separator is a comma. 480 Copyright © 1988.234. For example. For example. &Str3 would be " 1. v 1000ths separator delimited output. for "z") except "e" is "E". Returns A string value. the form d.2". &Str3 = NumberToDisplayString("%10. w Scientific format like printf %e.ddddeddd where "e" indicates exponent. &Num). In the following example. &Num = 1234. &Num).dddd. 2009. For example. the format is 1.02.56".PeopleCode Built-in Functions Chapter 1 • Type has the following format: Type Description t Type has format like printf %f. &Str2 would be "$$$1234.000. In the following example. &Num). In the following example.2t".56. &Str1 would be "0001234. for "w") except "e" is "E". All Rights Reserved. &Str1 = NumberToDisplayString("%#010.56. &Num = 1234. . z Scientific Engineering format like printf %e where the exponent is always a multiple of 3 and the mantissa is between 1 and a 1000. &Str2 = NumberToDisplayString("%$10.2v".56. This is the default value. Oracle and/or its affiliates.000. the form dddd. &Num = 1234.56". Z Scientific Engineering format (like above.

"PeopleCode Built-in Functions. 2009. See Also Chapter 1. The following example shows how both the width and the precision values are taken dynamically from the &Width and &Precision variables. Specify the width of the string to be formatted.2". &Precision). Specify the Width and Precision parameters when you want to dynamically specify the width or precision. the following statically specifies the width to be 6. &Num). 481 . All Rights Reserved. &Num.*". and the precision to be 2: &MyValue = NumberToString("%6. Specify the precision of the string to be formatted.Number [." NumberToString. &Str4 = NumberToDisplayString("%w". Using the Format Parameter The Format parameter has the following format: %[flags][width][.2". Specify the Number to be formatted. &Num). The following example show the width taken dynamically from the &Width variable: &MyValue = NumberToString("%*.Chapter 1 PeopleCode Built-in Functions &Num = 1234. Width] [. &MyValue = NumberToString("%*. respectively. &Num.precision][R | T] [type] Copyright © 1988. Both width and precision can be set based on Format. Oracle and/or its affiliates. Precision]) Description Use the NumberToString function to format Number according to the pattern specified in Format. &Width. For example. page 481 NumberToString Syntax NumberToString(Format. &Width).56. Parameters Parameter Description Format Number Width Precision Specify the pattern for of how Number is supposed to be formatted.

The maximum width is 50.35.34. The maximum precision is 50.345 with precision of 2 (%n. 0 Pad left hand side with zeroes. specifying 12. Specifying an asterisks ("*") allows for dynamic field width specification.345 with precision of 2 (%n. that is. It must be specified as a non-negative integer. In the absence of the R control rounding is the default. This must be the last flag before any other pattern indicators. . A Bracket negative numbers with "[" and "]".2Tt) prints 12. specifying 2. M Append " (cr)" on right for negative numbers and " (dr)" for positive numbers. a Bracket negative numbers with "(" and ")". blank Pad left hand side with blanks only indicating a negative number with a '-' sign. 482 Copyright © 1988. Oracle and/or its affiliates. Precision specifies how many digits follow the ".2Rt) prints 12. that is.PeopleCode Built-in Functions Chapter 1 • Flags have the following format: Flag Description - Left align the number. q Display zeros as blanks. # Force the number to have a decimal point. Specifying an asterisks ("*") allows for a dynamic precision specification. 2009.". T specifies truncation in conversion from the internal PeopleCode representation. m Opposite of M: " (dr)" for negative and " (cr)" for positive. R specifies rounding in conversion from the internal PeopleCode representation. + Prefix output with plus sign. • • • • Width must be specified as a non-negative integer. Q Display zeros as "None". $ Fill out field on left hand side with international currency symbol. All Rights Reserved.

&Str1 would be "0001234. &Str3 = NumberToString("%10. Returns A string value. &Num).02.56". Copyright © 1988.23456e+003".56. For example. the format is 1. &Str3 would be " 1.ddddeddd where "e" indicates exponent. Z Scientific Engineering format (like above. In the following example.Chapter 1 PeopleCode Built-in Functions • Type has the following format: Type Description t Type has format like printf %f.2t". For example. All Rights Reserved. z Scientific Engineering format like printf %e where the exponent is always a multiple of 3 and the mantissa is between 1 and a 1000. &Num). In the following example. In the following example.000. for "w") except "e" is "E".2v". Example In the following example. &Num = 1234. w Scientific format like printf %e.56". 2009.56". the form dddd. for "z") except "e" is "E". 483 . This is the default value.56. For example. &Str2 would be "$$$1234. &Num).dddd. &Num = 1234. &Str4 would be "1. if the separator is a comma.2".56.000. &Num = 1234. &Str2 = NumberToString("%$10. &Str1 = NumberToString("%#010. the form d. Oracle and/or its affiliates. d specifies 1 decimal digit and dddd specifies an arbitrary number. v 1000ths separator delimited output.234. W Scientific format (like above.

2009. page 625 and Chapter 1. &Num). A string containing the name of an exposed method of obj_this. str_method_name paramlist Returns None. . If you do not know how many parameters you may need to pass when you write your PeopleCode. This variable must have been instantiated either with CreateObject. use the ObjectDoMethodArray function.str_method_name [. This method can be useful if you know the number of parameters you need to pass for a method. "PeopleCode Built-in Functions. passing in any required parameters using paramlist. Oracle and/or its affiliates. page 477. Application Classes. paramlist]) Where paramlist is a list of parameters of arbitrary length: param1 [. 484 Copyright © 1988. "PeopleCode Built-in Functions. Chapter 1. OLE Automation objects. Parameters Parameter Description obj_this Specify an already instantiated object.56. param2]. &Str4 = NumberToString("%w". or another function or method that creates objects. See Also Chapter 1. and so on. page 680 ObjectDoMethod Syntax ObjectDoMethod(obj_this.PeopleCode Built-in Functions Chapter 1 &Num = 1234. . . All Rights Reserved." String." Value. The parameter list to pass to the str_method_name method. Description Use the ObjectDoMethod function to invoke the method specified by str_method_name for the object object_this." NumberToDisplayString. You can use ObjectDoMethod with Component Interfaces. "PeopleCode Built-in Functions.

If you do not want to supply any parameters. The array of parameters is an array of Any. "PeopleCode Built-in Functions. and displays its name. page 152 and Chapter 1." ObjectSetProperty." ObjectGetProperty. passing in any required parameters using the array. you can't pass in references of the form RECORD. &WORKBOOKS = ObjectGetProperty(&WORKAPP. that is." CreateObject. You cannot pass in field references. All Rights Reserved. page 149. Chapter 1." CreateObjectArray.Array_of_Args) Description Use the ObjectDoMethodArray function to invoke the method specified by method_name for the object object_name. /* This associates the⇒ INVOICE template w/the workbook */ ObjectDoMethod(&WORKAPP. or a reference to a Null array. you can use an empty array.Method_Name. This simple example invokes a user-defined method associated with the current component interface object: ObjectDoMethod(%CompIntfcName. "Add". makes it visible. "C:\TEMP\TEST1.XLS"). ObjectDoMethod(&WORKBOOKS. names it. "PeopleCode Built-in Functions. Chapter 1. page 485 Enterprise PeopleTools 8. "Save". "PeopleCode Built-in Functions. at the time you're writing your PeopleCode program. Use this function when you're not certain. "PeopleCode Built-in Functions. "C:\TEMP\INVOICE." ObjectDoMethodArray. Copyright © 1988. 2009. "PeopleCode Built-in Functions. page 486.Application"). saves it. See Also Chapter 1. 485 . "Using Methods and Built-In Functions. page 488.XLT")." Using OLE Functions ObjectDoMethodArray Syntax ObjectDoMethodArray(Object_Name. how many parameters a method is going to require. &WORKAPP = CreateObject("Excel. Oracle and/or its affiliates. "Workbooks"). True).Chapter 1 PeopleCode Built-in Functions Example This simple example instantiates an Excel worksheet object. It can only be one-dimensional. "Visible". ObjectSetProperty(&WORKAPP. &inMethodName). Chapter 1. If you know the number of parameters.FIELDNAME.50 PeopleBook: PeopleCode Developer's Guide. use the ObjectDoMethod function instead.

PeopleCode Built-in Functions Chapter 1 Parameters Parameter Description Object_Name Method_Name Array_Of_Args Specify an already instantiated object on which the method is to be evaluated. either using CreateObject or another function or method that returns an object. 486 Copyright © 1988. "PeopleCode Built-in Functions. Chapter 1. Note. Specify an Array of Any containing the parameters for the method. "PeopleCode Built-in Functions. Returns Depends on the specified object and method if a result is returned or not. "Array Class" ObjectGetProperty Syntax ObjectGetProperty(obj_this. See Also Chapter 1. Default" OLE Automation object properties are not supported. page 152 and Chapter 1. page 149. "PeopleCode Built-in Functions. Oracle and/or its affiliates." Using OLE Functions Enterprise PeopleTools 8. Chapter 1. Specify the name of an exposed method for the object. 2009. "PeopleCode Built-in Functions." ObjectDoMethod. page 488." CreateObjectArray. All Rights Reserved. index_param_list]) Description Use the ObjectGetProperty function to return the value of a property str_property_name of the object obj_this." ObjectSetProperty. "Using Methods and Built-In Functions. Example &MyRslt = ObjectDoMethodArray(&MyObject.50 PeopleBook: PeopleCode API Reference. page 486. The object must have already been instantiated. . You must specify the object property that you want to retrieve explicitly. "PeopleCode Built-in Functions. "My-Method"." ObjectGetProperty. Chapter 1." CreateObject. &MyArray).str_property_name [. page 484 Enterprise PeopleTools 8.50 PeopleBook: PeopleCode Developer's Guide.

True).) str_property_name index_param_list Returns Returns an Any value equal to the value of the str_property_name property of the obj_this object." CreateObjectArray. &WORKAPP = CreateObject("Excel. Chapter 1. page 484. ObjectDoMethod(&WORKBOOKS. Cell2]) as Range In the following example. page 149. "PeopleCode Built-in Functions. (These parameters are only used with OLE/COM objects. 487 . &WORKBOOKS = ObjectGetProperty(&WORKAPP. A string containing the name of an exposed property of obj_this. makes it visible. names it. page 488.50 PeopleBook: PeopleCode Developer's Guide." ObjectDoMethodArray.Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description obj_this Specify an already instantiated object. "Save"." Using OLE Functions Copyright © 1988. the range is A1: &CELL = ObjectGetProperty(&SHEET. saves it." CreateObject.XLS"). "C:\TEMP\INVOICE. "PeopleCode Built-in Functions. All Rights Reserved. "Range". "Add". 2009.XLT").Application"). "A1")." ObjectSetProperty. "Using Methods and Built-In Functions. A comma-separated list for accessing an OLE automation object indexed property. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. "Workbooks"). Chapter 1. "C:\TEMP\TEST1. This variable must have been instantiated either with CreateObject or another function or method that creates objects. page 152 and Chapter 1. ObjectSetProperty(&WORKAPP. See Also Chapter 1. Example This simple example instantiates an Excel worksheet object. and displays its name. Excel Worksheets had an index property called Range that has the following signature: Property Range (Cell1 [. Chapter 1." ObjectDoMethod. Oracle and/or its affiliates. page 485 Enterprise PeopleTools 8. "PeopleCode Built-in Functions. /* This associates the⇒ INVOICE template w/the workbook */ ObjectDoMethod(&WORKAPP. "Visible".

A comma-separated list of parameters for accessing an OLE automation object indexed property.PeopleCode Built-in Functions Chapter 1 ObjectSetProperty Syntax ObjectSetProperty(obj_this. All Rights Reserved.XLS"). 488 Copyright © 1988. and displays its name.str_property_name.XLT"). &WORKAPP = CreateObject("Excel. "Save". either using CreateObject or another function or method that returns an object. &WORKBOOKS = ObjectGetProperty(&WORKAPP. ObjectSetProperty(&WORKAPP. 2009. Parameters Parameter Description obj_this Specify an already instantiated object. ObjectDoMethod(&WORKBOOKS. "Workbooks"). /* This associates the⇒ INVOICE template w/the workbook */ ObjectDoMethod(&WORKAPP.Application"). Default OLE Automation object properties are not supported. Oracle and/or its affiliates. "C:\TEMP\TEST1. str_property_name is set to this value. Note. makes it visible. True). index_param_list]) Description Use the ObjectSetProperty function to set the value of a property str_property_name of the object obj_this to val. "Add". saves it. names it. "Visible".val [. You must specify the object property that you want to set explicitly. A string containing the name of an exposed property of obj_this. The object must have already been instantiated.) str_property_name val index_param_list Returns None. . "C:\TEMP\INVOICE. (This is only used with COM/OLE objects. This variable must have been instantiated either with CreateObject or another function or method that creates objects. Example This simple example instantiates an Excel worksheet object.

then All returns False. None is the opposite of All. This function is used to validate that only one of a set of mutually exclusive fields has been given a value. "PeopleCode Built-in Functions." CreateObjectArray. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. that is.. or none of them have values. Chapter 1. "PeopleCode Built-in Functions. or a zero numeric value in a required numeric field is considered a Null value. All Rights Reserved. Use this in cases when a set of fields is both optional and mutually exclusive. [recordname. "PeopleCode Built-in Functions. page 485 Enterprise PeopleTools 8." Using OLE Functions OnlyOne Syntax OnlyOne(fieldlist) where fieldlist is an arbitrary-length list of fields in the form: [recordname." ObjectDoMethodArray. Checks if no more than one field in the set has a value.. 489 . OnlyOne returns False. Description Use the OnlyOne function to check a list of fields and return True if one and only one of the fields has a value. A blank character field. if the end-user puts can put a value into one field in a set of fields. page 486. Use this in cases where if an end-user fills in one field.]fieldname2] . Checks that a field or list of fields have no value.Chapter 1 PeopleCode Built-in Functions See Also Chapter 1. Related Functions All Checks to see if a field contains a value. If all of the fields are empty. or if all the fields in a list of fields contain values. page 149." CreateObject. or leave them all empty. page 484. Chapter 1. or if more than one of the fields has a value.]fieldname1 [. Chapter 1. If any of the fields is Null." ObjectDoMethod. Checks if either all the field parameters have values. she must all fill in the other related values. None AllOrNone OnlyOneOrNone Example You typically use OnlyOne as follows: Copyright © 1988. 2009. "Using Methods and Built-In Functions. page 152 and Chapter 1." ObjectGetProperty.50 PeopleBook: PeopleCode Developer's Guide. Oracle and/or its affiliates.

" AllOrNone. Use this in cases where if an end-user fills in one field. Checks that a field or list of fields have no value.PeopleCode Built-in Functions Chapter 1 If OnlyOne(param_one. or a zero numeric value in a required numeric field is considered a null value. page 475 and Chapter 1. then All returns False. param_two) Then value_a = "y".. End-if. None is the opposite of All. All Rights Reserved. page 57. Description Use the OnlyOneOrNone function to check a list of fields and return True if either of these conditions is true: • • Only one of the fields has a value. Checks if exactly one field in the set has a value. The end-user can leave all the fields blank or enter a value in one of the fields only. or if all the fields in a list of fields contain values.]fieldname1 [. Checks if either all the field parameters have values. A blank character field." All." OnlyOneOrNone.]fieldname2] . 2009.. If any of the fields is Null. [recordname. "PeopleCode Built-in Functions." None. she must fill in all the other related values. None AllOrNone OnlyOne 490 Copyright © 1988. page 56. See Also Chapter 1. "PeopleCode Built-in Functions. Oracle and/or its affiliates. None of the fields has a value. Chapter 1. This function is useful when you have a set of mutually exclusive fields in a page and the entire set of fields is optional. . "PeopleCode Built-in Functions. Chapter 1. "PeopleCode Built-in Functions. Use this when the end-user must fill in only one of a set of mutually exclusive fields. page 490 OnlyOneOrNone Syntax OnlyOneOrNone(fieldlist) where fieldlist is an arbitrary-length list of fields in the form: [recordname. or none of them have values. Related Functions All Checks to see if a field contains a value.

page 475 and Chapter 1. It returns an XmlDoc object that you must go through to find the status of the node. The PanelGroupChanged function is supported for compatibility with previous releases of PeopleTools. "PeopleCode Built-in Functions. Chapter 1." None. Chapter 1. See Also Chapter 1." OnlyOne. Copyright © 1988.Chapter 1 PeopleCode Built-in Functions Example You typically use OnlyOneOrNone as follows: If OnlyOneOrNone(param_one. "PeopleCode Built-in Functions. page 489 PanelGroupChanged Syntax PanelGroupChanged() Description Use the PanelGroupChanged function to determine whether a component has changed since the last save. 2009. Oracle and/or its affiliates. "PeopleCode Built-in Functions. 491 . All Rights Reserved. param_two) Then value_a = "y". Note. page 57. New applications should use the ComponentChanged function instead." ComponentChanged." AllOrNone. "PeopleCode Built-in Functions. "PeopleCode Built-in Functions. page 104 PingNode Syntax PingNode(MsgNodeName) Description Use the PingNode function to ping the specified node. whether by the user or by PeopleCode. page 56. End-if." All. See Also Chapter 1.

&ErrorInfo = PingNode("TESTNODENAME").Len &MsgNode = &MsgNodeArray [&M]. &Root = &ErrorInfo.PeopleCode Built-in Functions Chapter 1 Parameters Parameter Description MsgNodeName Specify the name of the message node you want to ping.50 PeopleBook: PeopleCode API Reference.50 PeopleBook: PeopleCode API Reference. Returns An XmlDoc object. End-If.50 PeopleBook: PeopleSoft Integration Broker. End-For. If &MsgText <> "Success (117. &MsgNodeArray = &Root. Oracle and/or its affiliates. Example Local XmlDoc &ErrorInfo. "Managing Messages" PriorEffDt Syntax PriorEffDt(field) Description Use the PriorEffDt function to return the value of the specified field from the record with the prior effective date. The node in the XmlDoc object with the name of status contains information about the node you pinged. 492 Copyright © 1988. "Message Classes" Enterprise PeopleTools 8.FindNode("status"). For &M = 1 To &MsgNodeArray. &MsgText = &MsgNode. as a string.50 PeopleBook: PeopleCode API Reference. See Also Enterprise PeopleTools 8. "XmlDoc Class" Enterprise PeopleTools 8.GetElementsByTagName("msgnode"). . This function is valid only for effective-dated records.DocumentElement.NodeValue. 2009. All Rights Reserved. "Array Class" Enterprise PeopleTools 8.73)" Then Error ("Web Server not available for web service").

"PeopleCode Built-in Functions.fetch_field) Copyright © 1988. End-If. If a prior record does not exist.⇒ Beschäftigungsgradänderungen sind nur zum ersten eines Monats zulässig. if there is an effective-sequence number. All Rights Reserved. page 469. "PeopleCode Built-in Functions." PriorRelEffDt. Oracle and/or its affiliates. page 470 and Chapter 1. Chapter 1.") End-If. "Pay Rate Change action is chosen and Pay⇒ Rate has not been changed." NextRelEffDt. the statement is skipped and execution begins with the next top-level statement. page 493 PriorRelEffDt Syntax PriorRelEffDt(search_field. In the following example. Therefore. 27. that is. "Demotion Action is chosen and Pay Rate has⇒ not been decreased. Break. End-if. 2009."). 8. "PeopleCode Built-in Functions. See Also Chapter 1. 493 ." NextEffDt. the statement is skipped.Chapter 1 PeopleCode Built-in Functions If the record contains an effective sequence number field. When-other End-evaluate. /* if PriorEffdt fails. End-if. the value of this field is compared along with the effective-date field when the prior effective date/effective record sequence is determined. if it's contained with a compound statement or a loop. execution skips to the top If statement: If ACTION <> "REH" Then /* skip to here if PriorEffdt fails to find prior record⇒ */ If STD_HOURS <> PriorEffdt(STD_HOURS) And Day(EFFDT) <> 1 Then Error MsgGet(30000. it's possible that the effective-date field will be the same as the current record. When = "DEM" If ANNUAL_RT >= PriorEffdt(ANNUAL_RT) Then Warning MsgGet(1000. "Meldung nicht vorhanden . WinMessage("This message appears after executing either of the BREAK⇒ statements or after all WHEN statements are false"). 29. end-if. If the PriorEffDt function is not a top-level statement. run to here directly */ Example If CURRENCY_CD = PriorEffdt(CURRENCY_CD) Then Evaluate ACTION When = "PAY" If ANNUAL_RT = PriorEffdt(ANNUAL_RT) Then Warning MsgGet(1000. but the sequence number would be earlier.WAZ bzw.").

page 492 PriorValue Syntax PriorValue(fieldname) Description Use the PriorValue function in FieldEdit and FieldChange PeopleCode to obtain the prior value of a buffer field that the user just changed. 2009. PriorValue gives correct results only in FieldEdit and FieldChange PeopleCode. For correct results. Chapter 1. It returns the value that was in the buffer field before the user changed it. All Rights Reserved. if it's contained within a compound statement or a loop.PeopleCode Built-in Functions Chapter 1 Description Use the PriorRelEffDt function to locate the prior occurrence of the search_field with the prior effective date (and effective-sequence number if specified)." NextRelEffDt. See Also Chapter 1. "PeopleCode Built-in Functions. . Parameters Parameter Description fieldname The name of the record field. not the value of the field the last time the component was saved. Typically. that is. this function is used to retrieve values for related display fields. This function is valid only for effective-dated records. Returns Returns an Any value equal to the value that was in the current buffer field immediately prior to the last edit. then return the value of the specified fetch_field corresponding to the search_field." NextEffDt. Oracle and/or its affiliates. and only for the buffer field where the function is executing. "PeopleCode Built-in Functions. the statement is skipped and execution restarts with the next top-level statement. If the PriorRelEffDt function isn't a top-level statement. it returns the current value of the buffer field. The return value is an Any data type. page 469. "PeopleCode Built-in Functions. not the prior value. If you pass another field name to the function. If a prior record does not exist." PriorEffDt. this must be the name of the field where the call to PriorValue executes. page 470 and Chapter 1. 494 Copyright © 1988. then the statement is skipped.

TOTAL_AMT &PRIOR) + QUANTITY. See Also Chapter 1. n2].0.heading. Returns Returns a Number value equal to the product of the numbers in numlist. 2009.80.3). page 259 Prompt Syntax Prompt(title. Description Use the Product function to multiply all the numbers in numlist and returns the product as a Number data type. See Also Chapter 1." Fact. . {fieldlist | &Record}) Copyright © 1988. Example The example sets &N2 to 96: &N2 = Product(4. page 169 Product Syntax Product(numlist) where numlist is an arbitrary-length list of numbers in the form n1 [. or expression. Oracle and/or its affiliates. "PeopleCode Built-in Functions.TOTAL_AMT = (DERIVED_TEST. . variable. All Rights Reserved. 495 . The numbers in the list can be any number expressed as a number.Chapter 1 PeopleCode Built-in Functions Example The following example from FieldChange PeopleCode gets the prior value of a field: &PRIOR = PriorValue(QUANTITY)." CurrentRowNumber. "PeopleCode Built-in Functions. DERIVED_TEST.

if a tempvar for that field is provided in the function call. or into a temporary variable. Description Use the Prompt function to display a page prompting the user to insert values into one or more text boxes. Prompt should also not be called in any PeopleCode event that fires as a result of a ScrollSelect or its relatives." Think-Time Functions Parameters Parameter Description title heading Used as the title for the page. Note that the label parameter is required before the temporary variable. Prompt is a think-time function. When the prompt page is displayed. or a Select (or one of its relatives) Rowset class method. This is primarily used with the Query classes. "Using Methods and Built-In Functions. Displayed in the page above the fields. If a zero-length string ("") is passed. tempvar1]] [. 2009. label1 [.PeopleCode Built-in Functions Chapter 1 where fieldlist is an arbitrary-length list of fields in the form: field1 [. All Rights Reserved. or a Select Rowset class method or its relatives.50 PeopleBook: PeopleCode Developer's Guide. See Also Enterprise PeopleTools 8. . label2 [. to prompt the end-user for the prompt values of a query. any entered values are discarded and the function returns False. when running a query. Prompt can also take a record object. then if the user clicks OK. field2 [. tempvar2]]]. The user can change the values in the text boxes. Oracle and/or its affiliates. the values are placed either into the buffer for the appropriate field. 496 Copyright © 1988. the heading line is omitted in the page. and as such cannot be used during the PeopleCode attached to the following events: • • • • • SavePreChange Workflow RowSelect SavePostChange Any PeopleCode event that fires as a result of a ScrollSelect (or one of its relatives) function calls. the text boxes are initially filled with default values from the fields in fieldlist... If the user cancels the page.

each field in the list consists of a [recordname. The label parameter is required if you supply the temporary variable parameter. the form [recordname.]fieldname. "". you can also specify an already instantiated and populated record object. and places the result into FISCAL_YEAR field: Prompt(MsgGetText(5000. 182. The following code is in the USA push button FieldChange PeopleCode. 184. 497 .PERSONAL_DATA1 /* Administer Global Personnel .Chapter 1 PeopleCode Built-in Functions Parameter Description fieldlist | &Record A list of one or more fields.] fieldname followed by an optional label and an optional temporary variable for storing the input value. the value is placed into the buffer for the field specified. Optional temporary variable to receive the user-entered value. True if the user clicks the OK button. and calls for the single field as shown in the page. " "). When = PAGE. 2009. FISCAL_YEAR). If this parameter is omitted. If this parameter is omitted. Using a temp variable enables the PeopleCode program to inspect and process the entered value without affecting the buffer contents. Break. using calls to the MsgGetText function to retrieve values for the window title and prompt. tempvar Returns Optionally returns a Boolean value: • • False if the user clicks the Cancel button. the field RFT Long value is used.SSN). MsgGetText(5000. field label The name of the field being prompted for. PERSONAL_DATA. To following example places the results of the prompt into a temporary variable: Prompt("Change Voucher". "".USA Flag Btn on PERSONAL_DATA1 Page */ Prompt("US Social Security Number". &NEW_VOUCHER_ID). This parameter is required before the tempvar parameter. "Change Voucher ID to". VOUCHER_ID. Optional label for the prompted field. Example The following example prompts for a single field. All Rights Reserved. Oracle and/or its affiliates. " "). Instead of a list of fields. Proper Syntax Proper(string) Copyright © 1988.

Lang". &BADKD = Proper("k. .50 PeopleBook: PeopleCode API Reference. page 450 and Chapter 1. 2009. Punctuation and other characters that have no case sensitivity are not changed. This function has been deprecated and remains for backward compatibility only. Node.Message.PeopleCode Built-in Functions Chapter 1 Description Use the Proper function to capitalize the first letter in a text string and any other letters in a text string that follow any character other than another letter. you need to define a Message object with a hierarchical structure and migrate the data in the XmlDoc object into the Message object. The XmlDoc object must already be instantiated and populated. "PeopleCode Built-in Functions. Note. D." Upper. If you want to handle an XmlDoc as a Message object. "PeopleCode Built-in Functions. All Rights Reserved. one that isn't based on a hierarchical record structure. use the GetMessageXmlDoc builtin function. that is. It also converts all other letters in a text string to lowercase. Oracle and/or its affiliates. The message included in the function call should be an unstructured message." Lower. Use the IntBroker class Publish method instead. LANG") See Also Chapter 1.MessageName [." Publish 498 Copyright © 1988. page 679 PublishXmlDoc Syntax PublishXmlDoc(&XmlDoc.NodeName]) Description Use the PublishXmlDoc function to send an asynchronous message that is based on an XmlDoc object. See Also Enterprise PeopleTools 8. Example The example sets the value of &BADKD to "K. Returns Returns a String value with the first character of each word capitalized. If you want to retrieve an XmlDoc message that was sent asynchronously. "Message Classes. d.

then it may be difficult to anticipate which application server machine will be expected to have the specified file.Chapter 1 PeopleCode Built-in Functions Parameters Parameter Description &XmlDoc Specify an already instantiated and populated XmlDoc object that you want to send as an asynchronous message. False otherwise. Node. "PeopleCode Built-in Functions. LocalDirEnvVar[. . All Rights Reserved. 2009." GetMessageXmlDoc. Note. prefixed with the reserved word Node. See Also Chapter 1. page 357 and Chapter 1. Note that it is the responsibility of the calling PeopleCode program to store the specified file name for further use. PreserveCase[. 499 . . "PeopleCode Built-in Functions. Example Local XmlDoc &MyDoc. MessageName NodeName Returns A Boolean value: True if the message was successfully published.MyNode). If the specified destination subdirectories do not exist this function tries to create them. PublishXmlDoc(&MyDoc. Specify an already existing nonrowset-based message. Specify a node. This is for Sender Specified Routing (SSR). AllowLargeChunks]]]) Description Use the PutAttachment function to upload a file from the file system of the application server machine to a specified storage destination (either an FTP server or a database table). Copyright © 1988. Oracle and/or its affiliates.LocalFile[." SyncRequestXmlDoc.MyXmlMessage. If the web server load-balances via Jolt session pooling. prefaced with the reserved word Message.SysFileName. . Message. page 631 PutAttachment Syntax PutAttachment(URLDestination. The node defines the target for the published message.

The default FTP port is 21. in the form of: protocol://FTP_user_ID:FTP_password@FTP_server_address/path where protocol is "ftp" or "ftps". Database Storage Considerations If your storage destination is a database table. "Using File Attachments and PeopleCode. If the specified destination subdirectories do not exist." Using Attachment Functions. "Using PeopleTools Utilities. FTP_server_address is the FTP server's name or its IP address. See Enterprise PeopleTools 8.URLname • A string. URLDestination will be either of the following: • A URL definition.PeopleCode Built-in Functions Chapter 1 FTP Server Storage Considerations If your storage destination is a file server. URLDestination will be either of the following: • A URL definition. The length of the full URL is limited to 254 characters. See Enterprise PeopleTools 8. If you want to use a different port you must specify it in the URL. The FTP password to is limited to 16 characters. The following limitations apply to the FTP URL: • • The FTP user name to is limited to 30 characters. . Oracle and/or its affiliates. 2009. in the form of: URL.com:6000/ Note. this function tries to create them. in the form of: URL. URLDestination must be a URL definition.URLname • A string. SFTP is not supported. All Rights Reserved. For example: ftp://user:password@ftpserver." Adding Secure FTP (FTPS) URLs. 500 Copyright © 1988.50 PeopleBook: PeopleCode Developer's Guide. and path is the path on the FTP server relative to the directory specified as the FTP server's root.50 PeopleBook: System and Server Administration. If the file is transferred using secure FTP (FTPS). as part of FTP_server_address.peoplesoft. in the form of: record://MYRECORD where MYRECORD is the record associated with a storage destination table.

So. "_"). "_").Chapter 1 PeopleCode Built-in Functions User Filenames for PutAttachment Generally. Substitute(&SAVEDFILENAME.50 PeopleBook: PeopleCode Developer's Guide. Substitute(&SAVEDFILENAME. "&". the following characters are replaced with an underscore: • • • • • • • • (space) . "_"). • • • • • • * (asterisk) : (colon) " (quotation mark) < (less than symbol) > (greater than symbol) ? (question mark) When the file is transferred. "_"). Substitute(&SAVEDFILENAME. "_"). ". 2009. the only way for this program to ensure that it is saving the correct name is to either avoid using special characters in the destination file name or to simulate the conversion process in something like the following example: &SAVEDFILENAME &SAVEDFILENAME &SAVEDFILENAME &SAVEDFILENAME &SAVEDFILENAME &SAVEDFILENAME &SAVEDFILENAME &SAVEDFILENAME &SAVEDFILENAME = = = = = = = = = Substitute(&ORIGFILENAME. Oracle and/or its affiliates. Substitute(&SAVEDFILENAME.". a PeopleCode program that calls PutAttachment will also need to save (for later use) the name of each uploaded file as it ended up actually being named at the specified destination. Substitute(&SAVEDFILENAME. " ". "_"). "_"). The actual error message can be found in the logs. "%". Substitute(&SAVEDFILENAME. "#". (semicolon) + (plus sign) % (percent sign) & (ampersand) ' (apostrophe) ! (exclamation point) # (pound sign) Copyright © 1988. All Rights Reserved. "_"). 501 . Substitute(&SAVEDFILENAME. However. "Using File Attachments and PeopleCode. See Enterprise PeopleTools 8. the process will be stopped and an error (%Attachment_Failed) will be returned to user. "'". "!". "$". File Name Considerations If the local source file name has any of the following characters. "_"). the destination file name (which may have been converted as described following) is not passed back to this PeopleCode program. Substitute(&SAVEDFILENAME." Using File Attachments in Applications. "+".

PeopleCode Built-in Functions

Chapter 1

$ (dollar sign)

Note. In general, you should exercise caution when using an '@' or ':' character in the name of a file selected for uploading or in the value of the URLDestination or DirAndFileName parameter. Of course, the ':' character must to be used as a delimiter between the FTP user ID and the FTP password or just before the FTP port number (if one is specified), and the '@' character must be used as a delimiter between the FTP password and the FTP server address. Considerations Attaching Text Files The PeopleCode file attachment functions do not provide text file conversions when files are attached or viewed. In fact, when any file is uploaded, it is always copied to the specified destination byte-for-byte Warning! You may encounter problems when a text file is uploaded from one operating system or environment and then later viewed on another. For instance, suppose a text file on a DB2 system is encoded in EBCDIC. A user viewing that file in a Windows environment might see garbled content because the text file viewer is expecting ANSI encoding. Similar issues can occur when two file systems have different character sets, such as Japanese JIS and Unicode, or different line endings. It is the developer's responsibility to manage this issue in their environments. A number of text file conversion utilities are available for various platforms. Some steps you can take to avoid conversion problems include: • • • • Educate your users. Standardize on file formats and encodings. Make sure that the user's environment supports the files being transferred. Restrict attachments to file types that are known to be compatible across user platforms.

File System Considerations If you are uncertain which type of file system the file is going to be transferred to, either a Unix or Windows system, you should simply specify a file name for the third parameter and either explicitly set the fourth parameter (LocalDirEnvVar) or accept its default value of "TMP ". The following code example works for Windows systems, but not Unix systems:
PutAttachment(&FTPINFO, &TARGETFILENAME, "c:tempresume.doc");

The following code example works for Unix systems, but not Windows systems:
PutAttachment(&FTPINFO, &TARGETFILENAME, "/tmp/resume.doc");

The following two examples work for both Windows and Unix systems:
PutAttachment(&FTPINFO, &TARGETFILENAME, "resume.doc", "TMP"); PutAttachment(&FTPINFO, &TARGETFILENAME, "resume.doc", "PS_CFG_HOME");

502

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

Chapter 1

PeopleCode Built-in Functions

Virus Scanning Files uploaded using the AddAttachment function can be scanned for viruses. Files uploaded using the PutAttachment function cannot be scanned for viruses. See Chapter 1, "PeopleCode Built-in Functions," AddAttachment, page 37.

Parameters
Parameter Description

URLDestination

A reference to a URL. This can be either a URL name, in the form URL. URLName, or a string. This (along with the corresponding SysFileName) indicates a file's destination location. Note. The URLDestination parameter requires forward slashes (/). Backward slashes (\) are not supported for this parameter. Also, the destination directory specified by a full FTP URL will be taken to be relative to the FTP root directory (which may not be the same as the root directory of the FTP server machine). If the file is transferred using secure FTP (FTPS), URLSource must be a URL definition. See Enterprise PeopleTools 8.50 PeopleBook: System and Server Administration, "Using PeopleTools Utilities," Adding Secure FTP (FTPS) URLs.

SysFileName

The relative path and filename of the file on the storage destination. This is appended to URLDestination to make up the full URL where the file is transferred to. This parameter takes a string value. Note. The URLDestination parameter requires forward slashes (/). Backward slashes (\) are not supported for either the URLDestination or the SysFileName parameter.

LocalFile

The name, and possible full path, to the destination file on the application server. This is where the file is transferred from. This parameter takes a string value. If you only specify a file name, the file is assumed to be in the directory specified by the TMP environment variable or the directory specified by LocalDirEnvVar. If the file is not in the TMP directory and you do not specify LocalDirEnvVar you must use the full path name as appropriate to the operating system (that is, on Unix use "/"). Note. You cannot specify a file name greater than 64 characters.

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

503

PeopleCode Built-in Functions

Chapter 1

Parameter

Description

LocalDirEnvVar

If LocalDirEnvVar is specified, then the value of this environment variable will be prepended to the value of the LocalFile parameter to form the full-path name that the downloaded file will have at its destination on the application server machine. If LocalDirEnvVar is not specified and the value of the LocalFile parameter is a full-path file name, then that value will itself be used as the full-path name that the downloaded file will have at its destination on the application server machine. If LocalDirEnvVar is not specified and the value of the LocalFile parameter is not a full-path file name, then the value of the TMP environment variable will be prepended to the value of the LocalFile parameter to form the full-path name that the downloaded file will have at its destination on the application server machine. Use this if you do not wish to hard-code the full-path name the downloaded file will have at its destination on the application server machine. Note. Do not specify LocalDirEnvVar if you use an absolute path for the LocalFile parameter. In order to use the optional parameter PreserveCase you must pass some value for LocalDirEnvVar. If you want to use the default behavior of LocalDirEnvVar and also use PreserveCase you can specify "" (the empty string) for LocalDirEnvVar. Then the function behaves as if no value is specified. This parameter takes a string value. Note. Only operating system environment variables are recognized with this parameter, rather than variables defined in configuration files.

PreserveCase

Specify a Boolean value to indicate whether the case of the extension of the userselected file is preserved or not; True, preserve the case, False, convert the filename extension to all lower case letters. The default value is False. Warning! If you use the PreserveCase parameter, it is important that you use it in a consistent manner with all the relevant file-processing functions or you may encounter unexpected file-not-found errors.

504

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

Chapter 1

PeopleCode Built-in Functions

Parameter

Description

AllowLargeChunks

Specify a Boolean value to indicate whether to allow large chunks. If the value specified in the Maximum Attachment Chunk Size field on the PeopleTools Options page is larger than is allowed for retrieval, then the system breaks the file upload into the largest sized chunks allowed. See Enterprise PeopleTools 8.50 PeopleBook: System and Server Administration, "Using PeopleTools Utilities," PeopleTools Options. If AllowLargeChunks is set to True, this behavior can be overridden, so that it is possible for a user to upload a file in chunks that are too large for the system to retrieve. Note. If the chunks are too big to be retrieved, then any file retrieval built-in function, such as GetAttachment, will fail. If AllowLargeChunks is set to False the system will use the largest size chunk that is allowed for retrieval. Note. The AllowLargeChunks parameter is only applicable to attachments stored in the database. It has no impact on FTP attachments, as those attachments are never chunked. This is an optional parameter. The default value is False.

Returns
You can check for either an integer or a constant value:
Numeric Value Constant Value Description

0

%Attachment_Success

File was transferred successfully.

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

505

PeopleCode Built-in Functions

Chapter 1

Numeric Value

Constant Value

Description

1

%Attachment_Failed

File transfer failed due to unspecified error. The following are some possible situations where %Attachment_Failed could be returned:

• • • • • •
3 %Attachment_FileTransferFailed

Failed to initialize the process due to some internal error. Failed due to unexpected/bad reply from server. Failed to allocate memory due to some internal error. Failed due to timeout. Failed due to non-availability of space on FTP server. Failed to close SSL connection.

File transfer failed due to unspecified error during FTP attempt. The following are some possible situations where %Attachment_FileTransferFailed could be returned:

• • • • • •

Failed due to mismatch in file sizes. Failed to write to local file. Failed to store the file on remote server. Failed to read local file to be uploaded No response from server. Failed to overwrite the file on remote server.

4

%Attachment_NoDiskSpaceAppServ No disk space on the application server.

506

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

Chapter 1

PeopleCode Built-in Functions

Numeric Value

Constant Value

Description

7

%Attachment_DestSystNotFound

Cannot locate destination system for FTP. The following are some possible situations where %Attachment_DestSystNotFound could be returned:

• •

Improper URL format. Failed to connect to server mentioned.

8

%Attachment_DestSysFailedLogin

Unable to login to destination system for FTP. The following are some possible situations where %Attachment_DestSysFailedLogin could be returned:

• • • • • • • •
9 %Attachment_FileNotFound

Unsupported protocol mentioned. Access denied to server. Failed to connect using SSL Failed to verify the certificates. Failed due to problem in certificates used. Could not authenticate the peer certificate. Failed to login with specified SSL level. Remote server denied logon. Problem reading SSL certificate .

Cannot locate file. The following are some possible situations where %Attachment_FileNotFound could be returned:

• •
12 %Attachment_FileNameTooLong

Remote file not found. Failed to read remote file.

File transfer failed because name of selected file is too long. Maximum is 64 characters.

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

507

PeopleCode Built-in Functions

Chapter 1

Example
The following uploads the file, HRarchive/NewHire/11042000resume.txt, to the FTP server from c:\NewHires\resume.txt on the application server machine.
&retcode = PutAttachment("ftp://anonymous:hobbit1@ftp.ps.com/HRarchive/", "NewHire⇒ /11042000resume.txt", " "C:\NewHires\resume.txt".");

See Also Chapter 1, "PeopleCode Built-in Functions," AddAttachment, page 37; Chapter 1, "PeopleCode Built-in Functions," CopyAttachments, page 124; Chapter 1, "PeopleCode Built-in Functions," DeleteAttachment, page 191; Chapter 1, "PeopleCode Built-in Functions," DetachAttachment, page 207; Chapter 1, "PeopleCode Built-in Functions," GetAttachment, page 326 and Chapter 1, "PeopleCode Built-in Functions," ViewAttachment, page 682 Enterprise PeopleTools 8.50 PeopleBook: PeopleCode Developer's Guide, "Using File Attachments and PeopleCode," Using File Attachments in Applications

Quote
Syntax
Quote(String)

Description
Use the Quote function to enclose a string in single quotation marks. This function also can be used to put quotation marks around SQL statements.

Parameters
Parameter Description

String

Specify the string you want to enclose in single quotation marks.

Returns
The string specified by String enclosed in single quotation marks.

Example
The following code returns 'Bob':
&QuotedString = Quote("Bob");

508

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

Chapter 1

PeopleCode Built-in Functions

The following code returns 'Bob''s' (two single quotes to represent the apostrophe)
&QuotedString = Quote("Bob's");

The following code returns '%'' OR USER ID LIKE ''%':
&QuotedString = Quote("%' OR USERID LIKE '%");

Radians
Syntax
Radians(angle)

Description
Use the Radians function to convert the given angle from degree measurement to radian measurement.

Parameters
Parameter Description

angle

The size of an angle in degrees.

Returns
The size of the given angle in radians.

Example
The following example returns the equivalent size in radians of an angle measuring 65.5 degrees:
&RADIAN_SIZE = Radians(65.5);

The following example returns the value of pi, that is, 180 degrees expressed as radians:
&PI = Radians(180);

Note. This example represents pi with a high degree of accuracy, but no computer system can represent irrational numbers exactly. Thus, the results of extended calculations based on pi have the potential for a cumulative reduction in precision.

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

509

PeopleCode Built-in Functions

Chapter 1

See Also Chapter 1, "PeopleCode Built-in Functions," Acos, page 35; Chapter 1, "PeopleCode Built-in Functions," Asin, page 60; Chapter 1, "PeopleCode Built-in Functions," Atan, page 61; Chapter 1, "PeopleCode Built-in Functions," Cos, page 134; Chapter 1, "PeopleCode Built-in Functions," Cot, page 135; Chapter 1, "PeopleCode Built-in Functions," Degrees, page 190; Chapter 1, "PeopleCode Built-in Functions," Sin, page 610 and Chapter 1, "PeopleCode Built-in Functions," Tan, page 632

Rand
Syntax
Rand( )

Description
Use the Rand function to generate a random number greater than or equal to 0 and less than 1. To generate a random integer that is greater than or equal to 0 but less than x, use Int(Rand()*x).

Returns
Returns a random Number value greater than or equal to 0 and less than 1.

Example
The example sets &RANDOM_NUM to a random value less than 100.
&RANDOM_NUM = Int(Rand( )*100)

See Also Chapter 1, "PeopleCode Built-in Functions," Int, page 423

RecordChanged
Syntax
The syntax of the RecordChanged function varies, depending on whether you use a scroll path reference or a contextual reference to designate the row being tested. Using a scroll path reference, the syntax is:
RecordChanged(scrollpath, target_row)

where scrollpath is:

510

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

Chapter 1

PeopleCode Built-in Functions

[RECORD.level1_recname, level1_row, [RECORD.level2_recname, level2_row,]] RECORD.target_recname

To prevent ambiguous references, you can also use SCROLL.scrollname, where scrollname is the same as the scroll level's primary record name. Using a contextual reference the syntax is:
RecordChanged(RECORD.target_recname)

A contextual reference specifies the current row on the scroll level designated by RECORD.target_recname. An older construction, in which a record field expression is passed, is also supported. The record field is any field in the row where the PeopleCode program is executing (typically the one on which the program is executing).
RecordChanged(recordname.fieldname)

Description
Use the RecordChanged function to determine whether the data in a specific row has been modified since it was retrieved from the database either by the user or by a PeopleCode program. Note. This function remains for backward compatibility only. Use the IsChanged record class property instead. This is useful during save processing for making updates conditional on whether rows have changed. Note. The word "record" is used in this function name in a misleading way. Remember that this function (like the related functions RecordDeleted and RecordNew) checks the state of a row, not a record. See Also Enterprise PeopleTools 8.50 PeopleBook: PeopleCode API Reference, "Record Class," IsChanged and Enterprise PeopleTools 8.50 PeopleBook: PeopleCode API Reference, "Row Class," DeleteEnabled Enterprise PeopleTools 8.50 PeopleBook: PeopleCode Developer's Guide, "Accessing the Data Buffer" Enterprise PeopleTools 8.50 PeopleBook: PeopleCode Developer's Guide, "Referencing Data in the Component Buffer," Specifying Data with References Using Scroll Path Syntax and Dot Notation Enterprise PeopleTools 8.50 PeopleBook: PeopleCode Developer's Guide, "Referencing Data in the Component Buffer," Understanding Current Context

Parameters
Parameter Description

scrollpath

A construction that specifies a scroll level in the component buffer.

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

511

PeopleCode Built-in Functions

Chapter 1

Parameter

Description

RECORD.target_recname

The primary scroll record of the scroll level where the row being referenced is located. As an alternative, you can use SCROLL.scrollname.

Returns
Returns a Boolean value: • • True if any data in the target row has been changed. False if no data in the target row has been changed.

Example
This example shows a RecordChanged call using a contextual reference:
If RecordChanged(RECORD.BUS_EXPENSE_DTL) Then WinMessage("Changed row msg from current row.", 64); End-If;

The following example, which would execute on level one, checks rows on level two to determine which have been changed:
For &I = 1 To ActiveRowCount(RECORD.BUS_EXPENSE_PER, CurrentRowNumber(1),⇒ RECORD.BUS_EXPENSE_DTL); If RecordChanged(RECORD.BUS_EXPENSE_PER, CurrentRowNumber(1), RECORD.BUS_⇒ EXPENSE_DTL, &I) Then WinMessage("Changed row message from level one.", 64); End-If; End-For;

See Also Chapter 1, "PeopleCode Built-in Functions," FieldChanged, page 263; Chapter 1, "PeopleCode Built-in Functions," RecordDeleted, page 512 and Chapter 1, "PeopleCode Built-in Functions," RecordNew, page 515

RecordDeleted
Syntax
The syntax of the RecordDeleted function varies, depending on whether you use a scroll path reference or a contextual reference to designate the row being tested. Using a scroll path reference, the syntax is:
RecordDeleted(scrollpath, target_row)

where scrollpath is:

512

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

Chapter 1

PeopleCode Built-in Functions

[RECORD.level1_recname,level1_row, [RECORD.level2_recname,level2_row,]] RECORD. target_recname

To prevent ambiguous references, you can also use SCROLL.scrollname, where scrollname is the same as the scroll level's primary record name. Using a contextual reference the syntax is:
RecordDeleted(RECORD.target_recname)

A contextual reference specifies the current row on the scroll level designated by RECORD.target_recname. An older construction, in which a record field expression is passed, is also supported. The record field is any field in the row where the PeopleCode program is executing (typically the one on which the program is executing).
RecordDeleted(recordname.fieldname)

Description
Use the RecordDeleted function to verify if a row of data has been marked as deleted, either by an end-user row delete (F8) or by a call to DeleteRow. Note. This function remains for backward compatibility only. Use the IsDeleted record class property instead. RecordDeleted is useful during save processing to make processes conditional on whether a row has been deleted. Deleted rows are not actually removed from the buffer until after the component has been successfully saved, so you can check for deleted rows all the way through SavePostChange PeopleCode. RecordDeleted is not typically used in a loop, because it is easier to put it on the same scroll level as the rows being checked in SavePreChange or SavePostChange PeopleCode: these events execute PeopleCode on every row in the scroll, so no looping is necessary. Note. To avoid confusion, note that this function (like the related functions RecordChanged and RecordNew) checks the state of a row, not a record. See Also Enterprise PeopleTools 8.50 PeopleBook: PeopleCode API Reference, "Record Class," IsDeleted and Enterprise PeopleTools 8.50 PeopleBook: PeopleCode API Reference, "Row Class," IsDeleted Enterprise PeopleTools 8.50 PeopleBook: PeopleCode Developer's Guide, "Accessing the Data Buffer" Enterprise PeopleTools 8.50 PeopleBook: PeopleCode Developer's Guide, "Referencing Data in the Component Buffer," Specifying Data with References Using Scroll Path Syntax and Dot Notation Enterprise PeopleTools 8.50 PeopleBook: PeopleCode Developer's Guide, "Referencing Data in the Component Buffer," Understanding Current Context

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

513

PeopleCode Built-in Functions

Chapter 1

Parameters
Parameter Description

scrollpath RECORD.target_recname

A construction that specifies a scroll level in the component buffer. The primary scroll record of the scroll level where the row being referenced is located. As an alternative, you can use SCROLL.scrollname.

Returns
Returns a Boolean value: • • True if the target row has been deleted. False if the target row has not been deleted.

Example
This example shows a RecordDeleted call using a contextual reference
If RecordDeleted(RECORD.BUS_EXPENSE_DTL) Then WinMessage("Deleted row msg from current row.", 64); End-If;

The following example, which would execute on level zero, checks rows on level one to determine which have been deleted:
For &I = 1 To TotalRowCount(RECORD.BUS_EXPENSE_PER, CurrentRowNumber(1),⇒ RECORD.BUS_EXPENSE_DTL); If RecordDeleted(RECORD.BUS_EXPENSE_PER, CurrentRowNumber(1), RECORD.BUS_⇒ EXPENSE_DTL, &I) Then WinMessage("Deleted row message from level one.", 64); End-If; End-For;

Note that the loop is delimited by TotalRowCount. For loops delimited by ActiveRowCount don't process deleted rows. See Also Chapter 1, "PeopleCode Built-in Functions," FieldChanged, page 263; Chapter 1, "PeopleCode Built-in Functions," RecordChanged, page 510; Chapter 1, "PeopleCode Built-in Functions," RecordNew, page 515; Chapter 1, "PeopleCode Built-in Functions," TotalRowCount, page 640 and Chapter 1, "PeopleCode Built-in Functions," ActiveRowCount, page 36

514

Copyright © 1988, 2009, Oracle and/or its affiliates. All Rights Reserved.

Chapter 1

PeopleCode Built-in Functions

RecordNew
Syntax
The syntax of the RecordNew function varies, depending on whether you use a scroll path reference or a contextual reference to designate the row being tested. Using a scroll path reference, the syntax is:
RecordNew(scrollpath, target_row)

where scrollpath is:
[RECORD.level1_recname,level1_row, [RECORD.level2_recname,level2_row,]] RECORD. target_recname

To prevent ambiguous references, you can also use SCROLL.scrollname, where scrollname is the same as the scroll level's primary record name. Using a contextual reference the syntax is:
RecordNew(RECORD.target_recname)

A contextual reference specifies the current row on the scroll level designated by RECORD.target_recname. An older construction, in which a record field expression is passed, is also supported. The record field is any field in the row where the PeopleCode program is executing (typically the one on which the program is executing).
RecordNew(recordname.fieldname)

Description
Use the RecordNew function to check a specific row to determine whether it was added to the component buffer since the component was last saved. Note. This function remains for backward compatibility only. Use the IsNew row class property instead. This function is useful during save processing to make processes conditional on whether or not a row is new. Note. To avoid