Showing posts with label file. Show all posts
Showing posts with label file. Show all posts

Wednesday, 7 October 2020

Handling File Attachment Size Dynamically

 Handling File Attachment Size Dynamically:

We can easily hardcode the File Size limit by setting a value to the &size variable in below code.

But if we want to use it dynamically, then we can get the value and use Int to convert the value to an integer and use it. Since Value(&size) returns a decimal value, it is not accepted.


&size = Int(&fsize);

&RETCODE = AddAttachment(URL.AF_MOBILE_USER_SS_FILE, &UniqueSysFilename, "", &ATTACHUSERFILE, &size * 1024);


The dynamic value can be stored in any setup or in a message catalog and pulled using below code, where 678 id default value in case message catalog 123,45 doesnt have this value.

&fsize = MsgGetText(123, 45, "678");

File Extension List

Setting up and Migrating File Extension List


select * from ps_PTFX_EXTLSTDEFN;
select * from PS_PTFX_EXTLST where PTFX_EXTLST_NAME =  'GSS_EXTENSION_LIST'; 





For more configuration details check the below:
Chapter 9 
Using PeopleTools Utilities


For Migration suggestions check the below:
Applying Application Changes 
Chapter 5
Task 5-13-21: Exporting File Extension Lists This script exports the definition and contents of every file extension list defined for attachments in the new release. The script name for your upgrade path is: PTFX_EXTLSTS_EXP.DMS

Task 5-13-22: Importing File Extension Lists This script imports the definition and contents of every file extension list delivered in the new release. Note that for any duplicates, this script will overwrite any customizations that were made. The script name for your upgrade path is: PTFX_EXTLSTS_IMP.DMS