Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

OR in StrIFF

OR in StrIFF

OR in StrIFF


I am totally new to QRPs but our finance app uses them to generate invoices. We have a requirement where we want to output a string based on the value of something taken from the app.

From what I can gather, StrIFF returns 3 values: -1 if the input value is lower than the comparitor, the input value if it equals the comparitor, and the value higher than the input value. Take this as the input value: AUD

StrIFF(StrCompare(inputvalue, 'GBP'), '1', '2', '3')

In this case the result will be 1, because AUD is alphabetically before GBP. IF the inputvalue was USD, the result would be 3.

What I need to achieve is: if the inputvalue is either AUD, NZD output 'W', if it's GBP, EUR output 'X', if it's HKD, JPY output 'Y', if it's CAD output 'Z' and so on and so on.

How do I achieve this?

Thanks so much!

RE: OR in StrIFF

Greetings from NZ !
And welcome to Gupta ReportBuilder. Hang in there it does get easier.

StrTranslate(inputvalue, 'AUD,NZD,GBP,EUR,HKD, ....','W, W, X, X, Y, ....')



Finds the value specified by inputvalue in csv1. The function takes the position of the item in csv1 and finds and returns the item in csv2 that is in the same position.


inputvalue: The comparison variable. Must be a string data type.

csv1: A string composed of comma delimited look-up values. The contents of type are compared to this list. For example, 'N,S,W,E'.

csv2: A string composed of comma delimited values, one of which is returned by the function. For example, 'North, South, West, East'.


StrTranslate (region, 'N,S,W,E', 'North, South, West, East')

In this example, region is an input item with a data type of string. The StrTranslate function returns one of the following depending on the value of inputvalue.

inputvalue substring returned

N North
S South
W West
E East

Greetings from New Zealand !

See Bankside Systems Ltd for all Gupta / Centura SQLWindows / SQLBase help at: https://www.banksidesystems.com/

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close