Search This Blog

Tuesday, December 29, 2009

Standalone Rowset

In addition to being able to create records on the fly, you can create a standalone rowset. You can use this type of object to get rid of hidden work scrolls on a page.

Standalone rowsets are not tied to the database. This means if you make changes to data in a standalone rowset, it will not be automatically saved to the database. In addition, a standalone rowset isn't tied to the component processor. When you fill it with data, no PeopleCode programs or events run (like RowInit, FieldDefault, and so on.) Use the CreateRowset function to create a standalone rowset. The parameters for this function determine if the structure of the rowset you're creating is based on an already instantiated rowset, on a record definition, or both.

For example, to create a rowset based on an existing rowset, pass in the name of the existing rowset.

&Level0 = GetLevel0();

&MyRowset = CreateRowset(&Level0);

You can create rowsets based on record definitions. The following code creates a rowset structure composed of four records in an hierarchical structure:





Local Rowset &RS, &RS2, &RS_FINAL;

&RS2 = CreateRowset(RECORD.QA_INVEST_DTL);


&RS2 = CreateRowset(RECORD.QA_INVEST_LN, &RS);


No comments:

Post a Comment