Oracle APEX - 设置具有默认值的表格
我对 APEX 还很陌生,在使用我的第一个表格表单时遇到了一些麻烦。我将其链接到的表相当简单。各列如下:
- 代表内部的主键 大学专业代码
- 代表“真实”的外键 大学专业代码
- 大学专业描述
- 插入/更新的用户 表中的行
- 插入/更新行的日期
目前,我面临两个问题。
- 我希望用户能够为行指定自己的主键,但不能更改任何现有的主键。当我将列类型指定为“文本字段”时,用户可以编辑现有行的主键,并且在尝试添加新行时似乎也会破坏报告,因为我收到校验和错误。
我想要用户和日期 默认为当前的列 登录用户和当前日期, 但指定默认值 这些列中的任何一个似乎也 导致语法/SQL 错误。做 任何人都有如何的例子 使用默认值功能 对于一列?已修复。当指定默认的 PL/SQL 类型时,我可以使用 SYSDATE 作为它自己的值。用户名可以通过APEX_UTIL中的函数获取
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 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 dateFixed. 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
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许您可以使用 2 个条件字段。如果字段值为空,则显示编辑框,如果字段值不为空,则显示仅显示字段。
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.