WWC-00006 and ORA-01840 or ORA-01861 or ORA-01858 Errors When Using Item Types With Default Value In Portal
(Doc ID 1456402.1)
Last updated on JUNE 29, 2017
Applies to:Portal - Version 126.96.36.199.0 to 188.8.131.52.0 [Release FMW11g]
Information in this document applies to any platform.
Checked for relevance on 30-Oct-2013
Item types can be associated with attributes. The default value for such an attribute can be set through PL/SQL code as illustrated in the Portal User's Guide :
7. When you have added the attributes, you can change their display properties if necessary:
To set the default value of a custom Project ID attribute to the current project to which the current user is assigned, you would first need a function that returns the ID of the project. The function might be something like the following (assuming that a user is assigned to only one project on any specified date):
create function GET_CURRENT_PROJECT return VARCHAR2 as
project_id VARCHAR2 (30);
select pa.id into project_id from project_asignments pa
where SYSDATE between pa.start and pa.end -- selects current assignment
and pa.assignee = WWCTX_API.GET_USER; -- gets name of current user
For an item type where the attribute's default value is generated from PL/SQL, an error occurs when adding an item based on this item type to an item region on a Portal page :
- ORA-01840 when the return value of the PL/SQL code is only 1 character in length and has a numerical value, e.g. 1
internal error (WWC-00006)
Unexpected error - ORA-01840: input value not long enough for date format (WWC-35000)
- ORA-01861 when the return value of the PL/SQL code is more than one character in length.
internal error (WWC-00006)
Unexpected error - ORA-01861: literal does not match format string (WWC-35000)
Steps To Reproduce:
- Create Page group PG_Test111.
- Create attribute att_test based text.
- Create item type : item_type_test.
- Edit the new Item and Click on attributes tab.
- Select att_test to be on the right on the selected attributes.
- Below in the attributes properties, for the new item added: att_test
- Default value <USER.Procedure>
- Check boxes: "Required", "Add Wizard", "Edit Wizard"
- Click on procedure tab. Under "Procedure Call Properties":
Procedure Call: <USER.Procedure>
Link Text: <USER.Procedure>
- Click Apply, OK.
- Go to PG_Test111 root page
- Add an item.
- Select "item_type_test" type
- Click next and the item wizard is opened and at the bottom of the page:
Display Name: Test
<USER.Procedure>: with the default value passed.
- Click next button the error is shown!
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document