Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

  • Newbies
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>';

?>

 

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

  • Author
  • Newbies

1. yes

2. how will I know? I am a newbie :)

3. when I run it on filemaker pro; it works well and show me all fields and data of students enrolled

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.