How to create drop-down list with bound a table column - bootstrap-modal

Am new in mvc , bootstrap I want to know how to create a bootstrap drop-down list with product table cloumn product name thanks

Related

Get Select list Item value in IG report column for DML operation

I have a Select list filter on the top of the page. I want its return value to get into any column which I create in IG report automatic DML process.
Suppose, Select list has a value "Step", when I add a row in IG report, that value should be saved into DB for one column which is hidden on UI.
I tried but sometimes it stores the value which I selected in Select list item as my last selection not the current one. Do I need to create Application item for this? Please help. TIA
In this case there is a table ig_tickes with a status column. On the page there is a page item P131_STATUS (select list) with values "OPEN" and "CLOSED". There is an interactive grid on table ig_tickets with column STATUS hidden. Functionality is that user selects a value from the select list and then clicks "Add Row".
Give the interactive grid a static id of "tickets"
Create a dynamic action on change of P131_STATUS with a true action of type "execute javascript code" and code:
var model = apex.region("tickets").call("getViews").grid.model;
model.getOption("fields").STATUS.defaultValue = apex.item( "P131_STATUS" ).getValue();
That's all there is to it.

Use Oracle APEX LOVs to Initialize Multiple Page Items? - APEX 21.1

I understand that the default behavior of LOVs is the following:
SELECT business_desc as display_val,
business_id as return_val
FROM businesses
This attached to a select type page item P1_BUSINESS will display a list and when a list row is selected, then assign the business_id value to the page item P1_BUSINESS.
Is there a way to build a list of values to set the value of more than one page item that are not displayed? Using the below SQL:
SELECT business_desc as display_val,
business_id as return_val,
form_type,
individual_flag
FROM businesses
Where now when a user selects something from P1_BUSINESS it sets the values of that row/record as follows:
P1_BUSINESS = business_id (like it does by default)
P1_FORM_TYPE = form_type (P1_FORM_TYPE is a hidden page item)
P1_IND_FLAG = individual_flag (P1_IND_FLAG is a hidden page item)
I know I can do this with an onchange dynamic action, but just curious if can do inside the LOV or select page item (P1_BUSINESS) declaratively.
In Shared Components > List Of Values, there is an attribute "Additional Display Columns". The help text on that screen says it all Additional display columns can be defined for item types that support multiple display columns, for example the Popup LOV. For item types that do not support multiple columns, these will be ignored. If adding additional display columns ensure that the return column is included in the column list. The return column can be set to Visible No and Searchable No if you do not want it displayed to users.
Example using emp/dept sample data:
Create a list of values on table emp with return empno and display ename. Save.
Edit the LOV and click Additional Display Columns > Select Columns. Select job as additional column.
In the IG, set Visible and Searchable to "No" and Apply Changes.
On the page, create 2 page items: P1_EMPNO (type popup LOV) and P1_JOB (type Text Field)
For P1_EMPNO, pick the LOV created above as shared component > List Of Values and add JOB:P2_JOB under Settings > Additional Output. JOB is the additional column name/alias and P2_JOB is the item it should map to.
Now when you run the page, observe that P1_JOB is populated when you select a value for P1_EMPNO

Reselect item on Select2 multi-value select list

I use plugin Select2 on Apex.
I have scenario like this:
I have three tables: ROOM, MASTER_STUDENT and MAP_STUDENT_ROOM
One ROOM can have many STUDENT
User can select more than one student(with Select2 from MASTER_STUDENT) when create ROOM
When user edit ROOM, previously selected student show in Select2 item(selected item by MAP_STUDENT_ROOM), so user can remove or add more Student
How to achieve point number 4, item Select2 list of values is MASTER_STUDENT but with default selected by MAP_STUDENT_ROOM?
I found this documentation, but i dont know how to apply it.
I'm not familiar with the Select2 plug-in.
Have you considered using the built-in Popup LOV, which since APEX 19.1 now allows multiple selection.
Whether you're using the Select2 plug-in or the built-in Popup LOV, the issue will be the same. You have a form on ROOM, that's trying to take into account an item that isn't part of the ROOM table (its values are stored in MAP_STUDENT_ROOM). The trick is to populate the item correctly during page load so that the item can correctly display the currently assigned students.
How is the item's Source configured? If it's not, set Type to SQL Query (return colon separated value). Assuming you have a primary key item on the page for the room (e.g. P1_ID), enter a query like the following:
select student_id
from MAP_STUDENT_ROOM
where room_id = :P1_ID
Then set Used to Always, replacing any existing value in session state.
This should get the item to display correctly when the page loads. However, you'll still have to figure out how to map the values back to the MAP_STUDENT_ROOM table correctly when the page is submitted. You'll need to add some logic that first deletes rows from the room (P1_ID) that are not in the selection (e.g. P1_ASSIGNED_STUDENTS). You can use APEX_STRING.SPLIT_NUMBERS to help:
delete from map_student_room
where room_id = :P1_ID
and student_id not in (
select column_value
from apex_string.split_number(:P1_ASSIGNED_STUDENTS, ':')
)
Then you can insert rows that are in the selection but not already in the room.
insert into map_student_room (
room_id,
student_id
)
select :P1_ID,
column_value
from apex_string.split_number(:P1_ASSIGNED_STUDENTS, ':')
where column_value not in (
select student_id
from map_student_room
where room_id = :P1_ID
)
I've not tested any of this code, but it should get the points across.
Another option would be to use an Interactive Grid instead of a list of values item. This is a classic master/detail scenario where students could be added and removed below the form region (typically only done after create).

Formatting a portal in FileMaker 13 to show related text only and not keys

I am using FileMaker Pro 13. I need to add Portal to show data from related table.
Some fields which I wanna add to Portal are "Foreign keys" from that related table that are linked-related to third table.
Results I am getting in Portal from those fields are numbers, but I need data (text) from that third table that is related to that "Foreign key".
Is it possible to create portal that shows text related to that foreign key, and if it is, how to achieve that?
Thanks a lot!
Example schema is on link https://www.lucidchart.com/invitations/accept/e45dfdfd-185d-46c8-ad9e-e8e8dc270ee7
In general words, I want to add Portal on layout based on Table3, so I can view related data from Table2, and it would have fields tbl2item, TBL1_foreign key (from where I pull data from Table 1 when I enter data in Table 2, using pop up menu). And in Portal data I need TBL1_foreign key to be represented as text from related table instead of auto-numbers.
Assuming the relationship:
Table 1 --> Table 2 --> Table 3
You are in the layout based on Table 1. Make sure there is relationship to Table 3 and it is in the same group (TOG) in Manage Databases. Just place the field with text from the Table 3 on your portal row and it should work.
Make sure you select the correct relationship for Table 3. In drop-down list it should be in "Related" group. Should look like "Table 3::myFiled" on the layout, with the name the same as the name of your table instance (TO) from "Manage database" which could be different from your base table name
The other option would be to use value list.
I do not see your file, so if it does not work for you, post more details about your setup.

django-tables2: perform an action on click of a row

How to perform some desired action (like saving some values to a session variable that i can use for loading the next page) when a row is clicked in a table created using django-tables2
I am using to django-tables2 to display some data that is coming from DB
In other words I want my table rows to be clickable