Jump to content

copy data in current found set


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

Recommended Posts

You can use export and import script steps.

First find the records that you want to copy, export them. Then switch the table and import.

Link to comment
Share on other sites

Export is possible only from one file to another file. I will explain my problem to make it clearer.

Actually, I want to use this DB for mail merge to selected contacts.

I have a table named ‘contact’ having fields, contact ID, First Name, Second Name, Full Name, address, email and City. I have another two tables called ‘groups’ and ‘group_contact’. In “groups’ I have ‘group name’ and ‘gTemp’ as fields and in ‘group contact’ I have ‘group name’, ‘Name’ and ‘email’ fields. These two tables are related at ‘groupname’. And group_contact is portal in ‘groups’ Layout.

I have to add all ‘full name’ and ‘email’ from two or more cities to a group one by one. On the other hand If I enter ‘Florida’ at gTmep in ‘groups’ and the trigger the button I want to add all the full name and email to the portal in the ‘groups’ layout, after that ‘Delhi’ and so on.

I also want skip copying if any entry duplicates.

Thanks

Sherif

Copying_a_currentfoundset.zip

Link to comment
Share on other sites

Hi,

I shall explain my problem. Actually, I want to use this DB for mail merge to selected contacts. Hence I want to create small groups from a long contact list.

I have a table named ‘contact’ having fields, contact ID, First Name, Second Name, Full Name, address, email and City. I have another two tables called ‘groups’ and ‘group_contact’. In “group’ I have ‘group name’ and ‘gTemp’ as fields and in ‘group contact’ I have ‘group name’, ‘Name’ and ‘email’ fields. These two tables are related at ‘groupname’. And group_contact is portal in ‘groups’ Layout.

I have to add all ‘full name’ and ‘email’ from two or more cities to a group one by one. On the other hand If I enter ‘Florida’ at gTmep in ‘groups’ and the trigger the button I want to add all the full name and email to the portal in the ‘groups’ layout, after that ‘Delhi’ and so on.

I have scripted this as a loop function but only one record is copied from a found set.

I also want skip copying if any entry duplicates.

Any kind help would be appreciated.

Thanks

Sherif

Copying_a_currentfoundsetMOD.zip

Link to comment
Share on other sites

You are setting the variables outside the loop. So they never change. And the last go to layout step is wrong; you're trying to loop through the found set of contacts but you're not on the contact layout. Also, there are other ways to do this besides stepping through a portal. Using multiple fields in the relationship, see second version of script (attached)

Copyfoundset.zip

Edited by Guest
Link to comment
Share on other sites

You are making the same request in two different folders, which you are not allowed to do and an admin will probably cancel one thread or the other. Also note that in the other thread your question HAS been answered. By me.

Link to comment
Share on other sites

This isn't as polite or kind as you would expect it from say a shopkeeper, but....

Persons might be member of several groups as well as groups are very likely to have several members ...structurally is it a many2many in my humble opinion! Why isn't the relational graph reflecting this?? Why is information thrown to several places in the solution and by it indeed wearing a syncronization problem??

Bruce might have solved a scripting issue that never would have been raised if the solution was structured less randomly!

--sd

Link to comment
Share on other sites

This topic is 6458 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
×
×
  • Create New...

Important Information

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