Posts

Showing posts from 2020

XMLP: Important Tags

 XML Publisher Important Tags: <?for-each:current-group()?> <?end for-each-group?> ----------------------------------------------------------------------------------------------------------------------------- <?for-each:DISTRICTPART2?> <?end for-each?> ----------------------------------------------------------------------------------------------------------------------------- <?for-each-group@section:HEADER;./EMPLID?> <?end for-each-group?> <?for-each:COUNT[CRSE_ATTR_VALUE = '5' and RESIDENT = 'Y']?> <?end for-each?> ----------------------------------------------------------------------------------------------------------------------------- Substring  <?xdofx:substr(DESCR,1,4)?> <?xdofx:substr(STRM,2,2)?> <?xdofx:if substr(STRM,4,1) ='1' then 'Spring' end if?> <?xdofx:if substr(STRM,4,1) ='5' then 'Summer' end if?> <?xdofx:if substr(STRM,4,1) ='8' then '

Uploading a file to the file server in peoplesoft peoplecode

Local string &InOutAttachUserfile, &file_name, &temp_dir, &InOutAttachSysfilename; Local integer &InMaxSize, &Result, &Return_Code; Local string &uniquefilename, &ATTACHSYSFILENAME, &ATTACHUSERFILE, &strFolderpath;     Local string &URL_ID = "record://HRS_ATTACHMENTS"; &Return_Code = AddAttachment(&URL_ID, &ATTACHSYSFILENAME, "", &ATTACHUSERFILE, &InMaxSize, True);     /*Create unique file name*/ &uniquefilename = "QBU_UPLOAD" | "_" | String(Month(%Date)) | "_" | String(Day(%Date)) | "_" | String(Year(%Date)) | "_" | String(Hour(%Time)) | "_" | String(Minute(%Time)) | "_" | String(Second(%Time)) | ".csv";   &ATTACHSYSFILENAME = Left(&uniquefilename, 64); &ATTACHSYSFILENAME = &uniquefilename;   COP_QBU_RCNTL.ATTACHSYSFILENAME.Value = &ATTACHSYSFILENAME; COP_QBU_RCNTL.ATTACHUSERFILE.Value = &ATT