Using a function for a query field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to sort a field in a query containing values which consist of both a
numeric value, as well as a multiplier (e.g. "k" for 1000, "m" for 1/1000,
etc.). An approach I thought of was to create a second field, which would
call a function to convert the alpha-numeric values of the first field into a
purely numeric field which can then be sorted. Can I call a function from a
query field?
 
I need to sort a field in a query containing values which consist of both a
numeric value, as well as a multiplier (e.g. "k" for 1000, "m" for 1/1000,
etc.). An approach I thought of was to create a second field, which would
call a function to convert the alpha-numeric values of the first field into a
purely numeric field which can then be sorted. Can I call a function from a
query field?

Sure.
SortField:NameOfFunction([Field])

Where "NameOfFunction" is whatever name you have given the function
and [Field] is the name of the field passed to the function argument.
 
Back
Top