Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Abstract reference to buffer field contents?
Message
From
21/12/1999 19:54:00
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00306762
Message ID:
00307035
Views:
28
Sorry Neil - didn't read your question right at first.

The following is from my cursor class:
       PROTECTED PROCEDURE FieldConflicts
          LPARAMETERS tcAlias, tnSource
          LOCAL lnField, lcField, luOldVal, luCurVal, i

          FOR lnField = 1 to FCOUNT(tcAlias)
              lcField = FIELD(lnField, tcAlias)

              IF TYPE(lcField) = "G"
                 LOOP
              ENDIF

              luOldVal = OLDVAL(lcField, tcAlias)

              IF tnSource <> 3
                 REFRESH(1, 0, tcAlias)
              ENDIF

              luCurVal = CURVAL(lcField, tcAlias)

              IF luOldVal <> luCurVal
                 WITH This
                      i = ALEN(.aConflicts, 1) + IIF(VARTYPE(.aConflicts[1, 1]) = "L", 0, 1)
                      DIMENSION .aConflicts[i, 5]

                      .aConflicts[i, 1] = RECNO(tcAlias)
                      .aConflicts[i, 2] = UPPER(lcField)
                      .aConflicts[i, 3] = luCurVal
                      .aConflicts[i, 4] = EVAL( (tcAlias + [.] + lcField) )
                      .aConflicts[i, 5] = luOldVal
                 ENDWITH
              ENDIF
          ENDFOR
       ENDPROC
>How can I return the contents of a selected field without knowing the absolute alias or field name?
>
>I'm experimenting with commands that will eventually become an error handling routine. I want to see if I can save all pertinent info to an array and later copy it to an error history table.
>
>One thing I would like to save in the event of an update conflict is the OLDVAL(field(i)), CURVAL(field(i)) and the value of the field in the edit buffer, which the user may have changed. This last one causes the question. I haven't found any way to reference the edit buffer field except for 'tablename.fieldname'. Is there a way to do so using variables?
- Jeff
Previous
Reply
Map
View

Click here to load this message in the networking platform