Jump to content

RE: Set the number of Variables based on the number of found records


This topic is 4355 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi there,

I have a script that goes to a set of found records. I am trying to concatenate 1 field from each of those records. I need to somehow get my script to create a variable for each found record.

Ex. If there are 4 records found I want to set #Variable1--> next record --> $Variable2--> next record --> $Variable3 --> next record -->$Variable4

My problem is I can't figure out how set the variables to accommodate different numbers of records (usually between 1 and no more than 5 records)

Any thoughts would be greatly appreciated

Chad

Link to comment
Share on other sites

I figured he'd use list thru a relationship, comment. But, you're right to point out that it isn't found set aware.

I feel that answering his question without exploring why he feels he needs this technique is not doing him a service.

Link to comment
Share on other sites

I feel that answering his question without exploring why he feels he needs this technique is not doing him a service.

Also agreed.

But would like to note that the preferred way to set and read numbered variables is the repeating variable square bracket format, which is much more easily addressable:

$var[1], $var[2], $var[29] etc

Link to comment
Share on other sites

This topic is 4355 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.