Troubles with linked fields
-
I’m having trouble with the populateRelatedField function. I’m not able to retrieve linked values in another table.
My primary Table is one called “Facilities Requests”. I have a field called “Location” that is linked to another “Locations” table. I have the below code, but I’m not able to display the linked location value. Any help is much appreciated!
$results = ""; $query = new AirpressQuery(); $query->setConfig("Facilities"); $query->table("Facilities Requests")->view("All Requests"); $query->addFilter("{Email}='$current_user->user_email'"); $items = new AirpressCollection($query); $linked_field = "Location"; $linked_table = "Locations"; $items->populateRelatedField($linked_field, $linked_table); foreach($items as $i){ $results.= $i["Request Type"].": ".$i["Location"][0]["Name"]."<br>"; }
- The topic ‘Troubles with linked fields’ is closed to new replies.