[FX.php List] getting RecID after creating a record

Bob Patin bob at patin.com
Mon Nov 20 12:40:42 MST 2006


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/218ab1c2/attachment.html


More information about the FX.php_List mailing list