Está en la página 1de 4

For &I = &RS2.ActiveRowCount To 1 Step -1 If None(&CHECK_SEQ) Then &RS2.DeleteRow(&I); End-If; End-For; 2) InsertRow: Syntax : InsertRow(n) Example : &ROWSET.

InsertRow(2); now the code on how to go about doing this: Local Rowset &Level1; &Level1 = GetLevel0()(1).GetRowset(Scroll.PERSON_ADDRESS); For &i = 1 To &Level1.ActiveRowCount &AddrType = FetchValue(Scroll.PERSON_ADDRESS, &i, PERSON_ADDRESS.ADDRESS_TYPE); If &AddrType <> "HOME" Then &Level1(&i).Visible = False; End-If; End-For; Visible Property Description If this property is True, the row is visible if displayed on the current page. T his property can be set False to hide the row. When Visible is set to False to hide a row, the row moves to the end of the row set. This means that the row number of the row being hidden, and any subsequent rows, changes as a result of hiding a row. If the row is later made visible agai n, it is not moved back to its original position, but remains at the end of the rowset. It is just moved to the start of all the other hidden rows. For example, if there are 4 rows in a rowset and row 2 is hidden (that is, Visi ble = False), that row now becomes row 4. In order to make that row visible agai n, row 4 must be set to Visible = True. Alternatively, you can use a row object reference: this remains valid even though the row number of the row may have bee n changed. You cannot hide rows in the current context of the executing program. This mean s Visible cannot hide the row containing the executing program, or in a child ro wset and be executed against its parent rowset. Place your PeopleCode in a paren t rowset and execute it against a child rowset.

Confirm your email address (prabhu_online@yahoo.com) to activate your membership . Resend confirmation or manage your email addresses. My HomeTopicsPeopleCompani esJobsWhite Paper Library HomeActivityGroups ContestsMembers Toolbox for IT Topics PeopleSoft PeopleTools Groups Ask a Questi on PeopleTools Hide rows in level 2 scroll conditionally Asked bykmiller Replies (5) posted Jul 3, 2008

Is this possible using the visible property? I'd like to hide one or more rows i n a level 2 scroll based on a condition. For instance, when parent scroll is at row 1, hide row 1 of 3 in child scroll. When parent scroll is at row 2, hide row s 2 and 3 in child scroll. When I try this, it works in the first rowset of the child scroll to hide the d

esired row(s), but subsequent rowsets of the child scroll, all rows are displaye d even the ones that meet the condition. Should I be using rowset flush and select instead? Or something else? Popular W hite Paper On This Topic Top 5 Trends in B2B Social Media Usage: What Every Mark eter Should Know 5 Replies 0 Venkateshwara Rao Replied Jul 3, 2008 kmiller, Unless there is a problem in the way you are looping through the level1 rows whe re you have the logic to hide the level2 rows I don't see any problem with what you are trying to do. It is doable. Check your code again. Try to debug with a M essageBox to find out what's going on. Flushing out the level2 rowset and repopulating works but not needed in this cas e. It might help if you can post your code here so that someone can point out if there is something wrong. Regards, Rao. 0 James Barril Replied Jul 3, 2008 What event do you trigger your peoplecode? If your parent rowset is in a scroll area that displays one row at a time, there is no event associated to the naviga tion buttons. How do you determine "when parent scroll is at row 2" ? 0 kmiller Replied Jul 7, 2008 Thank you for your response. My code is below. I went ahead and did this using scroll flush, but I'd love to find out how to do it using the visible property. I'm putting my code on the Page Activate event. I &MYRS1 = GetLevel0()(1).GetRowset(Scroll.APPLICANT_DATA); /*Get the level 1 rows et */ For &I = 1 To &MYRS1.ActiveRowCount /*Iterate through the level 1 rowset */ &MYRS1(&I).Visible = True; If &count = 0 Then &MYRS1(&I).Visible = True; &posn_appliedfor = &MYRS1(&I).GetRowset(1); /*get the level 2 rowset correspondi ng to the level 1 rowset */ For &J = 1 To &posn_appliedfor.ActiveRowCount If &DEPTID <> &DEPTIDS Then &posn_appliedfor(&J).Visible = False; End-If; End-For; Else &MYRS1(&I).Visible = False; End-If; End-For; Top 0 James Barril

Replied Jul 7, 2008 When hiding (or deleting) rows in a rowset, you have to process them 'in revers e', i.e. from the last row to the first row. For example: For &i = &rs.ActiveRowCount to 1 step -1 &rs(&i).visible = false; end-for;

f &RSParent.ActiveRowCount > 0 Then &RSParent.DeleteRow(1); End-If; Else &LOGFILE.WriteRowset(&RS); &LOGFILE.WriteLine("****Correct error in this record and delete all err or messages"); &LOGFILE.WriteRecord(&REC2); For &L = 1 To &RS2.GetRow(&I).ChildCount &RS1 = &RS2.GetRow(&I).GetRowset(&L); If (&RS1 <> Null) Then &LOGFILE.WriteRowset(&RS1); End-If; End-For; End-If; End-For; End-Function; rem *****************************************************************; rem * PeopleCode to Import Data *; rem *****************************************************************; Local File &FILE1; Local Record &REC1; Local SQL &SQL1; Local Rowset &RS1, &RS2; Local integer &M; &FILE1 = GetFile("C:\Documents and Settings\12\Desktop\AB.txt", "r", "a", %FileP ath_Absolute);

&LOGFILE = GetFile("C:\Documents and Settings\12\Desktop\AB.txt.err", "W", %File Path_Absolute); &FILE1.SetFileLayout(FileLayout.ACCOUNT_CHARTFIELD); &LOGFILE.SetFileLayout(FileLayout.ACCOUNT_CHARTFIELD); &RS1 = &FILE1.CreateRowset(); &RS = CreateRowset(Record.GL_ACCOUNT_TBL); &SQL1 = CreateSQL("%Insert(:1)"); &RS1 = &FILE1.ReadRowset(); While &RS1 <> Null; ImportSegment(&RS1, &RS); &RS1 = &FILE1.ReadRowset(); End-While; &FILE1.Close(); &LOGFILE.Close();

También podría gustarte