Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mid Function Problem

Status
Not open for further replies.

Viscount

IS-IT--Management
Oct 10, 2003
85
GB
i have a field that contains the postcode of people. I want to return only the first 4 digits of the postcode.

I have put in...

mid({field.name}, 1, 4)

I am getting the error message "A Boolean is required here"

I am also already returning only records that are not null in this field by including...

{field.name} like "*"

If this is wrong - can somone tell me what I should be writing.

Can somone shed some light on this..?

Thanks

Vis.

 
It looks like you're using this mid({field.name}, 1, 4) in the selection formula,where the result are true/false and not a formula field.

If you want a specific post code, you would need mid({field.name},1,4)="1234" in your selection formula. If you merely want ot display the code, you would use what you have in a formula field. (insert / field object )

To return non-nulls, use not(isnull({field.name}) in your selection formula.

Mike
 
Thanks - being new to this I will see what damage I can do..!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top