Dynamic Prompt Table Depending on a Drop Down Value

Your rating: None Average: 4.3 (8 votes)

In this post I will attempt to explain how to dynamically assign a prompt table depending on a drop down value (see image below)

The table behind the grid is PORTAL_SECDYVW and as you can see from the image below, the PORTAL_AUTHNAME field has %EDITTABLE defined as a prompt table. The PORTAL_AUTHNAME is the "Name" column you see on the grid.

Now, we would want to assign table PSCLASSDEFN_SRC as prompt if the drop down value is Permission list and PSROLEDEFN_SRCH if the value is Role.

/*Record PeopleCode: PORTAL_SECDYVW.PORTAL_AUTHNAME.FieldChange*/
Evaluate PORTAL_SECDYVW.PORTAL_PERMTYPE2
When "P"
   DERIVED.EDITTABLE = "PSCLASSDEFN_SRC";
   PORTAL_SECDYVW.DESCR = PSCLASSDEFN.CLASSDEFNDESC.Value;
   Break;
   
When "R"
   DERIVED.EDITTABLE = "PSROLEDEFN_SRCH";
   PORTAL_SECDYVW.DESCR = PSROLEDEFN.DESCR.Value;
   Break;

When-Other
   
End-Evaluate;
Please try to help out with unanswered topics on the forum. Chances are you have had the same issue/question some time in your IT career!

Comments

Have a question? Please ask it on the forum instead.
Nitin's picture
User offline. Last seen 4 years 11 weeks ago. Offline
Joined: 06/30/2008
Posts: 73
Re: Dynamic Prompt Table Depending on a Drop Down Value

Do remember to add the derived.edittable field on to the page. Otherwise you will get PeopleCode error.

Cheers
Nitin

Lepa's picture
User offline. Last seen 40 weeks 1 hour ago. Offline
Joined: 06/23/2008
Posts: 591
Re: Dynamic Prompt Table Depending on a Drop Down Value

Nice observation Nitin - Sorry forgot to mention that in my post. I actually have the derived.edittable field inside of the grid.

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

Nitin's picture
User offline. Last seen 4 years 11 weeks ago. Offline
Joined: 06/30/2008
Posts: 73
Re: Dynamic Prompt Table Depending on a Drop Down Value

Addition of Edittable field on to the levels can be done as per the Requirement.
Putting it on to level0 on the page will also work.

Nitin

abhi10aug's picture
User offline. Last seen 4 years 9 weeks ago. Offline
Joined: 06/11/2008
Posts: 10
Re: Dynamic Prompt Table Depending on a Drop Down Value

Nice example.

Trupti's picture
Trupti (not verified)
Re: Dynamic Prompt Table Depending on a Drop Down Value

Gud example...

Guest's picture
Guest (not verified)
Re: Dynamic Prompt Table Depending on a Drop Down Value

Any help for Dynamic prompting .

My requirement like below:
user already enter the details of county and state and then while selecting the county value after state, the search page should be display the fallowing:
by example:

COUNTRY : USA
STATE : NJ
COUNTY Name [ edit box]
POSTAL CODE [ edit box]
[ Look uo ]

COUNTY NAME STATE POSTAL CODE

Please help me asap.

Thanks in advance

Guest's picture
Guest (not verified)
Re: Dynamic Prompt Table Depending on a Drop Down Value

Can you make your requirement bit more clear. If you are asking about dynami prompting then it can be done using sqltext. I can help you more if you elaborate on your requirement.

regards,
JN

Guest's picture
Guest (not verified)
Re: Dynamic Prompt Table Depending on a Drop Down Value

hi
will u please clearly explain me the ....
if i change the country field
the state filed need to be changed and
the two fields having promt tables...
how to do it.........
thanks in advance