19
Copyright Oracle Corporation, 2000. All rights reserved. ® Using Advanced Validation Capabilities

value sets in oracle apps

Embed Size (px)

DESCRIPTION

value sets in oracle apps

Citation preview

Page 1: value sets in oracle apps

Copyright Oracle Corporation, 2000. All rights reserved.®

Using Advanced Validation CapabilitiesUsing Advanced Validation Capabilities

Page 2: value sets in oracle apps

Copyright Oracle Corporation, 2000. All rights reserved.®

ObjectivesObjectives

After completing this lesson, you should be able todo the following:

• Use values retrieved from application tables for validating input

• Reference profile options when validating input

• Use another field on the same form for validation

• Use a value from a previously used value set for validation

After completing this lesson, you should be able todo the following:

• Use values retrieved from application tables for validating input

• Reference profile options when validating input

• Use another field on the same form for validation

• Use a value from a previously used value set for validation

Page 3: value sets in oracle apps

Copyright Oracle Corporation, 2000. All rights reserved.®

OverviewOverview

• Using table validated value sets

• Using profile option values for validating

• Using the value from a prior field on a form

• Using the value from a prior value set

• Using table validated value sets

• Using profile option values for validating

• Using the value from a prior field on a form

• Using the value from a prior value set

Page 4: value sets in oracle apps

Copyright Oracle Corporation, 2000. All rights reserved.®

Advanced Validation OptionsAdvanced Validation Options

• Use values from application tables.

• Use profile option values for validation.

• Use values from other fields on the same form.

• Use cascading dependencies.

• Use values from application tables.

• Use profile option values for validation.

• Use values from other fields on the same form.

• Use cascading dependencies.

Page 5: value sets in oracle apps

Copyright Oracle Corporation, 2000. All rights reserved.®

Table-Validated Value SetsTable-Validated Value Sets

WHERE REGION = ‘Western’

Cities_West value set

Customer table

Acme ComputersNorth Bay FoodsMidwest GrainSouthern MillingRockies Mining

San JoseBostonChicagoCharlestonDenver

WesternEasternEasternSouthernWestern

Name CityRegion

San Jose Denver

Page 6: value sets in oracle apps

Copyright Oracle Corporation, 2000. All rights reserved.®

Defining a Table-Validated Value SetDefining a Table-Validated Value Set

Use the Validation Table Information window to enter:

• Table Application

• Table Name

• Table Columns

– Value

– Meaning

– ID

• Where/Order By

• Additional Columns

Use the Validation Table Information window to enter:

• Table Application

• Table Name

• Table Columns

– Value

– Meaning

– ID

• Where/Order By

• Additional Columns

(N) Application—>Validation—>Set (B) Edit Information(N) Application—>Validation—>Set (B) Edit Information

Page 7: value sets in oracle apps

Copyright Oracle Corporation, 2000. All rights reserved.®

Restricting Values Retrieved from a TableRestricting Values Retrieved from a Table

• If not all the values stored in the table are appropriate for your value set, use a SQL WHERE clause to restrict the set of values returned from the table.

• You can also use an ORDER BY statement to control the order in which the values are returned.

• If not all the values stored in the table are appropriate for your value set, use a SQL WHERE clause to restrict the set of values returned from the table.

• You can also use an ORDER BY statement to control the order in which the values are returned.

Page 8: value sets in oracle apps

Copyright Oracle Corporation, 2000. All rights reserved.®

Limitations on Using SQL WHERE Clauses

Limitations on Using SQL WHERE Clauses

• Do not use WHERE clauses with the Accounting Flexfield.

• Do not use HAVING or GROUP BY clauses.

• Do not use UNION, INTERSECT, MINUS, PLUS, or other set operators except in a subquery.

• If you need a complex SQL clause to select your values from a table, you should instead first define a view over the table which selects the rows you need, and then define the value set over the view.

• Do not use WHERE clauses with the Accounting Flexfield.

• Do not use HAVING or GROUP BY clauses.

• Do not use UNION, INTERSECT, MINUS, PLUS, or other set operators except in a subquery.

• If you need a complex SQL clause to select your values from a table, you should instead first define a view over the table which selects the rows you need, and then define the value set over the view.

Page 9: value sets in oracle apps

Copyright Oracle Corporation, 2000. All rights reserved.®

• Specify more than one name in the Table Name field.

• Specify more than one name in the Table Name field.

Using Multiple Tables for ValidationUsing Multiple Tables for Validation

WHERE SB.SET_OF_BOOKS_ID = SP.SET_OF_BOOKS_IDWHERE SB.SET_OF_BOOKS_ID = SP.SET_OF_BOOKS_ID

GL_SETS_OF_BOOKS SB, AR_SYSTEM_PARAMETERS SPGL_SETS_OF_BOOKS SB, AR_SYSTEM_PARAMETERS SP

• No value is required in the Table Application field.

• Use the JOIN statement in the WHERE clause to use columns from multiple tables. Use regular SQL syntax to specify the table join.

• No value is required in the Table Application field.

• Use the JOIN statement in the WHERE clause to use columns from multiple tables. Use regular SQL syntax to specify the table join.

Page 10: value sets in oracle apps

Copyright Oracle Corporation, 2000. All rights reserved.®

Practice 1Practice 1

Using application table values for validationUsing application table values for validation

Page 11: value sets in oracle apps

Copyright Oracle Corporation, 2000. All rights reserved.®

Other Advanced Validation OptionsOther Advanced Validation Options

• $PROFILES$$PROFILES$

• :Block.field:Block.field

• $FLEX$$FLEX$

• $PROFILES$$PROFILES$

• :Block.field:Block.field

• $FLEX$$FLEX$

• References the References the current value of a current value of a profile optionprofile option

• References the value References the value of an earlier appearing of an earlier appearing field on the same formfield on the same form

• References the value References the value from a value set used from a value set used earlier on the same earlier on the same formform

• References the References the current value of a current value of a profile optionprofile option

• References the value References the value of an earlier appearing of an earlier appearing field on the same formfield on the same form

• References the value References the value from a value set used from a value set used earlier on the same earlier on the same formform

Page 12: value sets in oracle apps

Copyright Oracle Corporation, 2000. All rights reserved.®

Using $PROFILES$Using $PROFILES$

• Use this keyword in a WHERE clause to reference a profile option value.

• Use the profile option internal name, not the end-user name.

• Use this keyword in a WHERE clause to reference a profile option value.

• Use the profile option internal name, not the end-user name.

WHERE SET_OF_BOOKS_ID =

:$PROFILES$.GL_SET_OF_BOOKS_ID

WHERE SET_OF_BOOKS_ID =

:$PROFILES$.GL_SET_OF_BOOKS_ID

Page 13: value sets in oracle apps

Copyright Oracle Corporation, 2000. All rights reserved.®

Using :block.fieldUsing :block.field

• The keyword :block.field is the Oracle Forms internal name of a field on the base window.

• Using :block.field is different from using a descriptive flexfield reference field in that the flexfield structure does not change based on the different :block.field values.

• Use this value set only with flexfields on windows that have the same block.field available.

• The keyword :block.field is the Oracle Forms internal name of a field on the base window.

• Using :block.field is different from using a descriptive flexfield reference field in that the flexfield structure does not change based on the different :block.field values.

• Use this value set only with flexfields on windows that have the same block.field available.

Page 14: value sets in oracle apps

Copyright Oracle Corporation, 2000. All rights reserved.®

Using $FLEX$Using $FLEX$

• Use $FLEX$.value_set_name to reference the value in a previous segment of the same flexfield structure.

• Value_set_name refers to the value set used by the previous segment.

• If two segments use the same value set, the value from the closest segment is used.

• Use $FLEX$.value_set_name to reference the value in a previous segment of the same flexfield structure.

• Value_set_name refers to the value set used by the previous segment.

• If two segments use the same value set, the value from the closest segment is used.

WHERE JOURNAL_TYPE =

:$FLEX$.GL_SRS_JOURNAL_TYPE

WHERE JOURNAL_TYPE =

:$FLEX$.GL_SRS_JOURNAL_TYPE

Page 15: value sets in oracle apps

Copyright Oracle Corporation, 2000. All rights reserved.®

Cascading Dependencies Using $FLEX$Cascading Dependencies Using $FLEX$

_ Stock On Hand Display ___

Maker

Model

Color

MAKER_VALUESMAKER_VALUESMAKER_TABLE MAKER_NAME

MODEL_VALUESMODEL_VALUESMODEL_TABLE MODEL_NAMEWHERE MAKER_NAME = :$FLEX$.MAKER_VALUES

COLOR_VALUESCOLOR_VALUES

COLOR_TABLE COLOR_NAMEWHERE MAKER_NAME = :$FLEX$.MAKER_VALUESAND MODEL_NAME = :$FLEX$.MODEL_VALUES

Page 16: value sets in oracle apps

Copyright Oracle Corporation, 2000. All rights reserved.®

Practice 2Practice 2

Using $FLEX$ to create cascading dependenciesUsing $FLEX$ to create cascading dependencies

Page 17: value sets in oracle apps

Copyright Oracle Corporation, 2000. All rights reserved.®

Using Special Value SetsUsing Special Value Sets

Many report parameters use special value sets to pass an entire key flexfield combination as the value for the report parameter.

Many report parameters use special value sets to pass an entire key flexfield combination as the value for the report parameter.

Page 18: value sets in oracle apps

Copyright Oracle Corporation, 2000. All rights reserved.®

Using Pair Value SetsUsing Pair Value Sets

Pair value sets use two segments to pass a range flexfield as the value.Pair value sets use two segments to pass a range flexfield as the value.

Page 19: value sets in oracle apps

Copyright Oracle Corporation, 2000. All rights reserved.®

SummarySummary

• Value sets can use values from application tables for validation.

• Value sets can use values from profile options for validation.

• Value sets can use values from a previously used field or value set for validation.

• Value sets can use values from application tables for validation.

• Value sets can use values from profile options for validation.

• Value sets can use values from a previously used field or value set for validation.