Wednesday 9 December 2015

Populating Array in Poeplecode

There are several ways to populate an array. The example code following each of these methods creates the exact same array, with the same elements:

---------------------------------------------------------------------
Use CreateArray when you initially create the array:

Local Array of Number &MyArray;
&MyArray = CreateArray(100, 200, 300);


----------------------------------------------------------------------

Using CreateArray without any parameters creates an array of Any.

Local Array of Any &MYARRAY;

 &MYARRAY = CreateArray();
 &MYARRAY[1] = 100;
 &MYARRAY[2] = 200;
 &MYARRAY[3] = 300;

------------------------------------------------------------------------


Use the Push method to add items to the end of the array:
Local Array of Number &MYARRAY;
 Local Number &MYNUM;

 &MYARRAY = CreateArrayRept(&MYNUM, 0);
 /* this creates an empty array of number */
 &MYARRAY.Push(100);
 &MYARRAY.Push(200);
 &MYARRAY.Push(300);


-------------------------------------------------------------------------

Use the Unshift method to add items to the beginning of the array:
 Local Array of Number &MYARRAY;
 Local Number &MYNUM;

 &MYARRAY = CreateArrayRept(&MYNUM, 0);
 /* this creates an empty array of number */
 &MYARRAY.Unshift(300);
 &MYARRAY.Unshift(200);
 &MYARRAY.Unshift(100);

-------------------------------------------------------------------------

Friday 16 October 2015

Highlight empty fields in RED for error messages


Question Rating Field  is present in a grid  and on page save button , I am verifying that it should not be empty . I have a custom save button and I have written this code on save button field change event.


Local Rowset &level1;

&level1 = GetLevel0().GetRow(1).GetRowset(Scroll.L_INST_EVAL_TBL);
For &i = 1 To &level1.ActiveRowCount
  
  
   If None(&level1.GetRow(&i).L_INST_EVAL_TBL.L_QUESTION_RATING.Value) Then
      SetCursorPos(%Page, L_INST_EVAL_TBL.L_QUESTION_RATING, CurrentRowNumber());
     
     
     
      &level1.GetRow(&i).L_INST_EVAL_TBL.L_QUESTION_RATING.Style = "PSERROR";
      Error MsgGet(31000, 23, "Please Select  A Rating value");
     
   Else
      &level1.GetRow(&i).L_INST_EVAL_TBL.L_QUESTION_RATING.Style = "PSEDITBOX";
   End-If;
  
  
End-For;

Thursday 25 June 2015

Export Users / Roles / Permission lists and Setup SACR Secuirty


set output C:\configurations_AS.dat;

--- academic institution
EXPORT PS_SCRTY_TBL_INST;

--- institution/Career Security Export
EXPORT PS_SCRTY_TBL_CAR;

--- academic Program Security Export
EXPORT PS_SCRTY_TBL_PROG;

--- academic Plan Security Export
EXPORT PS_SCRTY_TBL_PLAN;

--- academic Org Security Export
EXPORT PS_SCRTY_TBL_ACAD;

--- Admissions Action Security Export
EXPORT PS_SCRTY_ADM_ACTN;

--- Program Action Security Export
EXPORT PS_SCRTY_PROG_ACTN;

--- Application Center Security Export
EXPORT PS_SCRTY_APPL_CTR;

--- Recruiting Center Security Export
EXPORT PS_SCRTY_RECR_CTR;


--- Enrollment Security Export (Override Table)
EXPORT PS_ENRMT_OVRD_TBL;

--- Enrollment Security Export
EXPORT PS_OPR_DEF_TBL_CS;

--- Service Indicator Security Export
EXPORT PS_SCRTY_TBL_SRVC;

--- Student Group Security Export
EXPORT PS_SCRTY_TBL_STGP;

--- Transcript Type Security Export
EXPORT PS_SCRTY_TSCRPT;

--- New Transcript Type Security Export
EXPORT PS_SSR_SCRTY_TSRPT;

--- Test ID Security Export
EXPORT PS_SAD_TEST_SCTY;

--- Population Update Security Export
EXPORT PS_SCCPU_SRTY_TBL;

--- PERMISSION LISTS
EXPORT PSCLASSDEFN;
EXPORT PSAUTHBUSCOMP;
EXPORT PSAUTHCHNLMON;
EXPORT PSAUTHCUBE;
EXPORT PSAUTHITEM;
EXPORT PSAUTHOPTN;
EXPORT PSAUTHPRCS;
EXPORT PSAUTHSIGNON;
EXPORT PSPRCSPRFL;
EXPORT PS_MC_OPR_SECURITY;
EXPORT PS_MC_OPRID;
EXPORT PS_SCRTY_ACC_GRP;
EXPORT PS_SCRTY_QUERY;




--- ROLES
EXPORT PSROLEDEFN;
EXPORT PSROLEDEFNLANG;
EXPORT PSROLECANGRANT;
EXPORT PSROLECLASS;

--- USERS
EXPORT PSOPRDEFN;
EXPORT PSOPRALIAS;
EXPORT PSROLEUSER;
EXPORT PSUSERATTR;
EXPORT PSUSEREMAIL;
EXPORT PSUSERPRSNLOPTN;
EXPORT PS_ROLEXLATOPR;
EXPORT PS_RTE_CNTL_RUSER;

--- ACCESS PROFILES
EXPORT PSACCESSPRFL;

--- DEFINITION Security
EXPORT PSOBJGROUP;
EXPORT PSOPROBJ;

--- PERSONALIZATIONS
EXPORT PSUSEROPTNDEFN;
EXPORT PSUSEROPTNLANG;
EXPORT PSOPTNCATGRPLNG;
EXPORT PSOPTNCATGRPTBL;
EXPORT PSOPTNCATTBL;
EXPORT PSOPTNCATLANG;

--- Security OPTIONS
EXPORT PSSECOPTIONS;




---------------------------------- Academic Structure and other configurations -----------------------

--- "Student Group Table"

EXPORT STDNT_GROUP_TBL;
EXPORT STDNT_GROUP_LNG;

--- "Service Indicator Table"

EXPORT SERVICE_IMPACT;
EXPORT SERVICE_IMP_LNG;
EXPORT SRVC_IND_CD_TBL;
EXPORT SRVC_IND_CD_LNG;
EXPORT SRVC_IN_RSN_TBL;
EXPORT SRVC_IN_RSN_LNG;

--- "Service Impact Table"

EXPORT SRVC_IMPACT_TBL;

--- "Enrollment Action Reason"

EXPORT ENRL_RSN_TBL;
EXPORT ENRL_RSN_LANG;

---Departments Table

Export PS_DEPT_TBL;

---Dept Security

EXPORT PS_SCRTY_TBL_DEPT;
EXPORT PS_SJT_DEPT;

---Academic program
EXPORT ACAD_PROG_LANG;
EXPORT ACAD_PROG_TBL;
EXPORT HOME_CAMPUS_TBL;
EXPORT SAD_PB_PROG;

---Academic Plan Table
EXPORT ACAD_PLAN_OWNER;
EXPORT ACAD_PLAN_TBL;
EXPORT ACAD_PLAN_LANG;

---Degree Table
EXPORT DEGREE_TBL;
EXPORT DEGREE_TBL_LANG;

---PROG ACTION
EXPORT PROG_ACTION_LNG;
EXPORT PROG_ACTION_TBL;



---Academic SubPlan Table
EXPORT ACAD_SUBPLN_TBL;
EXPORT ACAD_SUBPLN_LNG;
EXPORT SSR_SUBPLAN_AUS;

---Academic Subject Table
EXPORT SSR_SUBJECT_AUS;
EXPORT SUBJECT_TBL;
EXPORT SUBJECT_TBL_LNG;
EXPORT SUBJ_COMPONENT;
EXPORT SUBJ_OWNER_TBL;

---PROG REASON
EXPORT PROG_RSN_LNG;
EXPORT PROG_RSN_TBL;



---Campus Table
EXPORT CAMPUS_LOC_TBL;
EXPORT CAMPUS_TBL;
EXPORT CAMPUS_LANG;

---Grading Scheme Table
EXPORT GRADESCHEME_TBL;
EXPORT GRADESCHEME_LNG;
EXPORT GRADE_BASIS_TBL;
EXPORT GRADE_BASIS_LNG;
EXPORT GRADE_TBL;
EXPORT GRADE_TBL_LANG;
EXPORT GRD_BASE_CHOICE;

---Grading Basis Exception Rule
EXPORT GB_EXC_MAP;
EXPORT GB_EXC_MAP_LNG;
EXPORT GB_EXC_MAP_DTL;


---Milestone Table
EXPORT MILESTONE_TBL;
EXPORT MILESTONE_LANG;
EXPORT MLSTN_LVL_TBL;
EXPORT MLSTN_LVL_LANG;
EXPORT SSR_MILESTN_NZL;

---Application Center Table
EXPORT ADM_APPLCTR_TBL;
EXPORT ADM_APPLCTR_LNG;

---Program Action Reason Table
EXPORT PROG_RSN_TBL;
EXPORT PROG_RSN_LNG;

---Define Career Types
EXPORT ACAD_CAR_TBL;
EXPORT ACAD_CAR_LANG;
EXPORT ACAD_CAR_PTRS;
EXPORT SSR_ACD_CAR_NZL;

---Installation table
EXPORT PS_INSTALLATION;

---Admit Type Table
EXPORT   ADMIT_TYPE_TBL;
EXPORT   ADMIT_TYPE_LNG;

---External GPA Type Table
EXPORT   GPA_TYPE_TBL;
EXPORT   GPA_TYPE_LANG;
EXPORT   GPA_VALUE_TBL;
EXPORT   GPA_VALUE_LANG;

---Academic Group Table
EXPORT   ACAD_GROUP_TBL;
EXPORT   ACAD_GROUP_LANG;
EXPORT   CATLG_CAR_TBL;
EXPORT  STND_MTGPAT_TBL;

---Translate values
EXPORT PSXLATDEFN;
EXPORT PSXLATDEFNDEL;
EXPORT PSXLATITEM;
EXPORT PSXLATITEMLANG;


---External Summary Type Table
EXPORT   EXT_SUMM_TP_TBL;

---Admissions Action Table
EXPORT   ADM_ACTION_TBL;
EXPORT   ADM_ACTION_LANG;

---Level/Load Rules Table
EXPORT ACAD_LEVEL_TBL;
EXPORT ACAD_LOAD2_TBL;
EXPORT ACAD_LOAD_TBL;
EXPORT LVL_LD_RULE_TBL;
EXPORT LVL_LD_RULE_LNG;
EXPORT SSR_LVLLOAD_AUS;


---Unit Conversion Table
EXPORT TERM_TYPE_TBL;
EXPORT UNIT_CONVR_TBL;

---Career Pointer Exception Rule
EXPORT CAR_PTR_EXC;
EXPORT CAR_PTR_EXC_LNG;
EXPORT CAR_PTR_EXC_DTL;

---Complete Grade Flag
EXPORT SSR_GRADE_FLAG;
EXPORT SSR_GRD_FLAG_LN;

---Grade Category
EXPORT GRADE_CAT_DTL;
EXPORT GRD_CAT_DTL_LNG;
EXPORT GRADE_CAT_TBL;

---Academic Standing Table
EXPORT ACAD_STACTN_TBL;
EXPORT ACAD_STACTN_LNG;
EXPORT ACAD_STDNG_TBL;

---Academic Standing Rule
EXPORT ACAD_STDNG_RULE;
EXPORT ACAD_STDNG_LANG;
EXPORT ACAD_ST_RUL_DTL;

---Honors/Awards Rule
EXPORT HNR_AWD_RUL_DTL;
EXPORT HONOR_AWRD_RULE;
EXPORT HONOR_AWRD_LANG;

---Academic Organization Table
EXPORT ACAD_ORG_FS_OWN;
EXPORT ACAD_ORG_HR_OWN;
EXPORT ACAD_ORG_TBL;
EXPORT ACAD_ORG_LANG;
EXPORT SSR_ACD_ORG_AUS;

---Honors and Awards Table
EXPORT HONOR_AWARD_TBL;
EXPORT HONOR_AWARD_LNG;


---Checklist Table
EXPORT CS_CHKLST_ITEM;
EXPORT CS_CHKLST_TBL;
EXPORT CS_CHKLST_LANG;

---Test Component Table
EXPORT SA_TEST_CMP_TBL;
EXPORT SA_TEST_CMP_LNG;

---Test Tables
EXPORT SA_TCMP_REL_TBL;
EXPORT SA_TCMP_REL_LNG;
EXPORT SA_TEST_TBL;
EXPORT SA_TEST_LANG;

---External Test Score Mapping
EXPORT SAD_TEST_RECS;
EXPORT SAD_TEST_RECS2;
EXPORT SAD_TEST_SETUP;
EXPORT SAD_TEST_SETUP2;

---Checklist Item Table
EXPORT SCC_CKLSITM_TBL;
EXPORT SCC_CKLSITM_LNG;

---Checklist Item Functions Table
EXPORT CHK_FUNCTN_TBL;

---Event Type Table
EXPORT EVENT_TYPE_TBL;
EXPORT EVENT_TYPE_LANG;

---3C Update/Inquiry Group Table
EXPORT GRP_3C_TBL;
EXPORT GRP_3C_LANG;

---Checklist 3C Groups
EXPORT CS_CHKLST_3CGRP;

---Event Definition
EXPORT EVNT_3CS_TBL;
EXPORT EVNT_3CS_LANG;
EXPORT EVNT_CHKITM_TBL;
EXPORT EVNT_CHKLST_TBL;
EXPORT EVNT_CMNT_TBL;
EXPORT EVNT_COMM_TBL;


---SF Business Unit
EXPORT BUS_UNIT_TBL_SF;
EXPORT BUS_UNIT_LNG;
EXPORT BU_SF_RCPT_NO;