Jump to content

Aussie John

Members
  • Content count

    748
  • Joined

  • Last visited

  • Days Won

    3

Aussie John last won the day on March 22

Aussie John had the most liked content!

Community Reputation

7 Neutral

About Aussie John

  • Rank
    wanna be master

Profile Information

  • Industry
    Architecture
  • Gender
    Not Telling

FileMaker Experience

  • Skill Level
    Intermediate
  • FM Application
    16 Advanced

Platform Environment

  • OS Platform
    Mac
  • OS Version
    Sierra

FileMaker Partner

  • Certification
    Not Certified
  1. I have a projects DB where I am applying "tags" via a multiple checkbox field. I would like to make this field available on the webpage for searches to find the relevant projects. I was successful using a text box field but it would be much more user friendly to have checkboxes of available tags. As time goes on, the tags list may grow. So my question is how would I code the value list options as checkboxes into a search field on the web. My code works for the text field and a single checkbox but not multiple checkboxes. I tried to create a search array using some manual entries and $find = $_POST['search','search1'] but this didn't seem to work. In any event I don't wish to code the options and I would like the list to be dynamic to reflect the Value list which only give values found in that field. In the code below $options are the values that I would like the checkboxes to be. You can see the results at arina.biz/phptest.php I have attached the whole code for reference. /*================================================================ * * Get list of Tagss before creating the form * *=================================================================*/ $cmd =& $connection->newFindCommand('WebSearch'); $cmd->addFindCriterion('seachvaluelist', '*'); $result1 = $cmd->execute(); $records = $result1->getRecords(); $record = $records[0]; //the GET VALUE COMMAND $options = $record->getField("seachvaluelist"); Echo 'Enter key words and click <b>SUBMIT</b> (or <b>RETURN</b> key)<br><br><br>'; echo 'Choose from… '.$options.'<br><br>'; Echo 'Separate multiple Key words with a space.<br>'; ?> <form action='phptest.php' method="post" enctype="multipart/form-data"> <input type="text" name="search"><br> <input type="checkbox" name="search" value="Anatomy"> <label for="search">Anatomy</label><br> <input type="checkbox" name="search1" value="STEM"> <label for="search1">STEM</label><br> <input type="checkbox" name="search2" value="Laboratory"> <label for="search2">Laboratory</label><br> <input type="checkbox" name="search3" value="Informallearning"> <label for="search3">Informal learning</label><br> <input type="submit"> </form> <?php /* =================================================================== search and print ===================================================================*/ $find = $_POST['search']; phptest.php
  2. Aussie John

    Change Percentage From numbers

    For my purposes I use auto entry calculation which says case( x=>1,x/100,x) and format as percent. With caveat this fails if there are ever anticipated results of less than 1
  3. Aussie John

    getting started FM on the web

    One thing that is eluding me (well actually multiple things) but when the page first loads it is supposed to show a list of colours that are in the database (from a calculation field of the valuelistitems). Unfortunately this only shows after the first search is run. If I move the list before the find commands the find stops working or the input box doesn't show.
  4. Aussie John

    getting started FM on the web

    If anyone is interested here is the final code - (which can be viewed at Arina.biz/testprojects.php ) <?php //================================= define('FM_HOST', "localhost"); $fm_file = "TestProjects"; $fm_user = 'PHP User' ; $fm_pass = 'arina'; $layout_name = 'People'; include("FileMaker.php"); //include ('include/filemaker14/FileMaker.php'); # instantiate a new FileMaker object $connection = new FileMaker($fm_file, 'https://fms.arina.biz:444', $fm_user, $fm_pass); $accessed = $connection->listLayouts(); if(FileMaker::isError($accessed)){ echo $accessed->getMessage(); echo "Sorry, the database is not available at this time.<br /><br />Please use your browser's back button to return to the ARINA webpage."; exit; } // else{ // // else not usually left in File; it is here for testing purposes // // print_r($accessed); // echo '<br><br>'; // } Echo 'Enter a colour and click <b>SUBMIT</b> (or <b>RETURN</b> key)<br>Separate multiple colours with a space<br><br>'; ?> <form action='testprojects.php' method="post" enctype="multipart/form-data"> <input type="text" name="search"> <input type="submit"> </form> <?php $find = $_POST['search']; $cmd =& $connection->newFindCommand('People'); $cmd->addFindCriterion('colour', $find); $result = $cmd->execute(); if (FileMaker::isError($result)) { echo 'Unable to find this colour: ' . $result->getMessage() . ' - ERROR CODE (' . $result->getCode(). ')'; die(); } $records = $result->getRecords(); $record = $records[0]; //the GET VALUE COMMAND $options = $record->getField("Getvalue"); echo 'Choose from… '.$options.'<br><br>'; echo 'Last searched for… '.$find,'<br>'; echo '<br> Found…<br>'; foreach ($records as $record) { $name = $record->getField("FirstName"); $color = $record->getField('colour'); echo $name.' - '. $color; echo '<br>'; } ?> )
  5. Aussie John

    getting started FM on the web

    Firstly Thanks to everyone who help get me started. Not surprisingly I have plenty of questions but I think I will start a new thread.
  6. Aussie John

    getting started FM on the web

    Thanks Idealdata - that is very helpful. I am now getting results from the database.
  7. Aussie John

    getting started FM on the web

    Thanks Doughemi - I can indeed connect to the FM Server with a "connected" message but it still doesn't show any Filemaker results. And thanks IdeaData too. I have read the instruction (chapter 7 para 4) but I don't understand it . Im assuming site directory structure refers to my Web data? so why would I move this - no one would find it - as web and file-maker are on different machines. Also the Web Server doesn't have that folder. Clearly I am not understanding what is expected here. Manual quote Copy or move your site directory structure and files to the following folder on the web server. For Apache (OS X) through HTTPS: /Library/FileMaker Server/HTTPServer/htdocs/httpsRoot
  8. Aussie John

    Private key

    SOLVED: I have no idea why but tried the import without a password and it worked.
  9. Aussie John

    Private key

    Tried a few different ways of doing the same thing (eg exporting directly and not copying to the FMS server machine). The error has change to: "Cannot Decrypt the private Key file with the password. make sure the key file and password are correct" So at least I may have made some progress.
  10. Aussie John

    Private key

    I should add I didn't generate the certificate request from the Filemaker console.
  11. Aussie John

    Private key

    I have tried a few things without success but I feel I must be close. Maybe someone can see the error of my ways. My process 1 Select the certificate in keychain. 2 Export to .p12, giving it a password as requested 3 Convert to .Pem file using: openssl pkcs12 -nocerts -nodes -in /Users/svradmin/Documents/serverkey.p12 -out Documents/serverkey.pem 4 Copy the PEM file to the filemaker server machine (along with the two .crt files I got from Godaddy) 5 import into filemaker using admin console. Error: private key does not match the Certificate.
  12. Aussie John

    Private key

    Hi I have a SAN SSL certificate with the primary and the intermediate .ctr files Is any one able to explain how I generate the private key (on Mac OSX server High Sierra) thanks Kindly
  13. Ash Sorry my error the reference to ID should be person ID ( ID_person) not the Date record ID which is irrelevant Temporarily, to see your results change instantly it helps if Datecalc is unstored Case(GetNthRecord ( Date::id_Person ; Get ( RecordNumber ) - 1 ) =Date::id_Person; Date::Date - (GetNthRecord ( Date::Date ; Get ( RecordNumber ) - 1 ) ); 0) I should add that a change in the sort order will ruin your results.
  14. I can’t test this but case(GetNthRecord ( ID ; Get ( RecordNumber ) - 1 ) =ID, Date - (GetNthRecord ( Date ; Get ( RecordNumber ) - 1 ) ), 0) there are probably more elegant solutions
  15. It is getting an error on the first entry for each ID where there is no Nth record to get the previous date from.
×

Important Information

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