jaycee99
28th October 2008, 06:08
How to retrieve/read record after i used the command display.fld() to display the record for every rows?

ARijke
28th October 2008, 09:21
Can you give some more info? Which record do you want to read, one from the main table or from another table? You want to show one record multiple times?

jaycee99
28th October 2008, 09:37
Hi there,

For example, i used display.fld() command to display out the record

display.fld(i,"tfxxx200.ninv")

The output that will be display out somethng like this:

A
B
C
D

Now, i want to retrieve back from this display, for example:- the second record which is B to store in another variable which is str5. How am i going to retrieve the B ?

ARijke
28th October 2008, 12:56
With function do.occ() (or do.all.occ) you can execute a function and with this function the specified occurrence will be current. So you will have direct access to tfxxx200.ninv.

jaycee99
30th October 2008, 05:23
Hi there, can you send me some example on how to use this, do.occ()? Thanks.

ARijke
30th October 2008, 11:52
At which moment do you want to know the value of this field?
In case you first mark the record then the value is current. So you can directly use tfxxx200.ninv, in for example the mark.occur.
If you want to do this via a command from the specific menu then it could look like this:


choice.user.1:
on.choice:do.all.occ(process.tfxxx200.field)

function process.tfxxx200.field()
{
...do something with tfxxx200.ninv
}

The function process.tfxxx200.field() will be executed for each occurrence.

mark_h
30th October 2008, 15:17
You can also search this forum for do.occ - there are several posts where you can see how it works.