Page 1 of 1

Field name from record click

PostPosted: Mon Mar 31, 2014 11:07 am
by datadon
I think I know the answer to this but thought I would ask anyway, sometimes I am surprised.

Using the Stardard NBDBPro grid, when I click on a record in any field, is there any way to know what the field name is by just clicking on the cell in the column?

The grid will highlight the column cell in that record.

I'm trying to determine a field name by clicking on the column. I know it is shown at the top, but that won't help me progrmatically.

An example would be if I were trying to import information from a table into a column into another table but don't know ahead of time what the fields would be. I know I can show a list of field names to choose from but thought this would be easier if available.

Thanks

Re: Field name from record click

PostPosted: Mon Mar 31, 2014 11:56 am
by Danito
Code: Select all
dbpGetActiveField

Purpose:
 Returns the name of the field in the grid that is highlighted or active.
 
Category:
 Grids
 
Syntax:
 dbpGetActiveField "database id" "table" "variable"

database id

The name assigned to the database.

table

The name of the table.

variable

The name of the variable where the name of the active field will be stored.
 
Example:
 dbpGetActiveField "AddrBook" "Contacts" "[SelField]"

If "[SelField]" ">" ""

  dbpSort "AddrBook" "Contacts" "[SelField] ASC"

EndIf
 
SQL Equivalent:
 

N/A

Re: Field name from record click

PostPosted: Mon Mar 31, 2014 12:01 pm
by datadon
Well I'll be. Right in front of me and I never used it. You think you got it all figured out and...... Never to late to teach and ole dog....

Thank you.