RE: How to create prompt table dynamically for the spe...
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.
RE: How to create prompt table dynamically for the spe...
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 | "';