It is not the best way to place an input field on your report interface if there are only a certain amount of possible input values. Right?
Let ‘s say we want our users to enter a Currency Code to return the Currency Rate of it..
So you deployed that one to APEX as an interactive report..
Since we ‘ve a bind variable, there has to be page item on your report interface.. If you create your page item as TEXT field, it works just fine.
But the problem is, users can enter currency codes which are not exist :)
To avoid that, we can set the page item type as Pop-Up LoV.
At some point, we will be prompted to define Values for our List.
Now we have 2 + 1 options:
- We can create a static list. It can be useful if we have only a bunch of values and they really are static.
- We can write our query which will return 2 columns: Display Value, Return Value
- We would create a Shared Component so we can reuse it on other pages as well :)
Number one is quite easy.. Just type your values as it ‘s shown below, be careful with spelling.
Number two is a one time solution. Meaning, if you want to do same thing for another interactive report, you ‘ll have to do it again.
Say we have a param table where we can get all possible ISO Currency Codes:
Once we use this simple query as LoV Query, indeed we ‘ll have a dynamic LoV object.
However, to make it more efficient, we can also create a shared component with it so we can could use that object on other pages too.
Go to Application Builder then select your Application and click to Shared Component link.
You ‘ll see some User Interface options there:
- Pick the List of Values.
- Start from scracth
- Set a name
- Click to Dynamic radio button.
Write or Paste your Dynamic LoV Query to the text box.
Complete these steps by following on-page instructions.
Now we have a generic LoV which will list all the possible Currency Codes in our environment.
Now go a few steps back.. As you can see from List of Values Query/ Named LoV Selection there is a yellow marked area called Named LoV.
Click on it and pick your freshly built LoV.
Finally our user can input the currency codes without typing them manually :)