How to create prompt table dynamically for the specified field

Showing Answers 1 - 6 of 6 Answers

SN

  • Feb 24th, 2006
 

If you want the prompt table to vary depending on the context of the field, indicate a field in the derived or work record (DERIVED) that contains the name of the prompt table at runtime.  In this field enter %FieldName.

The % is required, and indicates that you?re referencing a derived or work record definition named DERIVED. FieldName is the name of the field in that DERIVED record definition.

  Was this answer useful?  Yes

Nilesh

  • Jun 1st, 2006
 

It will be done by people code by a function .Not  sure but it is setprompt some think like this.

  Was this answer useful?  Yes

US

  • Oct 9th, 2006
 

If(condition)

%derivedrecordfield.value=promttable_1

else

derivedrecordfield.value=promttable_2

end-if;

 

OR Using Case statement

  Was this answer useful?  Yes

Vinay

  • Mar 2nd, 2007
 

There are 2 ways of creating dynamic prompts :-
1. In the record field properties mention the prompt table as %EdittableXX. Assign the view or record name based to the field based on the logic.

For example on my page  I have Businesss Unit and Project ID. If i click on the Project ID directly it needs show all the Project IDs. If I enter the Business Unit and then click on the project ID prompt then it should show projects realted to that business Unit. In this scenario you can assign view ps_project_all_vw to the prompt on rowinit of the Project ID.

DERIVED.EDITATTABLEXX =  ps_project_all_vw

On the fieldchange of Business Unit the code can be written to assign another view which has Business Unit as key and search key

DERIVED.EDITTABLE.XX = ps_project_bu_vw

2) You can use Dynamic view and SQL text as dynamic views.
In the above scenario create a dynamic view which shows all Project IDs and assign to Project ID field properties as prompt. On the FieldChange of Business Unit you can write the code as

PS_RECORD.FIELD.SQLText = "Select project_id from ps_project where business_unit = '" | PS_RECORD.BUSINESS_UNIT.value | "';

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions