[FX.php List] getting RecID after creating a record
Alex Gates
alex at gandrpublishing.com
Mon Nov 20 12:55:32 MST 2006
Thanks, Bob!
I was able to get this with the second method - using the foreach from
my createResult. This is very helpful. thank you!
Alex P. Gates
-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Bob Patin
Sent: Monday, November 20, 2006 1:41 PM
To: FX.php Discussion List
Subject: Re: [FX.php List] getting RecID after creating a record
Alex,
Here's how I do it, although there's another method which I'll explain
below:
I create a Calc field called 'recid'; it equals "get(recordid).
Then, after you create a new record, just do this
$recid = $query['recid'][0];
You can also use the EXPLODE command, like this:
foreach($searchResult['data'] as $key=>$searchData){
$recordDetails=explode('.',$key);
$recid=$recordDetails[0];
Personally, I find the first method easier, but that's just me... I use
it all the time when I'm creating tables of found results, etc.
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
On Nov 20, 2006, at 1:20 PM, Alex Gates wrote:
Hi everyone-
I know this has been covered before, but I can't seem to find it.
I know it is possible to explode the array on a find to get the record
ID, but is it possible to get the RecID after a new record creation
without having to do a separate find?
If so, could someone please provide me with an example of the syntax?
Alex P. Gates
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20061120/8190650f/attachment.html
More information about the FX.php_List
mailing list