Conditional and Full Card Actions in Oracle APEX

Опубликовано: 20 Октябрь 2024
на канале: Tech Mining
1,771
31

In this video, You will learn how to include multiple actions per Card. This video is separated into two parts.

FIRST PART, illustrates the Conditional Actions. It displays 3 actions per card. The Title action, The Edit button action, The subtitle action.

The Title action displays without any condition.

The Edit button action displays only if employee belongs to department number 10.

The subtitle action will make the cards subtitle Editable, Only for department number 30 employees. If the user clicks on the cards subtitle link, They will be able to access the employee detail page.

SECOND PART, illustrates the full card action. It allows us to link the entire card to the specified action. In the current scenario, for the department number 30 employees the full card action is linked to the Employee detail page.

Create Table [EBA_DEMO_CARD_EMP]
=============================================
CREATE TABLE "EBA_DEMO_CARD_EMP"
( "EMPNO" NUMBER NOT NULL ENABLE,
"ENAME" VARCHAR2(255),
"JOB" VARCHAR2(255),
"MGR" NUMBER,
"HIREDATE" DATE,
"SAL" NUMBER,
"COMM" NUMBER,
"DEPTNO" NUMBER,
"PROFILE_IMAGE" BLOB,
"MIMETYPE" VARCHAR2(255),
"FILENAME" VARCHAR2(400),
"IMAGE_LAST_UPDATE" DATE,
"TAGS" VARCHAR2(4000),
CONSTRAINT "EBA_DEMO_CARD_EMP_PK" PRIMARY KEY ("EMPNO")
USING INDEX ENABLE
) ;

ALTER TABLE "EBA_DEMO_CARD_EMP" ADD CONSTRAINT "EBA_DEMO_CARD_EMP_DEPT_FK" FOREIGN KEY ("DEPTNO")
REFERENCES "EBA_DEMO_CARD_DEPT" ("DEPTNO") ENABLE;
ALTER TABLE "EBA_DEMO_CARD_EMP" ADD CONSTRAINT "EBA_DEMO_CARD_EMP_MGR_FK" FOREIGN KEY ("MGR")
REFERENCES "EBA_DEMO_CARD_EMP" ("EMPNO") ENABLE;


PL/SQL Expression
===================================
:JOB = 'DEVEOPER' or :DEPTNO = 10


Image Attribution
======================================
https://www.freepik.com/free-vector/b..." Freepik

https://www.freepik.com/free-ai-image..." Image By freepik