我有一个有日期字段的预言机。该字段可以为空、系统日期、回溯日期或未来日期。如果它有一个过去的日期,字段应该不能修改。如果它为空或未来日期,用户应该能够修改该字段。如果该字段有过去的日期,我该如何限制用户?
问问题
886 次
1 回答
0
If I understand your description correctly, you want the form field to be editable only if the current value (retrieved from the row currently stored in the database, I presume) is NULL or in the future.
To do that, I'd put some logic in the POST-QUERY
trigger to disable the item, e.g.
IF :MYBLOCK.MYDATEITEM <= SYSDATE THEN
SET_ITEM_PROPERTY('MYBLOCK.MYDATEITEM', ENABLED, PROPERTY_FALSE);
END IF;
There are other ways of doing the same thing, e.g. by setting the following properties:
IF :MYBLOCK.MYDATEITEM <= SYSDATE THEN
SET_ITEM_PROPERTY('MYBLOCK.MYDATEITEM', NAVIGABLE, PROPERTY_FALSE);
SET_ITEM_PROPERTY('MYBLOCK.MYDATEITEM', INSERT_ALLOWED, PROPERTY_FALSE);
SET_ITEM_PROPERTY('MYBLOCK.MYDATEITEM', UPDATE_ALLOWED, PROPERTY_FALSE);
END IF;
于 2013-07-23T06:40:31.343 回答