Posts

Showing posts from August, 2017

Bulk loading a template APEX application in a single workspace

I recently had a need to import the same application multiple times - 30+, so each person accessing the workspace could use their own application to play around with. And the user list was supplied to me in the format of an Excel spreadsheet. So, first in the Excel sheet, I had to make a new column to derive some sort of unique value - what better than the first letter of their first name and the surname. Like John Smith -> JSMITH. So, first I made a new column with the value as a formula, which was: =LEFT(A2,1). That would give me "J" for "John. Then, for the actual account ID I come up with the formula =UPPER(CONCAT(C2, B2)) Where C2=J and B2 = SMITH, giving me JSMITH. With that list, I can copy it over to my trusty text editor in order to manipulate to create an array. The first part I wanted to do was create all the users, so for that I can use raw PL/SQL, and come up with a block of code like so: declare type t_users is table of varchar2(200)