How to create a Dynamin form field in Joomla? - joomla

How can i create a Dynamic List down in Joomla?
Eg: I have departments and relevant sub-departments, so i want to create a drop down to select sub-departments according to the Department selected.
any Help please?

Related

create a drop down in laravel 7 with list values from postgres database, and insert in another text field from the same database

i am new to laravel 7, i have a postgres database table contact with two columns name and email id. the drop menu values will list the values from the name column, the corresponding value in email id has to displayed in the adjacent text box.
could you guys please help with code, in terms of view and controller.
Thanks

Apex 18.1 How to create Multi Column LOV to Return multiple values in multiple columns separately

using Oracle Apex 18.1 and want to have multi-column LOV and return multiple values in columns separately like this will return Department_Id and Manager_Id values in my page items Department_Id and Manager_Id separately.
Well, that's not how Apex LoV works. It must have exactly two values: display and return. Display is what you see, Return is what is actually "stored" into the column. One column, not two (or more) of them.
That's unlike Oracle Forms, which lets you create a LoV that contains many columns and map those values to different form items.
So, what you could try is to use a "Set value" dynamic action and - once you fetch the return value into the item, populate other items on the page.
The way I deal with this is either two LOVs that are parent child.
Set an LOV for departments, and have the second LOV with Managers which takes the department you have as a parameter.
Or I set it up like
SELECT department || ' ' || manager as d
, manager as r
FROM database
And then set up something to fill the department based on the manager chosen.
This assumes the manager is in only one department. I guess you might be able to populate a list with managers who are in multiple departments and then return the PK of the table, and use that return to save into your table.
This might be what you are looking for. Otherwise you might have to make your own.

Create PL/SQL Trigger based on last update date of different views table

Is it possible to create a Trigger based on the last update date of different views? The one that triggers inserting entire employee and dept records in new table when last_update_date changed/updated?
ex views:
CREATE OR REPLACE FORCE VIEW "EMPLOYEE_V" AS
SELECT employee_id
,employee_first_name
,employee_last_name
,emp_creation_date
,emp_last_update_date
FROM employees;
CREATE OR REPLACE FORCE VIEW "DEPARTMENT_V" AS
SELECT department_id
,department_name
,dep_creation_date
,dep_last_update_date
FROM department_id;
I know that this will require 1 trigger which will apply to both tables. But is there an alternative way to avoid several updates / update of records when the trigger in both tables have been fired?
Any help will be appreciated. Thanks :)
One trigger can't be created on multiple tables. You need to create two different triggers for each underlying tables. Thanks..

How to bind multiple tables to single DM form?

I have a DM Form type page, where I would like to show and update values from different tables. By default when I created page, I have been asked for data source, specified only one of the tables, which in fact created process in After Header of type Automated Row Fetch. Also in After Submit a process of type Automatic Row Processing (DML) is created. When I add an item in the page from different table, obviously I am getting an error that the column not found in that table. How can I add more tables into that page, so they will be fetched and updated properly?
There is a common column in all tables, to identify which record I would like to show from each table.
I would like to show and update values from different tables
[...]
There is a common column in all tables, to identify which record I would like to show from each table.
Maybe are you looking for a simple JOIN on your various tables?
Based on Oracle's HR example schema, if you need to display both departments and employees names, you write something like that as your report query:
SELECT department_name as dep_name,
first_name || ' ' || last_name as emp_name
FROM HR.DEPARTMENTS JOIN HR.EMPLOYEES
USING(DEPARTMENT_ID)
In order for this to be usable from APEX form builder, you have to wrap it in a VIEW:
CREATE VIEWS MY_VIEW AS SELECT .... FROM ... JOIN ...
I can't guarantee that the view will be update-able out-of-the-box as Oracle has very specific rules for inherently updatable views -- especially for join views. However, you might be able to make your view updatable anyway by using an INSTEAD OF trigger. If you decide to go that way, maybe worth considering asking an other question on that specific topic if needed.

value of custom product attribute is not storing in database table

I am new in Magento and I am using 1.7.2. I added one product attribute called product type name. It is a drop down field and values are populated from a different custom table called product_type_name. I have done successfully so far. Now I want to store the value of product type name into DB Table while adding a product. For that I have added a column product_attrb_type_name(attribute code) in catalog_product_flat_1 table.
Now while trying to add the product, it is showing the following error
SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name ''
Also while trying to edit a product, the values are not set in the product entry form.
How to fix this issue? Could you please help me?
Thanks in advance.
Magento uses EAV table structure, so once you add a attribute they are stored in eav_attribute table with specific entity type (4 for product).
Now when you load a product object, say
$product = Mage::getModel('catalog/product')->load({{entity_id}}) , where entity_id is your product id,
you can use get and set function on this object to set the values of the particular product instance, i.e.
$product->setProductTypeName('someValue'); in your case a a dropdown ,so
$product->setProductTypeName(attributeId);
$product->save();
and get by
$product->getProductTypeName();
You do not have to insert in catalog_product_flat tables, that is Magento way to normalize data into flat tables.
Hope it helps!

Resources