Steps to insert “ALL” as a value in Object LOV to select all values in WebI prompt
Here in this document I am trying to show how we can insert “ALL” value in the LOV of the particular object so that we can use it as prompt and user can select only one value as “ALL” to select all the available LOVs in one click and user need not select all the values from the list.
Below are the steps.
1. Edit the lists of value of an object through object properties where you want to insert “ALL” value. Write a custom query to append UNION query with ALL value.
By default your object gives below query which gives distinct list of values.
select OBJECT from TABLE //Here OBJECT means the object on which you want “ALL” value
Write a custom sql as below
select OBJECT from TABLE
SELECT ‘ALL’ from dual //if underlying database is oracle. Check the union query for other DB and write the same.
- If you are using UDT then the EDIT LOV option is present in the Object properties.
- If you are using IDT, then you need to create List of value object in business layer then create a parameter object and associate newly created list of value object to the parameter and use the parameter in below steps
2. After writing the above code in LOV in object Properties, you can see the “ALL” value inserted in the LOVs of the object with other available values.
3. Create a condition object at universe level with the below code
@(Class\OBJECT) = @Prompt(‘Select OBJECT:’,’A’,’Class\OBJECT’,mono/Multi,free/constrained,Persistent/Not_Persistent…)
“ALL” = @Prompt(‘Select OBJECT:’,’A’,’Class\OBJECT’,mono/Multi,free/constrained,Persistent/Not_Persistent…)
NOTE: If you are using IDT then the parameter object needs to be taken instead of the OBJECT.
4. Take the above created condition object in the query filter on the BO report.
5. If user selects any value from LOV other than “ALL” then first code will execute(Before OR) and it will not go to the second line code(ALL)
6. If user selects “ALL” value from LOV then the second line code will execute (After OR) and not the first one.
NOTE : This method is only applicable when you want to see “ALL” as a value in the LOV of the object to select all values in one click
Otherwise you can make the prompt as OPTIONAL and write a proper prompt text so that user can understand not to select any value to select all values by default.
Developer can take any value instead of “ALL” as per requirement from the end user.