Column Pick not displaying when type is file

0

I've got a pick setup to another pod where I have a file upload as one of the columns.

When I loop through the records, I see all of the pick columns in my array just fine except if the column is a file. If i switch the column to number, bool, single line or anything it shows up.

Anyone ever have this issue? Its like if a column is a file upload, it doesn't exist.

asked Jul 28 '10 at 5:42

wesbos

56

add comment
enter at least 15 characters

1 Answer

1

Pods goes one level deep when using $Record->get_field('field_name');

If the field_name is a non-PICK / non-File column type, you will see a string / number (depending on the type of data). If the field_name is a PICK / File column type, you will see one of two things:

A: An array of the items selected (if multiple) (each individual array contains B as explained below) B: An array of the related Pod (or File)'s columns

If your field is a PICK field, then it will only display that related datatype's columns. If there is a File column (or another PICK column) within that related datatype, it will not show that data. You can either initiate a new Pod('datatype',$id) with the ID of the datatype item, or you can use another method below.

For example: $Record->get_field('pick_column.file_column.guid');

This will follow the same rules of A and B, in this case we are grabbing only the GUID column of the file. If we took out ".guid" we would get an array of the columns for the file.

Hope this helps clear things up!

answered Jul 29 '10 at 6:21

sc0ttkclark

2123

add comment
enter at least 15 characters