Top Experts [learn more]Top 4-10

9743 K

2458 K

1525 K
4. tcmeyers
5. kbata
6. Martie
7. Hammerton
8. rrenfrow
9. bneeman
10. plegler
Welcome, Guest. Please login or register.
May 05, 2015, 08:16:20 AM

Login with username, password and session length
Search:     Advanced search
Welcome to the FileMaker Web Masters Exchange.  If you have any questions about how to use this forum, please watch the getting started movie at:
27871 Posts in 6165 Topics by 1525 Members
Latest Member: alkyred
* Home Help Search Calendar Login Register
|-+  Recent Posts
Pages: 1 [2] 3 4 ... 10

 on: March 06, 2015, 10:35:58 AM 
Started by PhanMan - Last post by jmrusch
I don't know the answer, but I wanted to validate that you are not the only person who has seen this problem. It has happened randomly in one of my solutions and the only thing I could do was add instructions to refresh if the value list was blank.

The first time I saw this I happened to be at FM DevCon and I had several people (none of them FM Studio users) look at the problem. The unanimous conclusion was a problem with the FM Studio value list function. This was several years ago, and at the time I was very new to PHP so there was no way I was going to mess with FM Studio code. For that particular solution, no one has ever complained so I never bothered to go back and fix it. But I haven't used the FM Studio value list feature in ages because of this problem.

Instead, I use Todd Duell's method (from his excellent book about the FileMaker API for PHP), summarized:

Get the value list (in the example below, the layout is "Demo", the value list and the name of the field with the value list attached are both "MultiValueList" and the connection is $fm):

$layout = $fm->getLayout('Demo');
$multivalues = $layout->getValueList('MultiValueList');

Get the actual values from the MultiValueList field from the record. Then use the explode PHP method to separate the values into an array using the carriage return ("\n") as the separator value:

$values = $record->getField('MultiValueList');
$values = explode ("\n", $values );

Create the html for the multi value list using the values from $values and the $multiValueList value list.

foreach($multiValues as $multiValue)
   if(in_array($multiValue, $values))
      $selected = ' selected';
      $selected = '';

# Build the final html
# Format will look something like:
# <option value="Dog" selected>Dog</option>
   $multiValueList .= '<option value="' . $multiValue . '"' . $selected . '>' . $multiValue . '</option>';
$multiValueList .= '</select>';   

Hope that helps.

 on: March 05, 2015, 02:40:48 PM 
Started by PhanMan - Last post by PhanMan
I have several forms that pull a value list from the database as a drop down.  Everynow and then when a user goes to the page, the drop down is empty.  The user must refresh or log out of the session and log back in for the drop down to populate from the value list.  There is no recordset on the page.  it just a form.  what is my issue? thanks

 on: March 03, 2015, 01:28:46 AM 
Started by gwjo - Last post by gwjo
One day later - have solved the problem! In creating the connection it is the database username and password that are required, not the server access username and password. The problem arises because FMStudio allows you to see the database even if the username and password for that database are incorrect. A note on the FMStudioPro Connection window would have been REALLY helpful.

 on: March 02, 2015, 06:27:05 AM 
Started by gwjo - Last post by gwjo
I'm struggling to get a new connection with table based login to work:
I've set up the site without any problems, gone to add FMStudio Pro connection with table based login and I get as far as selecting the database of interest. It finds the database, the test says the connection was made successfully, it gives the login page as login.php but no layouts in the pulldown menu (and also thus no user name or password fields).
Any suggestions on what I might have missed or what I can check gratefully received!

 on: February 15, 2015, 03:48:16 AM 
Started by cooldude - Last post by kimosabi
Did this ever get solved?  I am having a similar problem with IIS on server 2008 R2 sp1.  I can actually write php code by hand using the fmstudio pro class and have it return results but not have all the automated things work.  I do believe this to be a permission issue in IIS but I have compared the settings on this new server to another one that I had been upgrading versions on over the years and did not see where the discrepancy exists. I can keep hand-coding but it sure would be nice to be able to use the features of fmstudio pro that we paid for.

 on: January 29, 2015, 05:59:05 PM 
Started by cooldude - Last post by cooldude
ok getting somewhere...

I see that I can use this

with sort like below...

and this gets me 1 field sorted - NICE...

Q: but how do I sort on 2 or more fields with this or another php command?


 // sort by last name
 function ($a, $b) {
     return strcmp(

 on: January 29, 2015, 03:38:32 PM 
Started by cooldude - Last post by cooldude
Hi - not really knowing what I am doing here - but when I did a --- print_r($test_result->getRecords());

it shows what is below....

Q: any idea how to POST PROCESS SORT THIS --- $test_result->getRecords() or just --- $test_result Huh


Array (
  • => FileMaker_Record Object ( [_impl] => FileMaker_Record_Implementation Object (
  • [_fields] => Array ( [Date Entered] => Array (
  • => 05/05/1997 ) [Date Mod] => Array (
  • => 06/05/2008 ) [Name] => Array (
  • => xxx ) [SAP_ID] => Array (
  • => 17 ) [Address] => Array (
  • => xxx ) [City] => Array (
  • => Bakersfield ) [State] => Array (
  • => Ca. ) [Zip] => Array (
  • => 93301 ) [First] => Array (
  • => ) [Last] => Array (
  • => ) ) [V5e7ec2d5] => Array ( ) [_recordId] => 17 [_modificationId] => 3 [_layout] => FileMaker_Layout Object ( [_impl] => FileMaker_Layout_Implementation Object ( [_fm] => FileMaker_Implementation Object ( [V73ee434e] => Array ( [charset] => utf-8 [locale] => en [logLevel] => 3 [hostspec] => xxx [recordClass] => FileMaker_Record [prevalidate] => [database] => page1


 on: January 29, 2015, 01:48:39 PM 
Started by cooldude - Last post by cooldude


Q: How do I sort this special query?

here's another way I got the combined result....


I needed to do a special fmstudio query

- needed complex search so I did this

- basic fmstudio query finds just one person id (which will not fail) do not need this data - just for not fail

- RAN SCRIPT like this - gets complex query fine... ---  $emp_find->SetScript('script1','=='.$params_here);

--then had  this but SORT does NOT WORK ........

– so my results loop ok -  BUT NO SORT!

- i even tried putting a sort step in the FM script

- no sort seems to work

- I even looked into post process resorting the results after getting the query (array_multisort Huh?) but can't seem to get it working....

Q: How do I fix this issue and get the results to sort how I need them??

 on: January 29, 2015, 01:45:26 PM 
Started by cooldude - Last post by cooldude
You do two queries, and then combine the data arrays after (assuming they are using the same fields...), and then display the combined set

Thanks much webko

sounds good - a few questions

I'm confused by fmstudio query items

my query called = emp
and query 2 = emp2...


1 - $emp_result = $emp_find->execute();

2 -  $emp_row = current($emp_result->getRecords());

then I loop through like this on ....

<?php foreach($emp1_result->getRecords() as $emp1_row){ ?>
display here…
<?php } ?>

Q: so what method do I use to COMBIME THEM both emp1 and emp2?

Q: THEN what function do I use to SORT the final array?

these =  array_merge() to merge both arrays ---- and usort() for sorting the merged array?

not sure how to set this up....

Thanks in advance for you're help

 on: January 26, 2015, 09:30:16 PM 
Started by cooldude - Last post by webko
You do two queries, and then combine the data arrays after (assuming they are using the same fields...), and then display the combined set

Pages: 1 [2] 3 4 ... 10
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!