Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3999 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted
I have layout called (studentinfo). Studentinfo layout show records from "STUDENTS" table from database. when I run the code below I get all fields data expect:
 
inq_FAM Family 1 [c]::BB_studentID
inq_FAM Family 1 [c]::BB_ParentA_ID
inq_FAM Family 1 [c]::Pa_first
inq_FAM Family 1 [c]::Pa_last
inq_FAM Family 1 [c]::BB_ParentB_ID
inq_FAM Family 1 [c]::Pb_first
inq_FAM Family 1 [c]::Pb_last
inq_FAM Family 2 [c]::BB_ParentA_ID
inq_FAM Family 2 [c]::Pa_first
inq_FAM Family 2 [c]::Pa_last P2b_relation
inq_FAM Family 2 [c]::BB_ParentB_ID
inq_FAM Family 2 [c]::Pb_first
inq_FAM Family 2 [c]::Pb_last
 
On filemaker pro I noticed the ones that are showing have data displaying from:
 
 
STUDENTS::NameFirst
STUDENTS::NameLast
STUDENTS::Sex
STUDENTS::Grade_current
STUDENTS::Adm_enr_status
STUDENTS::P1a_relation
STUDENTS::P1b_relation
STUDENTS::P2a_relation
STUDENTS::P2b_relation
 
 
 
How do I get those fields to show? I am using filemaker pro server 11
 
 
 
<?php
include('config.php');

?>
<style>
        .dataTable td{
                border-bottom:1px solid #ccc;
                border-right:1px solid #ccc;
                padding:1px;
        }
</style>
<?

$findCommand =&$fm->newPerformScriptCommand('studentinfo','Find Enrolled');

// Execute find command
$result = $findCommand->execute();


if (FileMaker::isError($result)) {
    echo "Error: " . $result->getMessage() . "n";
    exit;
}


// Get array of found records
$records = $result->getRecords();

echo  '<table width="100%" border="0" class="dataTable" cellspacing="0">';
echo "<tr><td>BB_studentID</td><td>NameFirst</td><td>NameLast</td><td>Sex</td><td>Grade_current</td><td>Adm_enr_status</td>
<td>P1a_relation</td><td>BB_ParentA_ID</td><td>Pa_first</td><td>Pa_last</td>
<td>P1b_relation</td><td>BB_ParentB_ID</td><td>Pb_first</td><td>Pb_last</td>
<td>P2a_relation</td><td>BB_ParentA_ID</td><td>Pa_first</td><td>Pa_last</td>
<td>P2b_relation</td><td>BB_ParentB_ID</td><td>Pb_first</td><td>Pb_last</td>
</tr>";

foreach ($records as $record) {

            echo "<tr style=''>";
            echo "<td> " . $record->getField('BB_studentID') . "</td>";
            echo "<td> " . $record->getField('NameFirst') . "</td>";
            echo "<td> " . $record->getField('NameLast') . "</td>";
            echo "<td> " . $record->getField('Sex') . "</td>";
            echo "<td> " . $record->getField('Grade_current') . "</td>";
            echo "<td> " . $record->getField('Adm_enr_status') . "</td>";
            echo "<td> " . $record->getField('P1a_relation') . "</td>";
            echo "<td> " . $record->getField('inq_FAM Family 1 [c]::BB_ParentA_ID') . "</td>";
            echo "<td> " . $record->getField('inq_FAM Family 1 [c]::Pa_first') . "</td>";
            echo "<td> " . $record->getField('inq_FAM Family 1 [c]::Pa_last') . "</td>";
            
            echo "<td> " . $record->getField('P1b_relation') . "</td>";
            echo "<td> " . $record->getField('inq_FAM Family 1 [c]::BB_ParentB_ID') . "</td>";
            echo "<td> " . $record->getField('inq_FAM Family 1 [c]::Pb_first') . "</td>";
            echo "<td> " . $record->getField('inq_FAM Family 1 [c]::Pb_last') . "</td>";
            
            echo "<td> " . $record->getField('P2a_relation') . "</td>";
            echo "<td> " . $record->getField('inq_FAM Family 2 [c]::BB_ParentA_ID') . "</td>";
            echo "<td> " . $record->getField('inq_FAM Family 2 [c]::Pa_first') . "</td>";
            echo "<td> " . $record->getField('inq_FAM Family 2 [c]::Pa_last') . "</td>";

                echo "<td> " . $record->getField('P2b_relation') . "</td>";
            echo "<td> " . $record->getField('inq_FAM Family 2 [c]::BB_ParentB_ID') . "</td>";
            echo "<td> " . $record->getField('inq_FAM Family 2 [c]::Pb_first') . "</td>";
            echo "<td> " . $record->getField('inq_FAM Family 2 [c]::Pb_last') . "</td>";

            echo "</tr>";
            $row++;
}
echo "</table>";

echo '<pre>';
//print_r($records);
echo '</pre>';

?>

 

Posted

1. I am assuming that the fields are all on a layout called 'studentinfo'

2. Are the Family fields in a related table, or a related file

3. What happens when you run the script called  'Find Enrolled' inside FileMaker?

 

Cheers

Webko

This topic is 3999 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.