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

Retrieve element number in a Array. 1

Status
Not open for further replies.

dunlop1975

IS-IT--Management
Joined
May 22, 2007
Messages
124
Location
CA
I am wondering if there is a command to just give me the element number of an item in an array.

I need to save space on the page, this report filters using a dynamic paramater so if 5 items are chosen in the parameter, I would like to be able to use the element# instead of the item that is selected in the parameter (I would list the items with their corresponding element number in the page header)

 
disregard, I figured it out thx
 
Please share your solution so this thread becomes meaningful for readers.

-LB
 
Sorry the 2nd post was from my phone.

I didnt find any direct syntax that would do what I wanted so used a loop instead

//formula
Local Numbervar i;
Local Stringvar DisplayString;

For i := 1 to ubound({?Parameter}) //loop for each element
Do
if {dbo_Field} = {?Parameter} then Displaystring := "(" & totext(i,0) & ")"; //Determine which element this field matches and store the value in parentheses

DisplayString; //display output
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top