Jump to content

bhamm

Members
  • Posts

    28
  • Joined

  • Last visited

Profile Information

  • Title
    iOS Developer
  • Gender
    Male
  • Location
    Dallas
  • Interests
    I make things with Swift, CloudKit, and FileMaker.

    Art Con for iOS · Xcode, Swift, Core Data, FileMaker Data API · http://artcon.app

    FM Partners for iOS · A worldwide directory of FileMaker consultants, events, and DevCon videos in your pocket · http://fmpartners.app

    SwiftFM · A Swift framework for the FileMaker Data API · github.com/starsite/SwiftFM

    FileMaker developer 20 years • Swift developer 5 years

Contact Methods

  • Website URL
    starsite.co

FileMaker Experience

  • Skill Level
    Expert
  • FM Application
    19

Platform Environment

  • OS Platform
    Mac
  • OS Version
    Catalina

FileMaker Partner

  • Membership
    FileMaker TechNet

bhamm's Achievements

Contributor

Contributor (5/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. I updated my SwiftFM repo for the FileMaker 19 Data API. https://github.com/starsite/SwiftFM Notable improvements include support for the new `validateSession()`, and moving the server `message` into the completion block. So now you can access the message in the closure, where it's more helpful. Better examples as well. Give it a ⭐️ on GitHub if you find it useful. Thanks! 😘
  2. FM Partners 2.6 was approved today and is available in the App Store. 😘 https://fmpartners.app Release notes: 📌 • Fixed a bug where a Partner update might fire more than once, temporarily causing duplicates • Removed a possible race condition where fetching nearby partners might cause a crash • Improved partner sort to accommodate company names beginning with "The" • Updated country filter UI and added support for Israel partners and events • We hope you love the app. Leave us some feedback in the Support controller. Xo.
  3. Hello everyone. This is disturbing.. I have a function that creates an alphanumeric 'id'. This id becomes part of a URL taking an attendee to their record online, to register for an event (custom web publishing, php). So, the same series of id's is being generated in several databases. I can reproduce this problem at will. It's like FM is deciding on some kind of pattern ahead of time. That's not random. We're all on Mac OS X 10.5, FMPro 9.03. Any ideas? Let ( [ string = Middle("ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789"; Int(Random* 46); 1) & Middle("ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789"; Int(Random* 46); 1) & Middle("ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789"; Int(Random* 46); 1) & Middle("ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789"; Int(Random* 46); 1) & Middle("ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789"; Int(Random* 46); 1) & Middle("ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890123456789"; Int(Random* 46); 1) ] ; Lower (string) )
  4. thanks for the reply.. however, i made a calc (text) field called 'record_state': If ( Get ( RecordOpenState ) ≠ 0; "locked" ; "open" ) i put this field on my 'web' layout in filemaker.. but when i go into a field and start changing things, i can't get this value to say "locked", even if i hop to another field (prior to committing the record). Since i can't get a value of "locked", my PHP line: if ($attendee->getField('record_state') == 'locked') { echo 'record in use'; } ..will never be true. I've tested this by editing an attendee field and not committing it. When i access the record over the web, my "if" statement thinks the record is "open". not sure what i'm doing wrong yet.. :
  5. hello.. i've been looking now for 2 days on how to make a web form check to see if a record is 'in use' on the LAN (cursor in a field.. or uncommitted record). currently, if i'm accessing a record on the LAN with someone else on the web, there's nothing to prevent that form being submitted. The obvious problem being that any changes created online are simply ignored on submission. I need to be able to check for 'in use' prior to drawing/loading the form. I could do this manually (we have a 'locked' checkbox), but that's used along with a timestamp, and set AT THE TIME of submission. all i've found so far in the FM app is a function called "Get (RecordAccess)".. which doesn't seem to be giving me the desired behavior? Is there something i can do on the web side (PHP) that will check for 'in use'? many thanks!
  6. hey! thanks for getting back.. i ultimately handled this a different way on my form (without a script), but your reply looks like what i was after. I suspect i'll be needing this for something else later.. so, thank you brian
  7. is it possible to set a field with a URL.. alternately, if i could call a script with a URL, that'd be fine too. i used to include "&-script=scriptName" when i was doing this in CDML.. thanks in advance! brian
  8. thanks everyone for your help.. i wanted to mention something else (rather important) that i picked up while building my first filemaker > php solution. USE UNDERSCORES in your field names. A lot of my problems with $_POST had to do with "First Name" vs. "First_Name". I didn't know this ahead of time, of course, but i wanted to pass it along for those who might visit this thread in the future. spaces are bad. :)
  9. got it.. i had to use an "isset" if (isset($_POST['Nite_1_Check'])) { $edit->setField('Nite_1_Check', $_POST['Nite_1_Check']); } else { $edit->setField('Nite_1_Check', NULL); } works great.. hooray for trial/error :
  10. hello.. i have a form with several checkboxes available for each hotel room night: Nite_1_Check Nite_2_Check ... if i submit the form WITH a box checked, no problem. If i don't select the box and submit, it errors out "Notice: Undefined index: Nite_1_Check... Here's what i started with: $edit->setField('Nite_1_Check', $_POST['Nite_1_Check']); when that didn't work (if unchecked), i tried several variations of: if ($_POST['Nite_1_Check'] != NULL) { $edit->setField('Nite_1_Check', $_POST['Nite_1_Check']); } else { $edit->setField('Nite_1_Check', NULL); } but that doesn't work. Since all of my other (non- checkbox) fields work fine, i have a feeling this has something to do with PHP not being able to send/POST a NULL value(?). Am i approaching this right? thanks..
  11. thank you!! : the books i have indicated i should pass 'recid' in a hidden field in the form, and then call it with a POST: $edit = $fm->newEditCommand('a', $_POST['recid']); and actually, getting the record this way worked fine.. but none of the 'setField' functions worked with POST then. They only worked if i hard coded the values. I thought i was making a mistake with regard to POST, but it sounds like my problem was with the way i was getting/assigning recid. This way (your way) works fine: $edit = $fm->newEditCommand('a', $attendee->getRecordId() ); so, to follow up.. newEditCommand takes only the 'recid' as it's second parameter? It couldn't take something like my own random/alphanumeric 'id' field, right? appreciate your help.
  12. hello.. need a little help with editing a record. I have the Stark book, and the Olm book and still can't seem to make the "newEditCommand" work with $_POST. If i hardcode the the second parameter in "setField", things work fine. If i try setField('Name', $_POST['Name'].. i get an 'Undefined Index: Name' error. here's my FIND and EDIT: // FIND ATTENDEE RECORD $request = $fm->newFindCommand('a'); $request->addFindCriterion('id', $_GET['id'] ); // 'id' is a random, alphanumeric field $result = $request->execute(); if (FileMaker::isError($result)) { echo 'Error: (' . $result->getCode() . ') ' . $result->getMessage() . "n"; exit; } $attendees = $result->getRecords(); $attendee = $attendees[0]; // EDIT ATTENDEE RECORD $message = '' ; if (isset($_POST['submit']) && $_POST['action'] == 'edit' ) { $edit = $fm->newEditCommand('a', 6); // does this HAVE to be 'recid'? $edit->setField('Name', 'Brian'); // doesn't work with $_POST['Name']? $edit->execute(); $message = ' thank you'; } ?> here's the beginning of my FORM code:
  13. got it! : so, after this: $records = $result->getRecords(); i needed to add THIS to isolate 'attendee' $attendee = $records[0]; works great now.. i can pass whatever field i like in the URL. Thanks for getting me 99% of the way : A rather large door just opened in my head. Excellent. many thanks!
  14. sorry, the proverbial light bulb hasn't gone off yet. I follow (i think) your code. But how does $records (from your example) coincide with: $attendee = $fm->FUNCTION('layout', $_GET['Attendee_ID']); in other words, all of my attendee fields on the form are being pulled with: echo $attendee->getField('First Name'); so everything's based on $attendee, correct? How do i get $records involved? I feel like i'm close, but haven't connected this just yet. thank you
  15. thank you, i thought it'd be something straightforward like that.. i didn't realize i would use the "date" function to parse a "time" though. appreciate it :
×
×
  • Create New...

Important Information

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