Hello everybody,
I am having a hard time trying to figure out why I am having this problem:
- I have an app that, before it is saved from the development/studio environment, it shows 0 errors
- But if I exit the development page and reopen the app for editing, now it shows many errors related with a record
I was able to narrow down to one line of code that generates the problem:
- If that line of code IS NOT present in the code, then if I save and exit, and then reopen the app, it shows 0 errors
- If that line of code IS present in the code, when I save it, it shows 0 errors, but when I exit and reopen to edit it, it shows many errors
Thay are all related with a record (regItemObr) that I use to read from a table (tblOfertasObras) and also in a form.
In different parts of the program I have the following sentences related with the record:
UpdateContext( { regItemObr: LookUp( TblOfertasObras, IDObra = frmCMOfeObra.LastSubmit.IDObra ) } );
UpdateContext( { regItemObr: Patch( TblOfertasObras, regItemObr, { FechaEscritura: Now(), ActualizadoPor: TXT_USER_EMAIL } ) } );
UpdateContext( { regItemObr: Blank() } );
UpdateContext( { regItemObr: LookUp( TblOfertasObras, IDOferta = varOfertaID ) } );
UpdateContext( { regItemObr: Patch( TblOfertasObras, Defaults(TblOfertasObras), { IDOferta: varOfertaID, CreadoPor: TXT_USER_EMAIL } ) } );
And then I have the "offending" line of code:
UpdateContext( { regItemObr: Patch( regItemObr, { ObraNombre: "" } ) } );
As mentioned before:
- when I save the app, it shows 0 errors
- but if I exist and reopen the app for editing, I get many errors
- and the referenced table field (ObraNombre) is indeed a valid field in the record and table
And the error related with the "offending" line is "Invalid argument type (Error). Expecting table instead", but many other lines show an error (see some sample below).
Can you think of any reason why that simple line can generate such error.


Thanks, Victor.