AnsweredAssumed Answered

PHP API addFindCriterion wont find records

Question asked by zacckos on Jan 19, 2016
Latest reply on Sep 26, 2017 by ProgramDesign

Hello Guys

This has probably been asked before I have attempted a search I cant spot the same issue fixed anywhere

Preface: I'm pretty new to FM and its PHP API,

However I am having quite a confusing issue every time I try to filter records using addFindCriterion the result set is always empty even when I am sure the record exists. I'm pretty sure I'm the one using it wrong but would anyone care to look at my code snippet and help .



When I use the findAnyCommand or the findAllCommand I do get results could anyone see what I am doing wrong and point a noob down the correct chute.



****** Code Snippet*************

  $username = "";

  $findcommand = $fm->newFindCommand('Contact Details');

  $findcommand->addFindCriterion("user name", $username);

  $result = $findcommand->execute();

  echo "<pre>";






  echo "<p> Read Error: ". $result->getMessage() . "</p>";