- 3,734,283 Users
- 2,246,937 Discussions
- 7,857,218 Comments
- 380.9K All Categories
- 2.1K Data
- 203 Big Data Appliance
- 1.9K Data Science
- 446.1K Databases
- 220.4K General Database Discussions
- 23 Multilingual Engine
- 506 MySQL Community Space
- 459 NoSQL Database
- 7.7K Oracle Database Express Edition (XE)
- 2.8K ORDS, SODA & JSON in the Database
- 438 SQLcl
- 3.9K SQL Developer Data Modeler
- 185.4K SQL & PL/SQL
- 20.8K SQL Developer
- 291.3K Development
- 6 Developer Projects
- 117 Programming Languages
- 288.1K Development Tools
- 96 DevOps
- 3K QA/Testing
- 645.2K Java
- 18 Java Learning Subscription
- 36.9K Database Connectivity
- 149 Java Community Process
- 104 Java 25
- 22.1K Java APIs
- 137.7K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 12 Java Essentials
- 138 Java 8 Questions
- 85.9K Java Programming
- 79 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.2K Java SE
- 13.8K Java Security
- 195 Java User Groups
- 180 LiveLabs
- 34 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 165 Deutsche Oracle Community
- 1.2K Español
- 1.9K Japanese
- 225 Portuguese
Can I retrieve Table Value and set it into Application Item?
I have created a table, in which the state (of processes e.g. 'REQUESTED') and corresponding page is stored with the user.
Now everytime a user logs in, I want him to be redirected to the corresponding page depending on the stored state in the table.
to retrieve the status of a form from the logged in user, I did the following:
- created application item 'STATE_OF_FORM'.
- created application process to set the value into the application item
this takes the status from the table and should set it in the application_item.
Unfortunately it doesn't work as hoped, I think the error is in the syntax:
--this is the code to set stored table status into the status application item
declare v_state varchar2(50); begin select fp.STATE into v_state FROM PROCESSSTEPS_FORM fp left outer join USERS u on fp.UUID=u.UUID where u.username=:APP_USER; Apex_Util.Set_Session_State('STATE_OF_FORM', v_state); --exception handling needed otherwise the error 'ORA-01403: no data found' will exception be raised when no_data_found then NULL; end;
What do I do wrong?
This then I would like to use to redirect the user to the corresponding page with this PL/SQL Statement:
declare v_state varchar2(50); v_page number; begin select fp.STATE, fp.PAGE into v_state, v_page from PROCESSSTEPS_FINALPAPERS fp where fp.AUDIT_USER=:APP_USER; IF v_state =V('STATE_OF_FORM') THEN SELECT APEX_PAGE.GET_URL ( p_page => v_page ) INTO v_page FROM DUAL; end if; end;
But I always get the error , when I try to get to the correspoding page.
Does the problem lie in my syntax?
Do I work correctly with the Application item and the process?
I am new to APEX and do not quite understand the problem here.