hi, everybody, first that all, excuses for my bad english... im a junion analist, and i have to make a modification in a original peoplesoft page, the client want to put in the page 2 new fields one of them to select item witholding transaction, and the other one to enter the number of the witholding voucher, i did those, and i store it in a record made by myself, but now, they want to gray or ungray those new field depending the selection of a checkbox placed in the level 0 scroll of the page.
in my fields i put the peoplecode necesary to gray the field if the checkbox is not selected, but, when i select the checkbox my fields are still gray....
in the checkbox fieldchange event i tried to put a peoplecode to ungray my field but it doesn't work...
i try with this code in the checkbox field change event
If %Component = "WS_WORKSHEET_IC" Then
If WS_ITEM.ITEM_SELECTED = "Y" Then
UnGray(WTHD_VCHR_INFO.AR_TRANS_TYPE);
UnGray(WTHD_VCHR_INFO.AR_WTHD_VCHR);
Else
Gray(WTHD_VCHR_INFO.AR_TRANS_TYPE);
Gray(WTHD_VCHR_INFO.AR_WTHD_VCHR);
End-If;
End-If;
and it doesn't work
and i gray my field in the rowinit event this way
If %Component = "WS_WORKSHEET_IC" Then
If WTHD_VCHR_INFO.ITEM_SELECTED = "N" Then
Gray(WTHD_VCHR_INFO.AR_TRANS_TYPE);
Gray(WTHD_VCHR_INFO.AR_WTHD_VCHR);
Else
UnGray(WTHD_VCHR_INFO.AR_TRANS_TYPE);
UnGray(WTHD_VCHR_INFO.AR_WTHD_VCHR);
End-If;
End-If;
and i was trying with a peoplecode for scrolls, but i don't have a clue about what should i have to do...
For &ROW = 1 To ActiveRowCount(Record.WS_ITEM)
If FetchValue(WS_ITEM.ITEM_SELECTED, &ROW) = "Y" Then
UNGray(WTHD_VCHR_INFO.AR_TRANS_TYPE);
UNGray(WTHD_VCHR_INFO.AR_WTHD_VCHR);
Else
Gray(WTHD_VCHR_INFO.AR_TRANS_TYPE);
Gray(WTHD_VCHR_INFO.AR_WTHD_VCHR);
End-If;
End-For;
thanks for any help that you can gave me...
Title | Under | Posted on |
---|---|---|
Component interface Error: no rows exist for the specified keys | PeopleSoft Technical | 03/15/2019 - 3:54am |
ADD 24 months starting from current month.(peoplesoft) | PeopleSoft Functional | 07/29/2018 - 8:44pm |
TRC values dropdown | PeopleSoft Technical | 04/04/2018 - 12:54am |
how to find missing sequence in GRID and print the mising sequence number while saving through peoplecode | PeopleSoft Technical | 09/11/2017 - 4:49am |
sorry, my bad, im the author of this thread, bu i forgot to login at the site, this is the page itself
see the image below:
If %Component = "WS_WORKSHEET_IC" Then
If WS_ITEM.ITEM_SELECTED = "Y" Then
UnGray(WTHD_VCHR_INFO.AR_TRANS_TYPE);
UnGray(WTHD_VCHR_INFO.AR_WTHD_VCHR);
Else
Gray(WTHD_VCHR_INFO.AR_TRANS_TYPE);
Gray(WTHD_VCHR_INFO.AR_WTHD_VCHR);
End-If;
End-If;
This should work fine if you write this in the FieldChange peoplecode of the record field WS_ITEM.ITEM_SELECTED. If it is not working check if deferred processing is enabled for the field WS_ITEM.ITEM_SELECTED.
hey, thanks for answer, well i already try to put those people code where you said, and disable the allow deferred processing, but it doesn't work.... my problem is that the checkbox is on the level 0 of the scroll and to put the new fields i create a new scrollarea located on the level 2 of the scroll...
i tried too, on my record i inserted a field called as the checkbox field name "item_selected" and i puted as key, and in the WS_ITEM.ITEM_SELECTED.fieldchange i tried to change the value of the WTHD_VCHR_INFO.item_selected thru peoplecode like this:
If WS_ITEM.ITEM_SELECTED = "Y" Then
WTHD_VCHR_INFO.ITEM_SELECTED = "Y";
Else
WTHD_VCHR_INFO.ITEM_SELECTED = "N";
End-If;
but a new error appears saying that WTHD_VCHR_INFO.item_selected doesn't exist on the page, i tried this because i puted the code to gray or ungray my fields in the WTHD_VCHR_INFO.item_selected.fieldchange, to test, but not work
well after some help of a friend who has the peoplecode peoplebooks, we've found a solution for our problem, with this code:
in the rowinit of the fields that i wat to gray or ungray we put this code to gray it by default
If %Component = "WS_WORKSHEET_IC" Then
Gray(WTHD_VCHR_INFO.AR_TRANS_TYPE);
Gray(WTHD_VCHR_INFO.AR_WTHD_VCHR);
End-If;
and in the fieldchange event of the checkbox that i want to use for ungray my fields we put this code:
If %Component = "WS_WORKSHEET_IC" Then
If WS_ITEM.ITEM_SELECTED = "Y" Then
UnGray(Scroll.WS_ITEM, CurrentRowNumber(1), Scroll.WTHD_VCHR_INFO, 1, WTHD_VCHR_INFO.AR_TRANS_TYPE);
UnGray(Scroll.WS_ITEM, CurrentRowNumber(1), Scroll.WTHD_VCHR_INFO, 1, WTHD_VCHR_INFO.AR_WTHD_VCHR);
Else
Gray(Scroll.WS_ITEM, CurrentRowNumber(1), Scroll.WTHD_VCHR_INFO, 1, WTHD_VCHR_INFO.AR_TRANS_TYPE);
Gray(Scroll.WS_ITEM, CurrentRowNumber(1), Scroll.WTHD_VCHR_INFO, 1, WTHD_VCHR_INFO.AR_WTHD_VCHR);
End-If;
End-If;
and the checkbox that we want to use to gray or ungray my fields we disable the allow deferred processing and thats all...
Local Rowset &rs_list1;
&rs_list1 = GetLevel0()(1).GetRowset(Scroll.WS_ITEM);
For &I = 1 To &rs_list1.ActiveRowCount
If &rs_list1(&I).WTHD_VCHR_INFO.ITEM_SELECTED = "N" Then
Gray(&rs_list1(&I).WTHD_VCHR_INFO.AR_TRANS_TYPE);
Gray(&rs_list1(&I).WTHD_VCHR_INFO.AR_WTHD_VCHR);
Else
UnGray(&rs_list1(&I).WTHD_VCHR_INFO.AR_TRANS_TYPE);
UnGray(&rs_list1(&I).WTHD_VCHR_INFO.AR_WTHD_VCHR);
End-If;
End-For;
/*** Demo Code For Traversing Level 0 to Level 3 ***/
Local Rowset &rsLevel0, &rsLevel1, &rsLevel2, &rsLevel3;
Local Row &rowLevel0, &rowLevel1, &rowLevel2, &rowLevel3;
Local Field &fldLevel0, &fldLevel1, &fldLevel2, &fldLevel3;
Local integer &i, &j, &k;
&rsLevel0 = GetLevel0();
/** Get Level 0 Field **/
&fldLevel0 = &rsLevel0.GetRow(1).GetRecord(Record.L0_REC).GetField(Field.L0_FLD);
/** Get Level 0 Field Value **/
&Level0FldValue = &fldLevel0.Value;
&rowLevel0 = &rsLevel0.GetRow(1);
&rsLevel1 = &rowLevel0.GetRowset(Scroll.LEVEL1_RECORD);
For &i = 1 To &rsLevel1.ActiveRowCount
/** Get Level 1 Field **/
&fldLevel1 = &rsLevel1.GetRow(&i).GetRecord(Record.L1_REC).GetField(Field.L1_FLD);
/** Get Level 1 Field Value **/
&Level1FldValue = &fldLevel1.Value;
&rowLevel1 = &rsLevel1.GetRow(&i);
&rsLevel2 = &rowLevel1.GetRowset(Scroll.LEVEL2_RECORD);
For &j = 1 To &rsLevel2.ActiveRowCount
/** Get Level 2 Field **/
&fldLevel2 = &rsLevel2.GetRow(&j).GetRecord(Record.L2_REC).GetField(Field.L2_FLD);
/** Get Level 2 Field Value **/
&Level2FldValue = &fldLevel2.Value;
&rowLevel2 = &rsLevel2.GetRow(&j);
&rsLevel3 = &rowLevel2.GetRowset(Scroll.LEVEL3_RECORD);
For &k = 1 To &rs_level3.ActiveRowCount
/** Get Level 3 Field **/
&fldLevel3 = &rsLevel3.GetRow(&k).GetRecord(Record.L3_REC).GetField(Field.L3_FLD);
/** Get Level 3 Field Value **/
&Level3FldValue = &fldLevel3.Value;
&rowLevel3 = &rsLevel3.GetRow(&k);
/* Do Processing **/
/* If Any Summation Calculation */
/* &sum = &sum + &Level3FldValue */
End-For;
End-For;
End-For;