Aparajita,
The dump shows that $attributes is populated correctly given the entries on
the form and that the record number is appended properly to the end of the
key.  However, I added the "write($recNum).." line to my for loop and that
produces:

Active4D error
Reference to an undefined variable or value.
write($recNum)+" - "+write(string($recNum))+"

With the first ) after the first $recnum highlighted in red.


for ($i;$index;size of array($keys))
    if ($keys{$i} = "f_Authorize_@")
                $recnum:=Num($keys{$i})
                write($recNum)+" - "+write(string($recNum))+"<br>" `THIS IS
THE ADDED LINE
                goto record([CE_PR_Transactions];$recNum)
        
[CE_PR_Transactions]Adjustment:=Num($attributes{"f_Adjustment_"+string($recN
um)})
        
[CE_PR_Transactions]Notes:=$attributes{"f_CEAuthNotes_6"}
                        save record([CE_PR_Transactions])
                        add to set([CE_PR_Transactions];"Authorized")
                        $OneCreated:=True
                
    else
       break  // no need to look further
    end if
end for
 
$recnum is assigned at  the top of the script as a longint.

Mike




> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Aparajita Fishman
> Sent: Saturday, January 13, 2007 5:04 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [Active4d-dev] A4d Error
> 
> Mike,
> 
> > The code runs with no error after changing "f_CEAuthNotes_"+string
> > ($recNum)
> > to "f_CEAuthNotes_6"
> >
> >>> I'm getting the following error:
> >>>
> >>> Active4D error
> >>> Expecting a text expression.
> >>> [CE_PR_Transactions]Notes:=$attributes{"f_CEAuthNotes_"+string
> >>> ($recNum)}
> >>> and the last } is red.  I tried changing the
> >>> "f_CEAuthNotes_"+string($recNum) to
> >>> "f_CEAuthNotes_06"
> >>> And the error disappeared, leaving the conclusion that the
> >>> +string($recNum)is somehow causing the error.
> 
> You'll have to break this down to see what is happening. Try the
> following:
> 
> a4d.console.dump collection($attributes) write to 
> console("f_CEAuthNotes_"+string($recNum))
> [CE_PR_Transactions]Notes:=$attributes{"f_CEAuthNotes_"+string
> ($recNum)}
> 
> See what you get.
> 
> Regards,
> 
>     Aparajita
>     www.aparajitaworld.com
> 
>     "If you dare to fail, you are bound to succeed."
>     - Sri Chinmoy   |   www.srichinmoylibrary.com
> 
> 
> _______________________________________________
> Active4D-dev mailing list
> [email protected]
> http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
> Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to