Before
making decision think twice, do you really need this at database level, the best way is to use Application Designer but if you use this approach, then test, test. test, this article will give you broad idea
of scroll, grid and table
Pretty much
all Definitions that you can open up in Application Designer are stored in the
own PeopleSoft tables so in theory you can one fell swoop just about anything
with SQL and enough privileges.
The Fields
on a Panel are stored in the Following table PSPNLFIELD,
that said it would appear the Grid fields are special and stored in PSPNLCNTRLDATA
From what I
see Grids are FIELDTYPE = 19, Note PSPNLCNTRLDATA has more than
just Grids so you likely want to focus on FieldType
= 19.
So the
following SQL should return all the necessary rows:
SELECT A.PNLNAME,
A.PNLFLDID, A.PTGRDLAYOUT, A.GRIDROWS
FROM PSPNLCNTRLDATA A
, PSPNLFIELD B
WHERE A.PNLNAME =
B.PNLNAME
AND A.PNLFLDID =
B.PNLFLDID
AND B.FIELDTYPE = 19
AND A.PTGRDLAYOUT = 0
-- Where PNLNAME
is the Page in question and PNLFLDID is the ID the grid is in when you
look at the Page on the Order Tab.
-- PTGRDLAYOUT
is the field you want where 0 is the original and 1 is Scrollable. FYI - GRIDROWS
is the corresponding "Rows to show in Scrollable layout"
;
--
Therefore the Following Update SQL should change all grids currently set to the
Original Layout to the Scrollable Layout
UPDATE PSPNLCNTRLDATA A
SET PTGRDLAYOUT = 1
--, GRIDROWS = SOME_NUMBER
-- In case you want to
WHERE PTGRDLAYOUT = 0
AND EXISTS (SELECT 'X'
FROM PSPNLFIELD B
WHERE B.PNLNAME =
A.PNLNAME
AND B.PNLFLDID =
A.PNLFLDID
AND B.FIELDTYPE = 19)
;
This
article credit goes to Justin: