statementblock If the expression is True Siebel eScript runs the statement or

Statementblock if the expression is true siebel

This preview shows page 68 - 72 out of 334 pages.

statement_block If the expression is: True. Siebel eScript runs the statement or statement_block. False. Siebel eScript skips the statement or statement_block.
Image of page 68
Statements Reference Siebel eScript Language Reference Version 8.1, Rev. A 69 TheApplication().RaiseErrorText ("Original i was at least 10, and has now been decremented by 5."); } This example includes an else clause in an If statement. This If statement tests for multiple conditions. Example The following example includes an else clause: if ( i < 10 ) { TheApplication().RaiseErrorText("i is less than 10.") } else if ( i > 10 ) { TheApplication().RaiseErrorText("i is greater than 10."); } else { TheApplication().RaiseErrorText("i is 10."); } For another example, see “Set Time Method” on page 140 . Related Topics For more information, see “Switch Statement” on page 69 . Switch Statement The Switch statement makes a decision according to the value of a variable or expression. It chooses among alternatives when each choice depends on the value of a single variable. Siebel eScript does the following: 1 Evaluates the switch_variable argument. 2 Compares the values in the Case statements and then does one of the following depending on if it finds a match: Finds a match. Runs the statement block that follows the Case statement whose value matches the value in the switch_variable argument. It runs until it reaches the end of the statement block or until a Break statement causes it to exit the statement block. Does not find a match. If a default statement exists, then it runs the default statement. Usage Make sure you end a Case statement with a Break statement.
Image of page 69
Siebel eScript Language Reference Version 8.1, Rev. A Statements Reference 70 Format switch( switch_variable ) { case value1 : statement_block break; case value2: statement_block break; . . . [default: statement_block; ] } Table 24 describes the arguments for the Switch statement. Example This example configures Siebel CRM to perform an action depending on an account type. In this example, a letter indicates the type of account: switch ( key[0] ) { case 'A': I=I+1; break; case 'B':; I=I+2 break; case 'C': I=I+3; break; default: I=I+4; break; } Siebel eScript runs code in the statement block until it encounters a Break statement. In this example, if you remove the Break statement that occurs after the I=I+2 statement, then Siebel eScript runs the following code: Table 24. Arguments for the Switch Statement Argument Description switch_variable The argument on whose value the course of action depends. valuen Values of the switch_variable argument, which are followed by a colon. statement_block One or more statements that Siebel eScript runs if the value of switch_variable argument is the value in the Case statement.
Image of page 70
Statements Reference Siebel eScript Language Reference Version 8.1, Rev. A 71 I=I+2 I=I+3 Related Topics For more information, see “If Statement” on page 67 .
Image of page 71
Image of page 72

You've reached the end of your free preview.

Want to read all 334 pages?

  • Summer '16
  • Oracle
  • Type system, Siebel, Siebel eScript

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors