PC: Populating the grid by clicking push button
Local string &Where_Clause, &Prior_Condition_Exist;
&Where_Clause = "WHERE ";
&Prior_Condition_Exist = "N";
&Prior_Condition_Exist = "N";
If All(CES_FA_CINB_WRK.EMPLID) Then
REM &Where_Clause = "WHERE EMPLID = " | "'" | CES_FA_CINB_WRK.EMPLID | "'";
&Where_Clause = &Where_Clause | " EMPLID = " | "'" | CES_FA_CINB_WRK.EMPLID | "'";
&Prior_Condition_Exist = "Y";
End-If;
REM &Where_Clause = "WHERE EMPLID = " | "'" | CES_FA_CINB_WRK.EMPLID | "'";
&Where_Clause = &Where_Clause | " EMPLID = " | "'" | CES_FA_CINB_WRK.EMPLID | "'";
&Prior_Condition_Exist = "Y";
End-If;
If All(CES_FA_CINB_WRK.SSN) Then
If &Prior_Condition_Exist = "Y" Then
&Where_Clause = &Where_Clause | " AND SSN = " | "'" | CES_FA_CINB_WRK.SSN | "'";
Else
&Where_Clause = &Where_Clause | " SSN = " | "'" | CES_FA_CINB_WRK.SSN | "'";
&Prior_Condition_Exist = "Y";
End-If;
End-If;
If &Prior_Condition_Exist = "Y" Then
&Where_Clause = &Where_Clause | " AND SSN = " | "'" | CES_FA_CINB_WRK.SSN | "'";
Else
&Where_Clause = &Where_Clause | " SSN = " | "'" | CES_FA_CINB_WRK.SSN | "'";
&Prior_Condition_Exist = "Y";
End-If;
End-If;
If All(CES_FA_CINB_WRK.CES_FA_CSAC_ID) Then
If &Prior_Condition_Exist = "Y" Then
&Where_Clause = &Where_Clause | "AND CES_FA_CSAC_ID = " | "'" | CES_FA_CINB_WRK.CES_FA_CSAC_ID | "'";
Else
&Where_Clause = &Where_Clause | " CES_FA_CSAC_ID = " | "'" | CES_FA_CINB_WRK.CES_FA_CSAC_ID | "'";
&Prior_Condition_Exist = "Y";
End-If;
End-If;
If &Prior_Condition_Exist = "Y" Then
&Where_Clause = &Where_Clause | "AND CES_FA_CSAC_ID = " | "'" | CES_FA_CINB_WRK.CES_FA_CSAC_ID | "'";
Else
&Where_Clause = &Where_Clause | " CES_FA_CSAC_ID = " | "'" | CES_FA_CINB_WRK.CES_FA_CSAC_ID | "'";
&Prior_Condition_Exist = "Y";
End-If;
End-If;
If All(CES_FA_CINB_WRK.CES_FA_GRNT_ID) Then
If &Prior_Condition_Exist = "Y" Then
&Where_Clause = &Where_Clause | "AND CES_FA_GRNT_ID = " | "'" | CES_FA_CINB_WRK.CES_FA_GRNT_ID | "'";
Else
&Where_Clause = &Where_Clause | " CES_FA_GRNT_ID = " | "'" | CES_FA_CINB_WRK.CES_FA_GRNT_ID | "'";
&Prior_Condition_Exist = "Y";
End-If;
End-If;
<*
If All(CES_FA_CINB_WRK.AID_YEAR) Then
If &Prior_Condition_Exist = "Y" Then
&Where_Clause = &Where_Clause | "AND AID_YEAR = " | "'" | CES_FA_CINB_WRK.AID_YEAR | "'";
Else
&Where_Clause = &Where_Clause | " AID_YEAR = " | "'" | CES_FA_CINB_WRK.AID_YEAR | "'";
&Prior_Condition_Exist = "Y";
End-If;
End-If;*>
If &Prior_Condition_Exist = "Y" Then
&Where_Clause = &Where_Clause | "AND CES_FA_GRNT_ID = " | "'" | CES_FA_CINB_WRK.CES_FA_GRNT_ID | "'";
Else
&Where_Clause = &Where_Clause | " CES_FA_GRNT_ID = " | "'" | CES_FA_CINB_WRK.CES_FA_GRNT_ID | "'";
&Prior_Condition_Exist = "Y";
End-If;
End-If;
<*
If All(CES_FA_CINB_WRK.AID_YEAR) Then
If &Prior_Condition_Exist = "Y" Then
&Where_Clause = &Where_Clause | "AND AID_YEAR = " | "'" | CES_FA_CINB_WRK.AID_YEAR | "'";
Else
&Where_Clause = &Where_Clause | " AID_YEAR = " | "'" | CES_FA_CINB_WRK.AID_YEAR | "'";
&Prior_Condition_Exist = "Y";
End-If;
End-If;*>
If All(CES_FA_CINB_WRK.CES_CGR_STATUS) Then
If &Prior_Condition_Exist = "Y" Then
&Where_Clause = &Where_Clause | "AND CES_CGR_STATUS = " | "'" | CES_FA_CINB_WRK.CES_CGR_STATUS | "'";
Else
&Where_Clause = &Where_Clause | " CES_CGR_STATUS = " | "'" | CES_FA_CINB_WRK.CES_CGR_STATUS | "'";
&Prior_Condition_Exist = "Y";
End-If;
End-If;
If All(CES_FA_CINB_WRK.FILENAME) Then
If &Prior_Condition_Exist = "Y" Then
&Where_Clause = &Where_Clause | "AND FILENAME = " | "'" | CES_FA_CINB_WRK.FILENAME | "'";
Else
&Where_Clause = &Where_Clause | " FILENAME = " | "'" | CES_FA_CINB_WRK.FILENAME | "'";
&Prior_Condition_Exist = "Y";
End-If;
End-If;
If &Prior_Condition_Exist = "Y" Then
&Where_Clause = &Where_Clause | "AND FILENAME = " | "'" | CES_FA_CINB_WRK.FILENAME | "'";
Else
&Where_Clause = &Where_Clause | " FILENAME = " | "'" | CES_FA_CINB_WRK.FILENAME | "'";
&Prior_Condition_Exist = "Y";
End-If;
End-If;
If All(CES_FA_CINB_WRK.CES_FA_LAST_NAME) Then
If &Prior_Condition_Exist = "Y" Then
&Where_Clause = &Where_Clause | " AND CES_FA_LAST_NAME = " | "'" | CES_FA_CINB_WRK.CES_FA_LAST_NAME | "'";
Else
&Where_Clause = &Where_Clause | " CES_FA_LAST_NAME = " | "'" | CES_FA_CINB_WRK.CES_FA_LAST_NAME | "'";
&Prior_Condition_Exist = "Y";
End-If;
End-If;
If &Prior_Condition_Exist = "Y" Then
&Where_Clause = &Where_Clause | " AND CES_FA_LAST_NAME = " | "'" | CES_FA_CINB_WRK.CES_FA_LAST_NAME | "'";
Else
&Where_Clause = &Where_Clause | " CES_FA_LAST_NAME = " | "'" | CES_FA_CINB_WRK.CES_FA_LAST_NAME | "'";
&Prior_Condition_Exist = "Y";
End-If;
End-If;
If All(CES_FA_CINB_WRK.CES_FA_FIRST_NAME) Then
If &Prior_Condition_Exist = "Y" Then
&Where_Clause = &Where_Clause | " AND CES_FA_FIRST_NAME = " | "'" | CES_FA_CINB_WRK.CES_FA_FIRST_NAME | "'";
Else
&Where_Clause = &Where_Clause | " CES_FA_FIRST_NAME = " | "'" | CES_FA_CINB_WRK.CES_FA_FIRST_NAME | "'";
&Prior_Condition_Exist = "Y";
End-If;
End-If;
If &Prior_Condition_Exist = "Y" Then
&Where_Clause = &Where_Clause | " AND CES_FA_FIRST_NAME = " | "'" | CES_FA_CINB_WRK.CES_FA_FIRST_NAME | "'";
Else
&Where_Clause = &Where_Clause | " CES_FA_FIRST_NAME = " | "'" | CES_FA_CINB_WRK.CES_FA_FIRST_NAME | "'";
&Prior_Condition_Exist = "Y";
End-If;
End-If;
If All(CES_FA_CINB_WRK.DATE_LOADED) Then
If &Prior_Condition_Exist = "Y" Then
&Where_Clause = &Where_Clause | "AND DATE_LOADED = " | "'" | CES_FA_CINB_WRK.DATE_LOADED | "'";
Else
&Where_Clause = &Where_Clause | " DATE_LOADED = " | "'" | CES_FA_CINB_WRK.DATE_LOADED | "'";
End-If;
End-If;
&rs = GetLevel0()(1).GetRowset(Scroll.CES_FA_CINB_HIS);
&rs.Flush();
&rs.Select(Record.CES_FA_CINB_HIS, &Where_Clause);
REM &rs.Select(Record.CES_FA_CINB_HIS, "WHERE EMPLID = :1 ", CES_FA_CINB_WRK.EMPLID);
&rs.Flush();
&rs.Select(Record.CES_FA_CINB_HIS, &Where_Clause);
REM &rs.Select(Record.CES_FA_CINB_HIS, "WHERE EMPLID = :1 ", CES_FA_CINB_WRK.EMPLID);
Comments
Post a Comment