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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return a value from an Array

Status
Not open for further replies.

loschiavoj

Programmer
Dec 28, 2000
23
0
0
US
I am trying to have a formula look for a Name in Table1/Column1 and return the number in the same row for Table1/Column2. When i execute the following nothing is presented in the filed for {Table1_Column2}. This is on CR 11.0 using an Oracle database.


if {?Parameter} in {Table1_Column1}
then
{Table1_Column2}
else
"No Records Found
 

Is this a database where each field contains multiple values? Please provide some sample data.

 
Let me see if I understand. Say your Column1 is letters and Column2 is numbers:

Letters Numbers
A 1
B 2
C 3
D 4
E 5

If you type in C for the parameter, you want the formula to return 3 and "No Records Found" for everything else. Is this right?

If so, for the formula field, try:

if {Table1_Column1} = {?Parameter}
then cstr({Table1_Column2})
else "No Records Found"

and replace the Column2 field with the formula.

Hope this helps.

-DJWW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top