Using a function for a query field

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?
 
F

fredg

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top