Jump to content

danabase

Members
  • Content Count

    50
  • Joined

  • Last visited

Community Reputation

0 Neutral

About danabase

  • Rank
    member
  • Birthday 01/01/1961
  1. The code is in the fmview.php file. Just search the code for getinputchoices.
  2. I found the php.ini file and edited the memory_limit to 32MB, and that did the trick! Hi all, I am receiving this error when I query to a new list page I created: Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 76 bytes) in /Library/FileMaker Server/Web Publishing/publishing-engine/php/lib/php/PEAR.php on line 868 Any help? I can view the found set on other list pages, but this one page with a set of about 8 fields, gives that error message after listing 77 of the records. The total set is 165 records. I can login as different Users who have smaller record sets (110 is the next largest), and they do not receive the error. I'm not sure what to do - but this is a LIVE system and I am hoping to be pointed in the right direction. The server is FMS 9.0.3.326 on a dedicated Mac running Leopard. The machine has 3GB of RAM. I am hoping I can fix this with a change in a setting somewhere. Any and all advice would be appreciated. Thanks! -dana
  3. I have a php solution that has a layout in which the user can edit a list of records via a relationship. (FMPS 9) In other words, I have a campus (1 record) with a portal to teachers (many records)shown as a big list with just a few fields that are editable. I created this layout as a work-around having to edit each record individually. Everything works, the director at the campus can login, retrieve the campus list of teachers, and edit the fields on the list, no problem. The issue I have is that when I add a pop-up list, radio buttons or any type of value list, there is an error on the edit page. I have double-checked that the layout in FMP does have the value list. Here is my web page code for one of the fields: Returning / hired:<?php getInputChoices("radio", $layout->getValueList('YesNo', $record->getRecordId()), $record->getField('FacultyFromSites::Hired', 0) , getFieldFormName('FacultyFromSites::Hired', 0, $record));?> and the web page error I see is this: Warning: Invalid argument supplied for foreach() in /Library/WebServer/Documents/AimHigh/Faculty2010 copy/fmview.php on line 552 and in my fmview file, line 552 is in the getInputChoices function, and is the first "foreach" line shown below: function getInputChoices($type, $valuelist, $fieldvalue, $fieldName) { $selected = ""; $fieldValueArray = explode(" ", str_replace("n"," ", $fieldvalue)); foreach ($valuelist as $eachvalue) { if (in_array(trim($eachvalue), $fieldValueArray)){ $selected = " checked"; }else{ $selected = ""; } if ($type == "checkbox"){ echo "$eachvalue"; }else{ echo "$eachvalue"; } } } I have removed the value lists for now, but would love to be able to put them in, to save on data cleanup for these forms. Any advice would be appreciated! Thanks!
  4. I am looking for suggestions for creating a way for Users can “mark” records and save those groupings over time. I have a client who wants to be able to mark groups of records, and add individual records in easily retrievable found sets. Sort of like the way FMP 10 can save finds, but this would be more similar to saving found sets, and updating them. Currently they have simple checkboxes to mark records which they check and then clear, as needed. They have to let the office know when they are using the mark records checks and can only have one User marking records at a time. They have 4 such checkboxes, but in reality, they would like each User to be able to mark up to 10 different sets of records and to not have to worry about someone else modifying there marked records. If anyone has something I could look at – great – or if there are suggestions, let me know. I have searched the forums and did not quite find what I was looking for. Thanks!
  5. I am relatively new to PHP and run into a couple problems I cannot figure out: 1.) The First, Previous, Next and Last buttons lose the sort of the first page. If a User performs a find, the list comes up sorted by name, but when they click the NEXT button for the next group, those records are unsorted. I can see the definition of the function that controls those links in fmview.php, but I don't know how to modify it. Here is the code: function getStatusLinks($resultPage, $rs, $skip, $max) { $links = array ( 'first' => 'First', 'prev' => 'Prev', 'records' => array ( 'rangestart' => 0, 'rangeend' => 0, 'foundcount' => 0 ), 'next' => 'Next', 'last' => 'Last' ); $fetchcount = $rs->getFetchCount(); $foundcount = $rs->getFoundSetCount(); $total = $rs->getTableRecordCount(); if ($total == 0 || $fetchcount == 0) { return $links; } else { if ($fetchcount > 0) { if ($skip > 0) { $links['first'] = "" . $links['first'] . ""; if ($skip > $max) { $prevskip = $skip - $max; $links['prev'] = "" . $links['prev'] . ""; } } if ($foundcount - $skip > $max) { $nextskip = $skip + $max; $links['next'] = "" . $links['next'] . ""; $lastskip = $foundcount - $max; $links['last'] = "" . $links['last'] . ""; } $links['records']['rangestart'] = max($skip, 1); $links['records']['rangeend'] = min($foundcount + $skip, $fetchcount + $skip); $links['records']['foundcount'] = $foundcount; } } return $links; } I did try to add a sortorder and sortfield to the links in fmview.php, but it worked for the found set, and then the subsequent finds no longer worked. 2.) Along similar lines, I would like next, previous, last, and first links to move from record to record in the browse record view. Any help would be appreciated. Thanks!
  6. I am trying to use Javascript to validate a form, and stop the user form submitting an invalidated form. The problem is that the JS validation uses the "name" parameter and requires it begin with a letter. Filemaker seems to require that the "name" be a number. This is an example of the input code in the editrecord.php file: "<?php echo $record->getField('agency_department', 0) ;?>"> This shows on the live page as: So "name" is 1. The JS validation (and w3 standards) want "name" to be a letter, not a number. We tried changing the name to a letter which resulted in no data going into filemaker. Is it possible to make the name tags start with a letter or is there another client-side validation that can be used with filemaker php pages? If the name tag is a number, javascript validation won't work.  According to the World Wide Web Consortium: http://www.w3.org ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods ("."). If this cannot be done, is the only option to use FileMaker pro's validation option field by field? Or is there another way I am not aware of? Any help would be appreciated, as usual!
  7. Hey Baloo, This worked perfectly - thanks so much! I am just getting my feet wet with php, so things like this help me to understand it a little more. Thanks again, -dana
  8. I have been debugging an issue that i have with a PHP form connected to FileMaker and have narrowed the issue to my function. I am new to PHP forms, and I think this might be a relatively easy fix, but am not sure how to approach it. Here is the issue: When I have a field getting a value list from FMP, and the value list has a strings (with spaces) as one value, the values appear on the form, but if I check the box, save, and return to the form, the value with a space between words is unchecked. On exaiming the FMP field in the filemaker, the data is there. There seems to be an issue with the function getInputChoices echoing the string, although the value is checked in filemaker. Here is the function: function getInputChoices($type, $valuelist, $fieldvalue, $fieldName) { $selected = ""; $fieldValueArray = explode(" ", str_replace("n"," ", $fieldvalue)); foreach ($valuelist as $eachvalue) { if (in_array(trim($eachvalue), $fieldValueArray)){ $selected = " checked"; }else{ $selected = ""; } if ($type == "checkbox"){ echo "$eachvalue"; }else{ echo "$eachvalue"; } } } I am not sure if it has to do with the $eachvalue only referring to the first word of the value list line, or something else. Suggestions?
  9. Does anyone know if there is a plug-in or method to export FileMaker data to a fixed-width file formatted as UTF-8? I am working with a client who has to export data into another system and they require fixed width, and say there are no other options (csv, tab delimited, etc.). I searched the forums but only found an unresolved thread from 2007. I was hoping there would be some solutions in FMP 10...
  10. Joel, Your suggestion worked great - I created a unique function inserting the break as: function getInputChoicesColOne($type, $valuelist, $fieldvalue, $fieldName) { $selected = ""; $fieldValueArray = explode(" ", str_replace("n"," ", $fieldvalue)); foreach ($valuelist as $eachvalue) { if (in_array(trim($eachvalue), $fieldValueArray)){ $selected = " checked"; }else{ $selected = ""; } if ($type == "checkbox"){ echo "$eachvalue "; }else{ echo "$eachvalue "; } } } and left the original function to be used in other places. This worked instantly and perfectly to align my values in one column. Is there a way to create a similar function, but have the result be 2 or 3 columns? I am struggling with some very long checkboxes, and would like to make them look as nice as possible. This worked well for my one column of languages, but now I have some monsters which I would like to display in 2 or 3 columns. Any suggestions?
  11. I am having the same issue, and I did apply the suggestion here, and it almost worked. My values are of differing lengths, so sometimes it works and sometimes it does not work. Is there a way to have the web just insert a return after each value to make a column? here is my code: div.check-container{ width: 80px; } <?php getInputChoices("checkbox", $layout->getValueList('language', $record->getRecordId()), $record->getField('staff_languages_desired', 0) , getFieldFormName('staff_languages_desired', 0, $record));?> so my list ends up looking more or less like this: x Spanish x Mandarin x Cantonese x Tagalog x Vietnamese x Korean x Armenian x Japanese x Farsi x German x French where the "x" is where the checkbox appears. This is my simplest values list, but I have others with lots of values of very differing lengths. Is there some way to make this look nice? I am open to any suggestions - I have only been working with PHP for about 6 months, so I am sure my code is ugly - sorry.
  12. I have an FMPSA running on an iMac with Leopard OS which hosts about 10 databases. I have had no problems connecting from various machines / configs until recently. I have two MacBook (mid2007) machines which have newly installed OS 10.5.7 and neither can see any local or remote hosts on filemaker 9v3. I cannot see any difference in these machines in the Network setup, to machines that CAN access the files from the same network. I can also ping the remote machines I am trying to connect to, so I know the path works fine. Everything else works - I can access the internet, login to a remote machine using AFP, email, etc.; it is just filemaker that does not work. I newly wiped and installed FMP 9v3 on both machines, and can only open database files on the local machine. Any suggestions for what to look for would be great!
  13. I am new to PHP and FMPSA, and have a solution that is working well so far (knock wood). It started as an online application - no problem; then a searchable database of those applications; still great; then an editable solution. For the most part, the editing is fine, but I have a situation where I want a user to be able to search for all of "their" records (which I can do) and then edit a single field all the way down the list of the found set. For example, they are going to view all the applications for their campus, and then check "accept" or "deny" for each record. Is there a way to allow this from a list view? Right now they have to go into each record separately which is super tedious. I am new to PHP, so if this can be solved with some code, please be specific. I have heard that this might be possible with a portal, but I am not sure what that would be. I apologize if this has been answered, but I searched and did not find anything addressing this issue. Thanks!
  14. I have a database that I am accessing by different User groups via php. This was previously an IWP solution. I have about 20 different privilege sets which restrict access for Users to the appropriate records. In IWP, the record access was prompted when the user logged in, a script was run to find only those records. All finds were controlled by buttons restricting access to those records. The privilege sets are named for the User's "site" so the previous IWP script would get the privilege set from a field value (Get(privilegeset)) and always constrain any find with that value. Is there a way to mimic those finds in PHP code? For example, if I login as one of the restricted access user, I see all the records in the database, but a large percentage are blank because the user does not access to view those records. If I go to the search page, I can only choose the User's site from the site pop-up list (even though there are 11 sites), which then will return the correct set of records. I suppose I can train my Users to always perform a find for their site before doing anything, but I am wondering if I can store it in the code of the page and parse it from page to page, without the User knowing. I am open to any suggestions. Currently, I just have a system (with many related tables), in which Users have access to their records only. I want to make this seamless over the web, if possible. Let me know if more information is needed. Thanks!
  15. I have the same error - but it is intermittent. It may be having to do with something being saved from the session when testing - I was testing with firefox and started getting the error. Then I thought to try Safari, same records, no error. If I quit and tried FF again, no error, but after testing for a bit, the error would return. I am still trying to figure out if I can force the error to always appear, so I can try removing whatever is causing it. Did anyone ever find help for this, or a work-around?
×
×
  • Create New...

Important Information

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