Forums / Setup & design / Fetch the content of a Matrix and display them
Softriva .com
Thursday 30 November 2006 8:25:52 am
My class has the following attributes:
Class: Dept
Dept_NameDept_Emp (Matrix of one col)
Dept Name: FINDept_Emp->Matrix= (Joe, Mike, Jack)
Dept_Name: HRDept_Emp->Matrix=(John, Jeff, Suzan)
How can I fetch only the employees names then display them regardless if there are duplicate names or not.
Claudia Kosny
Saturday 02 December 2006 3:32:50 am
Hi OOzy
The content of an ezmatrix attribute is an object of type ezmatrix. Here you can see what attributes this object has: http://ez.no/doc/ez_publish/technical_manual/3_8/reference/objects/ezmatrix
So if you matrix has only one column I think it should be sufficient to use ...data_map.dept_emp.content.cells. This should give you an array of all entries in the matrix. Then just loop over this array using foreach and you are done.
Claudia