Jump to content

List() only getting 1st value


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

Recommended Posts

HI, Ive done a find and got my record set, say 10 records, and then the following line

set variable [$Clients; value:list(CLIENTS:ClientID)]

but it's only taking the 1st ClientID even though the get(foundset) shows 10. what's going wrong ?

Link to comment
Share on other sites

You can have your script loop through the found set, adding the values to a variable, one by one.

I want to add new records to another table using the data from a field in a found set

Are you sure about this? It sounds like creating a redundancy. Perhaps if you explained what are you actually trying to achieve here, a better way could be found.

Link to comment
Share on other sites

  • 2 weeks later...

Thanks, It all worked it out fine using TO's. the 'help' didn't say anything about not working on a current found set.

I have a number of clients, some of whom need us to hold accreditation, and I was wanting to make a new record in a table for so each of those that do. There's a 'tick-box' field in the client table to show which do (they often change their requirements) and in the script I had the set variable [$Clients; value:list(CLIENTS:ClientID)]. I then when to the table and into a loop, entered the rightvalues()into each new record (along with some other ID info obtained earlier via set variables) then deleting the it from $client using LeftValues( $clientsID; ValueCount($clientsID) - 1 )and exiting the loop when isempty($clients)

Link to comment
Share on other sites

I have a number of clients, some of whom need us to hold accreditation, and I was wanting to make a new record in a table for so each of those that do.

Wouldn't it be sufficient to flag the records in the Clients table?

Link to comment
Share on other sites

This topic is 4353 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.