Oracle APEX - Setting up a Tabular Form with default values
I pretty new to APEX and I'm having a bit of trouble working with my first Tabular form. The table I've linked it to is fairly simple. The columns are as follows:
- Primary key representing an internal code for a college major
- Foreign key representing the "real" code for the college major
- Description for the college major
- The user that inserted/updated the row in the table
- The date the row was inserted/updated
At the moment, I'm facing two problems.
- I 开发者_StackOverflow社区want the user to be able to specify their own primary key for the row but not to be able to change any existing primary keys. When I specify the column type as "Text Field" users are able to edit existing rows' primary keys and it also seems to break the report when trying to add a new row as I get a checksum error.
I would like the user and date columns to default to the currently logged in user and the current date, but specifying default values for either of these columns also seems to cause syntax/SQL errors. Does anyone have any examples of how to use the default value functionality for a column?Fixed. I can just use SYSDATE as a value on it's own when specifying the PL/SQL type for default. Username can be obtained through functions in APEX_UTIL
Perhaps you could use 2 conditional fields. If the field value is null, display the edit box, if the field value is not null display the display-only field.
精彩评论