Database Reference
In-Depth Information
END IF;
END;
This code implements logic that makes a decision based on the user substitution
variable :APP_USER and tailors the htp.p output according to that distinguishing
factor. APEX provides “nobody” as a username when a user isn't yet logged in, so the
logic keys off of that value.
When the PL/SQL region is generated for a user who isn't yet logged in, a simple
welcome message is produced (see Figure 8-36 ) . When a user who has credentials is
logged in to the application, a message similar to that in Figure 8-37 is produced that
shows a user-specific greeting and a quick count of the number of open tickets assigned
to that user.
Figure 8-36. Issue Tracker PL/SQL region when the user isn't yet logged in
Figure 8-37. With an authenticated user, the PL/SQL region generates a greeting and a ticket count
In this section, you've created a dynamic PL/SQL region that alters the output based
on the application user. This section's example, although simple, shows how the con-
tent of a region can be as dynamic as necessary with the use of PL/SQL in the data-
base.
Dynamic SQL
 
 
 
 
Search WWH ::




Custom Search