[FX.php List] A question about editing a record

Jonathan Schwartz jonathan at exit445.com
Fri Aug 3 12:47:57 MDT 2007


Bob,

Not sure what you mean about trying to edit a field that wasn't in 
the Edit form. Why would "first name" not be on every FMP record and 
every form, regardless of whether the user filled in the field?

Regarding your shortcut request....I have a technique that was 
provided to be my Steve Winter some time ago.  It used a for loop 
walking through an array to determine if there was a value to be 
inserted in a ADDDBParam statement.  Well, the $_POST is an array, 
and you could probably do the same for each row of the array.

See what I mean?

HTH,

Jonathan




At 11:55 AM -0500 8/3/07, Bob Patin wrote:
>Here's a question:
>
>When I'm editing a record that has lots of fields (30 or more), I've 
>been having to check to see if the user actually inputted anything 
>inot each field before including it into my EDIT script. In other 
>words, like this:
>
>
>$search->AddDBParam('-recid',$recid);
>if (strlen($first_name)>0){$search->AddDBParam('First_name',$first_name);}
>
>Otherwise, if I try to edit using a variable that wasn't actually 
>put into the EDIT form (let's say this record doesn't actually HAVE 
>a first name), I get a 958 error.
>
>Is there an easier way to check for this?
>
>Should I be using ISSET instead? Is there a way NOT to have to do 
>this for each line of my EDIT script?
>
>Thanks,
>
>Bob Patin
>Longterm Solutions
>bob at longtermsolutions.com
>615-333-6858
>http://www.longtermsolutions.com
>
>   CONTACT US VIA INSTANT MESSAGING:
>      AIM or iChat: longterm1954
>      Yahoo: longterm_solutions
>      MSN: tech at longtermsolutions.com
>      ICQ: 159333060
>
>
>_______________________________________________
>FX.php_List mailing list
>FX.php_List at mail.iviking.org
>http://www.iviking.org/mailman/listinfo/fx.php_list


-- 
Jonathan Schwartz
Exit 445 Group
jonathan at exit445.com
http://www.exit445.com
415-381-1852


More information about the FX.php_List mailing list