copy value

merlino68

Member
I have two lists in an article:
List 1 and List 2
I would like in a calculated field in the second list (element2) have the value of the field (element1) of the list 1, is it possible?
 
How are the two lists related? In other words, how do you know which row in list 2 should have the value from which row in list 1?

-- hugh
 
In which case, a calc element with something like ...

Code:
$myDb = JFactory::getDbo();
$myQuery = $myDb->getQuery(true);
$myQuery->select('element1')->from('list1')->where('exer = ' . $myDb->quote('{list2___eleent_esercizio}'));
$myDb->setQuery($myQuery);
return $myDb->loadResult();

... and set 'only calc on save' to No, would do it. Although note that running queries in calc elements can be "expensive" in terms of resources.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top