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

I am trying to get results based from a range.

I have Date_Start and Date_End which are exploded so they meet the filemaker formatting.

Then I take a variable of $dateRange and get it to use those two fields mentioned above.

 

I just get an error however of "errorCode=508&errorMsg=Invalid+value+entered+in+Find+mode"

 

Can you see anything out of the ordinary?

 

Thanks for your help and I appreciate your contributions on the forum. Your helping me out anyway.

 

 

<?php require_once('Connections/User.php'); ?>
<?php
//Setup date to be in US format from AU format
$date_input1 = $_REQUEST['Date_Start'];
$date_array1 = explode ("/", $date_input1);
$date_start = $date_array1[1]."/".$date_array1[0]."/".$date_array1[2];

//Setup date to be in US format from AU format
$date_input2 = $_REQUEST['Date_End'];
$date_array2 = explode ("/", $date_input2);
$date_end = $date_array2[1]."/".$date_array2[0]."/".$date_array2[2];

$dateRange = $_REQUEST['date_start'].'...'.$_REQUEST['date_end'];

$founduser_find = $User->newFindCommand('Users');
$founduser_findCriterions = array('Username'=>'=='.fmsEscape($_SESSION["User_tableLogin"]["user"]),);
foreach($founduser_findCriterions as $key=>$value) {
$founduser_find->AddFindCriterion($key,$value);
}

$foundflights_find = $User->newFindCommand('Flights');
$foundflights_findCriterions = array('Username'=>'=='.fmsEscape($_SESSION["User_tableLogin"]["user"]),'Date' =>$dateRange,'Aircraft_Type'=>$_REQUEST['Aircraft_Type']);
foreach($foundflights_findCriterions as $key=>$value) {
$foundflights_find->AddFindCriterion($key,$value);
}

Heya Biggles,

 

So... You've created the $date_start and $date_end variables... but not used them to create the search range.

 

Also, you should put code inside code markers on the forum to preserve formatting (the little < > arrows above)

 

On line 13, try:

 

$dateRange = $date_start.'...'.$date_end;
  • Author

Thank you. The other day I missed a ',' or something similar and the page wouldn't load.

It took me 30 minutes later to work out my stupidity.

 

Thanks for looking it over. Sometimes it needs someone to have fresh eyes looking at it.

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.