pluck() on property derived from leftJoin
pluck() on property derived from leftJoin
does anybody know why
var Lat = table.rows( indexes ).data().pluck( 'Lat' );
works, but
var Lat = table.rows( indexes ).data().pluck( 'fi_branch.lat' );
does not?
The result is undefinded.
Could it be that pluck() has a problem with joined tables?
The corresponding line from the php files would be:
Field::inst( 'Lat' ),
and
Field::inst( 'fi_branch.lat' ),
This discussion has been closed.
Replies
Is your data returned as an array or as objects?
If an array then you may need to change your pluck to reference the column number, for example:
var Lat = table.rows( indexes ).data().pluck( 3 );Assuming
Latis column 3.Kevin
It is unlikely you have a property name with a
.in it, andpluckonly operates on a single level. It will not go down and get nested data likecolumns.dataandfields.namewill.Allan
Thank you.
Referencing the column number by number did not work either.
Hence, will look more into columns.data then.