You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

Creating a Page/ Component

5 replies [Last post]
Guest's picture
Guest

Hi,
I am trying to create a page/component.

The specs are as follows:

1. When the user open the page( say page 1), no data will be loaded in scroll 1.
On level 0 there is a field ( drop down ) which when selected will populate the level 1. level 1 comprises a grid on a header table. Lets call it HDT_TBL with one key.

Each row will have a link when clicked will open a page which will have a image tied to the header table and will have a grid ( based on a DTL table with 2 keys. the header table key and the detail table key. ) T

This page will be created ( I think ) as a 2 level page with level 0 being the HDR_TBL ( all read only fields ) and level 2 ( DTL_TBL )

Question
======

1. Can the level 0 be a derived work record ? I am planning to create page1 with level 0 having only derived work record.
Does the requirement that the scroll need to be based off a database record and cannot comprise of only derived/work record ?

If above is possible, then on page1, the levels will be as follows:
level 0 derived work record with the derived field used to populate the level 1 scroll. with one key.
level 1 will be a scroll/grid with no autoselect and will be based on the header record. with a button to open up page2.

2. Should page 2 be on a separate component ? Or should it be treated as a secondary page which will be opened ?

The action taken on this second page might also require a change on the page1.

Any inputs will appreciated.

CompShack's picture
User offline. Last seen 6 years 16 weeks ago. Offline
Joined: 12/09/2007
Posts: 167
Level0 can be a Work Record

Hi there,
Thanks for the detailed explanation of your post. This is almost exactly the same as something I have done a while back :)

1. Can the level 0 be a derived work record ? I am planning to create page1 with level 0 having only derived work record.
Yes you can, this is what i've done. The only difference is that my field is not a dropdown. I just have few fields on the page at level0. User will inter their information and click search.

I end up building the "where" clause depending on their search criteria and pass it to the level1 grid. I use the following to get the row num returned:

&NUM_READ = &rs_level1.Fill(&swhere_clause);

and then flush the grid, so that when a user chooses a different selection, the search will start fresh.
/*Clean the grid from any previous data before adding new data*/
&rs_level1.Flush();
If &NUM_READ > 0 Then
   &rs_level1.Select(Record.your_grid_table, &swhere_clause);
end-if;

Does the requirement that the scroll need to be based off a database record and cannot comprise of only derived/work record ?
I have 2 records on the grid, a view and a work record.

2. Should page 2 be on a separate component ? Or should it be treated as a secondary page which will be opened ?
I wouldn't make a secondary page, a normal page would do just fine and it can be on the same component. Just make sure that records at level0 on page 2 are assigned the appropriate values and use the "Transfer" function to launch the page when the grid row link is clicked

Hope this helps!

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

Guest's picture
Guest (not verified)
Component/Page

Thanks for the detailed explanation!

A few doubts in my mind:

The page 2 will really be a break up of each of the level 1 row on page 1.
Meaning each level 1 row will have multiple rows in page 1 and each of those rows will have multiple rows.

Since page 1 will be designed as follows:

level 0 derived work records.
level 1: header record ( but will have multiple rows )

I am unclear on how page2 can be added as a part of that unless ( I populate that page myself with peoplecode when I transfer control to that page. )

Is this the way to go:

level 0 same derived work record as on page 1.
level 1 same hdr record as in page 1.
level 2 detail record.

I will have to code to populate level 1 and level 2 and once a button is clicked save the changed and transfer back to page one.

Do you foreesee any issues saving the data as the uses will be inserting/updating rows in page 2 ?

CompShack's picture
User offline. Last seen 6 years 16 weeks ago. Offline
Joined: 12/09/2007
Posts: 167
Parent Child Relationship

Make sure record on page 1 level1 and recored on page 2 level1 have a parent child relationship. That is record on page 2 will need to have all keys from record on page 1 and any additional ones record on page 2 needs.

Level0 fields on page 2 will have to be populated using peoplecode from level1 on page 1. Just use the fieldchange event behind the link that will take you to page 2.

Good luck!

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

Guest's picture
Guest (not verified)
how to transfer a values from one componant to another compone

how to transfer a values from one componant to another component

Lepa's picture
User offline. Last seen 2 years 13 weeks ago. Offline
Joined: 06/23/2008
Posts: 591
Re: how to transfer values from one componant to another compone

Hi there,
Please start a fresh topic for your question. Doing so will give your post more exposure and a better chance to get help :)

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog