Jump to content

Marcwa19197

Members
  • Content count

    16
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Marcwa19197

  • Rank
    member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi, we are using a little sync script via php, which allows us to store all data from a FileMaker DB into our internal MySQL-Database. The only problem iam unable to solve is how to download images from container fields and store them local on our web server. I tried something like: foreach($recordsPersons as $recordPersonsData) { //saving images to /srv/www/htdocs/ $url_orig = urlencode($recordPersonsData->getField('FotoDatei')); // Search for the extension of the file $url = substr($url_orig, 0, strpos($url_orig, "?")); $url = substr($url_orig, strrpos($url_orig, ".") + 1); // Send the correct Content-Type header if($url == "jpg"){ header('Content-type: image/jpeg'); } else if($url == "gif"){ header('Content-type: image/gif'); } else{ header('Content-type: application/octet-stream'); } // save file local. file_put_contents('/srv/www/htdocs/testfilepicture.jpg', $fm->getContainerData($url_orig)); } I was using this reference: http://blog.myfmbutler.com/?p=104 This Code-Snipped works well, but only writes "getContainerData() does not support remote containers" into testfilepicture.jpg.. We are using FileMaker Server 14. Any Ideas? Thanks in advance and Cheers
  2. Marcwa19197

    Copy records from FM to MySQL

    yes I understand how to use ess and how to work with a table in fm. but image I have one column in both table (TableA-fm and TableA-mysql) called 'forename'. I place a Field object on a Layout, how can I say that the input of this forename-field should be written in both tables? if this is not possible I have to add two field objects.. one for every table. forename-mysql and forename-fm, so the data must be entered twice..
  3. Marcwa19197

    Copy records from FM to MySQL

    i dont know if a field object can write into two different tables.. maybe i create an field for the mysql-table (TableA-mysql) and use a lookup-field in the Filemaker Table TableA-fm?
  4. Marcwa19197

    Copy records from FM to MySQL

    Okay, i read about it. but is it possible to write in two tables with one field object? For example: Field "Name" writes Data in TableA-fm and TableA-mysql.
  5. Marcwa19197

    Copy records from FM to MySQL

    Hi, i have a Filemaker Database with a TableA-fm. This Filemaker Database is hosted on an FMS14-Server, which is configured to use the MySQL-Odbc Driver to connect to an MySQL Server. The Mysql have the same Database and Table structure as the FM have. (TableA-mysql) now i want to do the following: Create a layout in FM on TableA-fm which let me enter Data (via Fields) to TableA-fm and simultaneously the same data to TableA-mysql on the MySQL Server. So i would like to have the same records of data in the FM-Table and the MySQL-Table. Any ideas how to do that automatically, or sync TableA-fm to TableA-mysql?
  6. Marcwa19197

    History of relationships

    We want to use our own logging system. So is there any script snippet for doing the following: - Get current data of a field - Modify this data in the field - Save the old Data and the new (modified) data to a LogTable (Something Like: "PersonA's LastName was changed from "Marcwa19197" to "Marcwa" by "Username" on "Date") What i found is the GetField() function. So my idead would be: 1. Save the current data of a field with the GetField() function in a global variable (with the OnRecordLoad Trigger) 2. Modify the fielddata and save the changes 3. Check if there is a change between the old data and the new data (if yes, the fielddata was modified) 4. Save the new/modified data of a field again with the GetField() function and write the data captured in step 1. with the changed data to a LogTable. (Using the OnRecordCommit Trigger) Or is there a simplified way? Edit: So, i tried my above solution, it works but it will be a huge effort to set the triggers on every object in the layouts.. a other solution i was thinking about would be: 1. Have a table layout (PersonsEmployeeTable), which will show employee and persons data at all 2. Have a form layout (EditEmployee), where i can edit the employee's and the associated person information (Name,LastName, Roomnumber, ..) On this layout there will be a script on the OnRecordLoad-Trigger which will perform a find in the PersonsEmployeeTable, the result will be all information about the employee im viewing. The return of the find should be saved in an array. (So i have an array filled with the current record data of the employee/person) Is this step possible in FM (creating an array and fill it with the return data of the performed find)? 3. A script on the EditEmployee layout which is set to the OnRecordCommit-trigger will capture the modified data (like step 2.), make a diff with the data in step 2. and check if there are any changes, if so the old data and the new data will be saved to the Log.
  7. Marcwa19197

    History of relationships

    Now i understand, what you mean with the unique ID, because Persons to Employess is a one-to-one relation. Thank you for the hint with the fork, i didn't see that before. The best for our buisness would be to save all data historically. On the design side, there will be two "edit-modes", "Correction" and "Change". Correction: only for correcting mistakes, no audit logging needed here Change: for example the change of the LastName, every change in this "mode" should be logged. So are there any free "examples" for doing this? Or any "easy" way to do this in FM (maybe buildin functions)? in the past i read much about "NightWing Ultra Log", but is anyone using it to log changes over much relationships? At the moment we have a flat database-design, like an excel sheet, realised with FM 10 ... So if something changes, the management copy the whole "record" and add a note to it why it was changed..
  8. Marcwa19197

    History of relationships

    Hi, thanks for the replies. here is my new database design. now i can track which Person has which childs, and if the child is of age i will set the "Aktiv" flag to 0. same for adress, if a Person have a new adress i will set the old one to "Aktiv" = 0 and enter the new adress with "Aktiv" = 1. for the jobs i have added an Start- and End Date. How can i track changes of Person names or changes in the Employees Table? For example: 1. Person gets married and change last name 2. Person is an employee and gets a new roomnumber How can i track the old name/roomnumber?
  9. Marcwa19197

    History of relationships

    Yes, i know this fact. I was just a bit confused, of course i will have unique auto-increment IDs in every table. How do you think about the "history problem"?
  10. Marcwa19197

    History of relationships

    In my example, we need to track the childrens of persons until they get of age, so you are right anyway, i can simply add an Start- and EndDate to every table. My screenshot is a example with a few tables, the real database have much more we need to track history (Bankinfo, Address/Contactinfo, IT-Accounts, ...). Is this still the recommended/best way? yes, the relation between persons and employees is one-to-one. But there is a new "problem". If some person change his name, we need to track the old one. (so i think, i need an one-to-many relation here?) So, i dont need an unique Employees.ID field, only the Employees.Persons_ID Field as unique field?
  11. Marcwa19197

    History of relationships

    Hi, im searching for a solution which will let me save the relationship history of records. I want to have something similar like a "snapshot" of every record if it gets modified. in my example i want so save which employee had which jobs and childs over time, so i can view the past history of a specific employee. What do you think will be the best solution for this problem? Thanks in advice.
  12. Marcwa19197

    Portal to view many-to-many Relation

    Okay, works perfect! Thanks for your help!
  13. Marcwa19197

    Portal to view many-to-many Relation

    yes, in case if both parents are employees and they have the same childs. so the childs must be associated to both employees.
  14. Marcwa19197

    Portal to view many-to-many Relation

    can you please share a screenshot of the relationships, just for understanding you correctly, thanks in advice!
  15. Marcwa19197

    Portal to view many-to-many Relation

    Hi, first of all, thanks for the fast reply. the problem we have is, that we would like to store all "basic data" (including Names, Birthdays, etc.) for every person in one table. So, of course your concept will work, but than we will have names stored in the Children table and in the Persons table (and later in many more tables, for example in the Sposes Table). a Person can be a Child, a Employee or a Spose. a employee can have many childs and one spose. we need to know which childs, or which spose is associated to which employee
×

Important Information

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