Multiple Drop Down in Form. How to manage in db tables - database

I am creating an application for import export system.
In this application I have many forms.
Now let's talk about a single form.
I have 8 drop downs in this form.
To allow admin to add new values to each drop down i had to create table for each drop down so that it has all the values admin has defined.
I want to know is there an alter native of this problem because I see in the application there are nearly 35 different drop downs and I don't want to create 35 tables and forms then CRUD for every dropdown.
How can I manage it in an optimized and simple way?

I have found a solution to this problem with this methodoly
Table : dropdown
Columns : id , dropdown_name
Table : dropdown_fields
Columns : id , field_name , dropdown_id
This will i will create two cruds one for dropdown labels. In this admin will define crud title or name and nothing more.
In the second one admin will first select dropdown name from a dropdown coming from database table dropdown and then he will have a single field field_name to define.
And in the form where i have required these drop downs i can play with ids. Done it!

Related

Trying to map the output of 2 different API calls based on select dropdown to one single table in React JS

I have 2 select dropdows in which i select the username in one and the project name in the other. I need to display which user is mapped to which project in a table.
The requirement is:
I need to show one single user mapped to all different projects
I need to show all the users mapped to one single project
i need to get these both done in a single table, but these are 2 different select dropdown options.
As of now, i am ablw to individually map it to seperate tables.
I need to have a single handle function for both the select dropdows, so when i change in either, the result of the select which i clicked on should be shown in the table.
please help me out
This is what i have now

How do I get access database to form a relationship from one to many?

In my database I have formed the relationship from one to many on the right of the screen shot, but for some odd reason it will not let me do it on the left of the screenshot. I want to connect both cust_IDs (or customer IDs) and make it a one to many relationship. I would really appreciate any help this because it will allow me to practise forming one to many relationships on Microsoft Access.
Here is my screen shot of the problem
This is easy in Access and will not require any code.
Create a main form based on tblCustomers.
Save this form.
Now create a multiple items form based on tableRentals.
Delete the column for vid_no, and then use the combo box wizard to create a combo box – this will allow you to select from tblVideo, and return/set the vid_no column.
Ok save this form.
Now re-open the main tblCust form in design mode, and drag + drop in the multiple items form you created above.
You should now have a working form.

Use dropdown list to trigger operation to different controller

I would like to use angularjs to create a table with a drop down list contains different operation and one cloumn of checked box. Once checked box is selected, different operation
The table is pretty much like airflow tables with variables. once secret_password box is selected based on "Withselected" tab execute different operation.
However should I created the table?

How to populate a text item from Oracle table using Oracle forms (Middleware) 11gR2

I am using Oracle with Oracle Forms builder (Middleware) both 11gR2. I am creating a system for purchasing records. I have the following 2 tables.
(a) product (master) : prodid(PK), prodname ...... etc.
(b) purchase (detail) : prodid(FK), quantity, ...... etc.
My plan: All the product details will be in the product table. purchase table will be used only to input purchase information. This table can't input any new product. If any new name, that info will have to be input into product table first. This way I can reduce duplicate names.
Now I am having difficulties relating to prodname (name of the product) column in the form.
I created forms using the purchase table only. This table does not have the prodname (because I put this field in product table) column. But during data entry, they need to see the product name !
So I created text item (tabular, database - no). Then I created LOV, attached to text item, input the prodid in prodid field in the form. LOV part is fine.
I run the form. click the text item, LOV appears, select a name, click OK. product name, product id, etc. appears in their fields as it should be. LOV is working fine. Now I can only input data but having difficulties updating. I mean if I input a name (LOV) in the text item, press execute query, shows records from the database but names in the text item disappear. Since the name is not here, it's not comfortable to update.
I think LOV is not the good idea here. May be I need to use PL/SQL in a trigger somewhere.
But I could not figure it out. I searched google but no luck. Is there anyone who can give me any idea or some example code/trigger please.
Since the product name is an non-database item, when execute query runs, the field is cleared and since no column is assigned to that field, it doesn't repopulate.
The usual way to populate this field is to have a function which returns the product name based on the id that is pressed and call the funtion in POST-QUERY trigger.
Basically it's a pretty simple task but I was having difficulties due to the lack of my experience. However, what I have done is -
create the text item (name : product_name) in the canvas
set properties for the product_name (database : No, .... etc as needed).
Create a block level POST-QUERY trigger and write the PL/SQL block to populate the field. For example, I wrote the following.
BEGIN
SELECT prodname INTO :purchase.product_name
FROM product WHERE product.prodid = :purchase.prodid ;
END ;
That's it and when perform execute_query in the form, it will bring the product name from another table. - Query problem is solved.
Now create an LOV using product table to bring the product name and product id.
Associate this LOV to the product_name text item. So whenever you need to input information about a purchase, just use the LOV to populate the product name field. And then input the subsequent fields as well.
This way both of my issues (query and data entry) are resolved.
I did this according to the suggestions given by Sathya and a video (6 minutes) from the youtube at https://www.youtube.com/watch?v=0nqldnGt8KA.
Thanks to Sathya and youtube.

make field a dropdown in access 2007

I'm creating a HR database in access 2007
I have a main table of employee info and several tables that relate to that table ( education for example) that list the acceptable elements that can populate that cell in that row
When i create a form it was created as just a plain text field which is constrained but I wanted to create a dropdown that had just the data that they are allowed to enter to avoid confusion.
You should be able to right-click the text box and select Change To -> Combo Box.
If you are not familiar with creating controls, it is best to use the wizards. Select a combobox from the toolbox and add it to your form, you will be guided through creating the type of combo that you want.
You should also examine the relationships you have created.

Resources