Find Records To Place Into App Designer For a Field Size Change

When you change a field’s size (delivered or custom), you can use the following script to ensure you have all the necessary tables, views, and temporary tables in your project.

A quick trick too: You can mark the records objects as “Do Not Upgrade” in the App Designer project.  This allows the “Project” to have a reference for the tables, views, and temporary tables for a quick “Build Project” actions, but doesn’t actually migrate the record definitions.  You only need to migrate the Field with the “Upgrade Flag” on, then Build the Project on the target (Alter Tables and Create Views).

Just change the Fieldname in the following SQL.

select DISTINCT R.RECNAME
, case R.RECTYPE when 0 then 'Record' when 1 then 'View' else 'Temp Table' end "RecType Descr"
from PSRECDEFN R, PSRECFIELDALL F
where R.RECNAME = F.RECNAME
AND R.RECTYPE in (0,1,7) --0 is Record, 1 is View, 7 Temp Tables
AND F.FIELDNAME IN ('ITEM_FIELD_C30_A')
ORDER BY 1;

Once you have an App Designer Project in place, you can run the following SQL to find which record definitions are missing from your project.

Change the Fieldname and Project name:

select DISTINCT R.RECNAME
, case R.RECTYPE when 0 then 'Record' when 1 then 'View' else 'Temp Table' end "RecType Descr"
from PSRECDEFN R, PSRECFIELDALL F
where R.RECNAME = F.RECNAME
AND R.RECTYPE in (0,1,7) --0 is Record, 1 is View, 7 Temp Tables
AND F.FIELDNAME IN ('ITEM_FIELD_C30_A')
and NOT exists (select 'x' from PSPROJECTITEM P
     WHERE P.OBJECTTYPE = 0 AND P.OBJECTID1 = 1
     AND P.OBJECTVALUE1 = R.RECNAME
     AND P.PROJECTNAME LIKE '%1047_EXTEND%')
ORDER BY 1;

↑ Back to top