Reputation: 11
I am new to Oracle apex.
I have a page with a form that is used to enter data into a table.
For Example there is P_ID, P_NAME, P_ADD_USER, P_VERIFIED_USER, P_SECOND_ID
items. I want to make P_SECOND_ID
read only based on multiple conditions.
Condition is
IF P_ADD_USER <> :APP_USER AND P_SECOND_ID = ' ' THEN
'P_SECOND_ID should be available to Edit.
ELSE
P_SECOND_ID will be read only.
I tried to use Type = Item!=Value
but it is allowing me to add only one condition so is there any option that i can use both conditions and make that ITEM read only.
Upvotes: 0
Views: 2408
Reputation: 142788
Condition I'd suggest in such a case is a function that returns a Boolean - if it returns TRUE
, something will happen; otherwise, it won't.
So, if you want to make P_SECOND_ID
editable if conditions you mentioned are satisfied, then you'd
return not ( :P_ADD_USER <> :APP_USER
and :P_SECOND_ID = ' '
);
Though, did you really want to say :P_SECOND_ID = ' '
? Is there a space character in it? Should that, perhaps, be :P_SECOND_ID IS NULL
?
Upvotes: 1
Reputation: 26
SQL Expression allows you to include multiple conditions. You might want to rephrase your requirement to make the item read only ( versus making it editable ) under certain conditions. If I get your requirement right, the condition to make P_SECOND_ID read only is when
:P_ADD_USER = :APP_USER OR :P_SECOND_ID is not NULL
You can use this expression directly in the SQL Expression.
Upvotes: 0