Even if SETTABLE (through RecRef) worked as intended it would not work for this situation since he is attempting to modify a record that hasn't officially been created yet.
Even if SETTABLE (through RecRef) worked as intended it would not work for this situation since he is attempting to modify a record that hasn't officially been created yet.
GETTABLE and SETTABLE works in the same way as TRANSFERFIELDS: it's not a prerequisite that the record actually exists in the database. They just transfer field values.
Shrug, I just remember SETTABLE not working (specifically with transferring filters)...
lRecRef.GETTABLE(MyTable);
FOR i := 1 TO lRecRef.FIELDCOUNT DO BEGIN
lFieldRef := lRecRef.FIELD[i];
lFieldRef.SETFILTER(lFieldFilter[i]);
END;
lRecRef.SETTABLE(MyTable);
But that didn't work, so I had to resort to using...
GETTABLE and SETTABLE works in the same way as TRANSFERFIELDS: it's not a prerequisite that the record actually exists in the database. They just transfer field values.
I was going to suggest that 2 pages ago but kind of assumed that you had actually tried that already :-k funny how you can overlook the simplest things for a long time.
Comments
Are you sure the help is correct?
You want to transfer the rec to a recref, change some fieldvalues, and move the recref to rec?
SET and GET does this, but maybe it's not my day and I don't get it. :-$
:evil: :evil: :evil: :evil:
NO! Man, that's just plain idiotic! I can't believe I've wasted half a day because the online help is in error... :roll:
You're of course right: SETTABLE does exactly what I need.
My code now looks like this:
And it works...
Oh, you're getting it alright - and so is the guy that wrote that online help if I ever get my hands on him :x
THANKS A LOT!
Senior NAV Developer
Elbek & Vejrup
GETTABLE and SETTABLE works in the same way as TRANSFERFIELDS: it's not a prerequisite that the record actually exists in the database. They just transfer field values.
Senior NAV Developer
Elbek & Vejrup
But that didn't work, so I had to resort to using...
RIS Plus, LLC