I am working in Oracle APEX(Application Express). When I want to create a List of Values (LOV) it gives me only one option for displaying and returning value. Is there any method in APEX so that it can Display me more than one column.
No, there is no way to display more than 1 column by default.
You could alter your lov query to concatenate multiple column values into a display columns
select empno return_value, empno||': '||ename||' - '||job display_value
from emp
You can steer markup through the Popup LOV template too, if you'd want to use a fixed width font.
Use a plugin such as the SkillBuilders SuperLov. However, this plugin does not work in tabular forms.
Roll your own by using for example modal pages (again, SkillBuilders have an excellent plugin for modal pages), or through the use of javascript (ex creating new windows and handling returns)
Related
I have created a Master-Detail page in my Oracle APEX application. Basically i have a list of rows from one table and I can add values to it though a form. That works correctly, validations also work (every column from Master form can be accessed by adding ":" in front and that works in this case). I also have an option to edit click pencil icon in front of every row which lets me to update current row and also displays the Detail part of that row. Detail part is a list of values from another table that is connected to the first one using foreign key (Master-Detail: one to many). It is automatically displayed as interactive grid, so when editing my Master table value I can also add new rows to Detail table, but the validations don't work for Detail table. I tried accessing it's columns the same way as before, but it just doesn't work (tried to add PL/SQL expression validation:
:column >= 0
but that didn't work. How can I enable the validation for interactive grid, because I've looked into some resources about it, but they just show the first way, that doesn't work for me?
For a validation on an Interactive Grid you need to set the attribute "Editable Region" for the validation to your interactive grid. That works ok for me. I tried with a Master Detail on Dept (Master) and Emp (Detail) with a validation on detail of :SAL > 1000
Oracle Apex LOV return mutiple value just like forms 6i lov
in interactive grid layout how to return mutiple value if user select from list
PLEASE SEE PICTURE
LOV
Region detail interactive grid
ig PAGE ITEM TO ig COLUMN VALUE
Dyanmic action on ig column and set value from page item
I just created an Interactive Grid and set one of the columns to be a Popup LOV. In the settings for that column, I saw this:
Once I enabled Multiple Values, I was able to select multiple values:
If that doesn't answer your question, please update your question with more detail as to what you're trying to do. The pictures you provide are not enough to understand.
In APEX 5.1 interactive grid I want to change the type of column (Text field or Select list) based on the content of the current row.
Actually it's a key-value editor on a two column wide table. Values on some keys are free to edit, others are restricted to specific set of values.
Is it possible to do with interactive grid?
I need to implement a simple product form from a block of data called "PRODUCTS".
The products are related to a "Partner" through the field "COMPANIES_PARTNERS_ID".
This field will be represented by an LOV to select the Partner for which we want to visualize your products.
If there is not a partner currently selected, all your products should be displayed. And when a partner is selected, only their products should be displayed.
The form will look like this:
The button to the right of the search field should show the LOV and launch the query. I tried the following code as a "Smart Trigger" when I pressed the button. But it does not work well at all. The LOV list appears twice and when no partner is selected, no product appears.
Could someone help me to implement this functionality? Thank you
You don't need to use ENTER_QUERY command.
had better using DEFAULT_WHERE set with respect to COMPANIES_PARTNERS_ID. If not selected any of the rows of LOV by pressing CANCEL or dissmissing by X sign, then all of the products will be listed(In this case you'll see the first ID, most probably with value 1, since COMPANIES_PARTNERS_ID is not located at a CONTROL block but at the same block,namely PRODUCTS, with other items. As you go down by down-arrow you'll see the other ID values when your cursor is in COMPANIES_PARTNERS_ID field, seems that Number Of Items Displayed is set to 1 for this field, because PRODUCTS block has been set as 10 items displayed ).
So, you may use the following code in WHEN-BUTTON-PRESSED trigger :
DECLARE
V_WHERE VARCHAR2(500);
BEGIN
GO_ITEM('COMPANIES_PARTNERS_ID');
IF SHOW_LOV('COMPANIES_LOV') THEN
V_WHERE:='COMPANIES_PARTNERS_ID='||:COMPANIES_PARTNERS_ID;
ELSE
V_WHERE:='1=1';
END IF;
SET_BLOCK_PROPERTY('PRODUCTS',DEFAULT_WHERE,V_WHERE);
CLEAR_BLOCK(NO_VALIDATE);
EXECUTE_QUERY;
END;
Once you enter query mode (which is what ENTER_QUERY does), further processing is stopped until you execute query.
I presume that you created a LoV properly - the most usual way is to create a Record Group query first, and then create a LoV based on it.
Therefore, I'd ENTER_QUERY in WHEN-NEW-FORM-INSTANCE trigger and let your current push button display LoV and let user select a value into the "Companies Partners ID" item. Executing a query (either by pressing the corresponding toolbar button, shortcut key (F8?) or your new "Execute query" button) would then actually execute query. If master-detail relationship is properly created (using the Data Block wizard is the simplest option), then you'd get rows in the "Products" block.
Put a value in PRODUCTS block WHERE clause' property.
WHERE CLAUSE property:
COMPANIES_PARTNERS_ID LIKE NVL(:lov_block.COMPANIES_PARTNERS_ID, '%')
I am working in Oracle Apex .i want to add TextBox i-e Disease from AddNew Button because i have Multiple Entries for one TextBox.The entries will be selected from another table through POPUP LOV. Below is the picture.
I don't think I can explain it step by step here, but it sounds like you could make use of a Tabular Form in your case.
In a Tabular form, you can dynamically add-update-delete new rows with a button, and for each field you can have Popop LOVS or Comboboxes to select data from.
Here are a few things to note:
When you insert a Tabular Form in your page, you'll instantly get three processes; one for Automated Row Fetching and two for save-update operations. By default, these processes are triggered through a button. You might want to change that since you have other items to submit in your page.
In a tabular form, you define a SQL query and the resulting columns of that query becomes your fields. For each field, you can select whether you want it to be a Combobox, Popup LOV etc.
Since you want to use a single column "DISEASE" in your treatment table, you can use one of the list item types that support multiple values (generally separated by colons (:)) - for example, a Shuttle.