Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 23 APR 2004 02:55:03PM Jim Dierking wrote:

As I understand it the WRITEV command requires the field number.

I am obtaining the field name by using the CALCULATE function.

After obtaining the field name using CALCULATE, is there a command that returns the field position number?

TIA,

Jim Dierking


At 23 APR 2004 02:58PM Matt Sorrell wrote:

Jim,

If you look in the %FIELDS% record of the dictionary for the table, there are several associated AMVs. One of these is the list of field names, the other is the list of FMCs. There is also one for the field data (data, symbolic, group). Once you have the field name, you can do a locate from the field in the %FIELDS% record and then extract the FMC from the other field.

I don't remember the specific layout off the top of my head, but can look it up if necessary.

msorrel@greyhound.com

Greyhound Lines, Inc.


At 23 APR 2004 03:10PM Jim Dierking wrote:

I edited the %field% and see what you are saying. Can you give me an example of the code you would use to extract the fieldnumber?

Thanks again, Jim


At 23 APR 2004 03:18PM Matt Sorrell wrote:

Jim,

Here you go.

Open "DICT","FILE" To DictFile Else Stop
DictRec="
Read DictRec From DictFile, "%FIELDS%" Else DictRec="

Locate FieldName in DictRec Using @VM Setting FieldPos Then
  FieldType=DictRec
  *Check to see if it is a data or symbolic field
  If FieldType=F' Then
    FieldNo=DictRec
  End
End

Hope that helps.

msorrel@greyhound.com

Greyhound Lines, Inc.


At 23 APR 2004 04:58PM The Sprezzatura Group wrote:

or Xlate("DICT.FILE", "FIELDNAME", 2, "X") ;-)

The Sprezzatura Group

World Leaders in all things RevSoft


At 23 APR 2004 05:09PM Matt Sorrell wrote:

Oh, sure, do it the easy way, why doncha?

My way's more "fun", for some definition of fun :)

msorrel@greyhound.com

Greyhound Lines, Inc.


At 23 APR 2004 05:59PM The Sprezzatura Group wrote:

;-) if you want to do more than one then your way IS of course quicker :-)

The Sprezzatura Group

World Leaders in all things RevSoft


At 26 APR 2004 10:24AM Jim Dierking wrote:

Thanks for the help and of course the fun…

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/f939f2b441a4f82185256e7f0067eac1.txt
  • Last modified: 2024/01/04 21:00
  • by 127.0.0.1