||Re: field update
Mervyn Bick <email@example.com>
||Wed, 14 Feb 2018 09:59:14 +0200
On 2018-02-14 8:47 AM, Mustansir Ghor wrote:
> Dear Ken Sir
> Thank you sir.
> However since mitem is a memory variable for the field it would has considered as displayed value. But in actual, it did not assigned anything and field remained blank. Or is it that assignment value would change data in the lookuprowset field.
To expand on Ken's reply, if the lookup table for the lookupSQL looks
the grid (or entryfield or combobox) will show Paris if the value on the
code field is 2
If you want to change the value in the code field to 3 you would need to
mitem = 'Berlin' // not 3
form.register.rowset.fields["code"].value = mitem
When dBASE saves the record it will do a reverse-lookup and place 3 in
the field instead of 'Berlin'.
If you specifically want to save 3 yourself then you will have to do as
Save the lookupSQL setting so you can put it back later
Null the lookup
Assign 3 to the field code
Put back the lookupSQL setting
As an aside, this would be an unusual way to do this as it is making
extra, unnecessary, work. On the other hand, if you really want to.....