“include” options  Inserting records and fields

Chapter 1: Developer Features

Including records and fields

Once you select any type of “Include” action, you must explicitly select the rows you want included in the portlet. You can also hide a entire record, an entire field, one cell, or a range of cells in a grid. Although the hidden record or field does not display to the end user, you can use the record’s or field’s values in calculations or event definitions.

StepsIncluding a record or field

  1. Log in to Web Studio, select Build Portlets from the left pane, then click New to open the Portlet Builder.

  2. When the Portlet Builder displays, click the down-arrow to the right of the Add button and select Web Element.

  3. When the Web Studio – New Web Element window appears, select the enter http://bonds.yahoo.com in the Location field and click Find.

  4. In the New Web Element window, verify that One Click is selected as the Format, and click Next.

  5. Perform a One Click capture on the U.S. Treasury Bonds table on the left; that is, when the yellow selection box displays, click anywhere in the Bonds table.

  6. In the window where you choose which capture option to use, click Select to the left of the top grid capture, then click Next.

  7. On the Add Split Rules window, click Next to bypass the options.

  8. On the Define window, click Next to bypass the options.

  9. On the Filter window, specify which records (rows) you want to include in the portlet:

    1. Select Include Records from the first drop-down list in the Add Filter Rule section.

    2. In the second drop-down, select Number.

    3. In the third field, enter 1-8 to indicate that you want to include records 1 through 8 in this portlet, then click Add.

  10. On the Filter window, specify which fields (columns) you want to include in the portlet:

    1. Select Include Fields from the first drop-down list in the Add Filter Rule section.

    2. In the second drop-down, select Number.

    3. In the third field, enter 1-5 to indicate that you want to include fields 1 through 5 in this portlet, then click Add.

  11. Next, hide one of the included records. The record will not display, but you could use the values in a calculation, or copy the values to another field.

    1. On the Filter window, select Include Hidden Records from the first drop-down list in the Add Filter Rule section.

    2. In the second drop-down, select Number.

    3. In the third field, enter the number of the record you want hidden; for this example, enter 2, then click Add. Record 2 is highlighted in the Preview to indicate this record will be hidden.

  12. And finally, hide an entire column.

    1. In the first drop-down, select Include Hidden Fields.

    2. In the second drop-down, select Number.

    3. In the third field, enter the number of the field you want hidden; for this example, enter 4, then click Add. Field 4 is highlighted in the Preview to indicate that this field will be hidden.

      Notice that all of the new rules display in the Current Filter Rules, and that the included and hidden records and fields are highlighted in a different color.

      Figure 1-4: Filter preview

      Click Next.

  13. Enter Bonds for the element name and click Next.

  14. Click Finish.

  15. In the Portlet Builder, click Save to save the portlet with the same name and information.

    Click Preview. You see a grid that incorporates the records and field selection you made.





Copyright © 2004. Sybase Inc. All rights reserved. Inserting records and fields

View this book as PDF