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.

Populating 3 fields which are related to each other on a page.

8 replies [Last post]
Guest's picture
Guest

Hi
have to develop a custom page which has 3 fields, say f1, f2 anf f3. all the field are non keys on the underlying record.

All these three field to be populated have valid values and are based on another table with f1,f2 an f3 as the keys.

The requirement is to present the valid valued from this table to the user and populate all the 3 fields on the custom page being developed when the user selects a choice.

Any ideas ?

Is there anything delievered in HCM that I can look at ?

CompShack's picture
User offline. Last seen 6 years 1 week ago. Offline
Joined: 12/09/2007
Posts: 167
Re: Populating 3 fields which are related to each other

The requirement is to present the valid valued from this table to the user and populate all the 3 fields on the custom page

So you need to have 3 fields on the page with each field as a drop down list, or a prompt button. Once a user chooses a value, say f1, you would want another field on the page to show a related value to the one the user chose. If so, then make the "2nd" f1 field as related display to the 1st f1 field and so on.

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

HH's picture
HH (not verified)
Re: Populating 3 fields.

Hi there,

I would rather have all the valid combinations display on a page/popup and have the users select one of the valid combinations and eventually populate the 3 fields on the main page.

Is it possible to use a secondary page to achieve this ? Or are there some other options. Bear in mind than non of 3 fields are keys on the main page.

CompShack's picture
User offline. Last seen 6 years 1 week ago. Offline
Joined: 12/09/2007
Posts: 167
Re: Populating 3 fields.

I don't think a secondary page would work. The way i see it, you are going to have to use either a prompt or a drop down. Once f1 is filled out by a user, f2 and f3 will change to show valid values (again prompt or drop down).

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

HH's picture
HH (not verified)
Re: Populating 3 fields which are related.

Ok. I would still like to try secondary page before ruling it out.

I am bumping into this:

On page activate of the secondary page, I am getting the scroll on level 1 and flusing it. SO far so good. But when I call the select method to populate the data, I am getting an error.

"AN Sql error occured. Please consult your system logs." and then
Error in peopleocode scroll select processing. ..

All that I am doing is:

&L1_RS.Select(Record.MY_TBL, "WHERE EMPLID = :1", &EMPLID);

What could be the cause ? I will be tracing to get an understanding of what is causing this issue.

HH's picture
HH (not verified)
Re: Populating 3 fields

OK.
The issue was due to the table structure.

I got the secondary page to open up using domodal.
But for some reason, I am not able to go back to the main page by clicking the OK button.

Wondering whether I can do something about it.

HH's picture
HH (not verified)
Re: Populating 3 fields

So far so good.
I only have one problem to figure out.

I was to use my ok and cancel button to dismiss the page and go back to the main page. ( Using end modal. ) instead of the normal ok and cancel button.

Is it possible to hide those buttons ?

HH's picture
HH (not verified)
Re: Populating 3 fields.

Managed to get it working.
Used own buttons and endmodal and I was able to populate the fields on the main page based on a user selection on the secondary page.

CompShack's picture
User offline. Last seen 6 years 1 week ago. Offline
Joined: 12/09/2007
Posts: 167
Re: Populating 3 fields

I'm very impressed. You don't give up easily and you are working late! Thanks for posting your solution on the site, I greatly appreciate that! Go get some rest now :)

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