sherifmayika Posted August 10, 2006 Posted August 10, 2006 (edited) HI, I have two tables, 'A' & 'B' Want to copy some records from A to B based on a search . I have touble with the script. Please healp me Edited August 10, 2006 by Guest
Osman Posted August 10, 2006 Posted August 10, 2006 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.
sherifmayika Posted August 10, 2006 Author Posted August 10, 2006 Hi thank you mr. osman for you quick helping hand . It seeme to be very intersting. i will try this method and let you know result sherif
sherifmayika Posted August 11, 2006 Author Posted August 11, 2006 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
sherifmayika Posted August 12, 2006 Author Posted August 12, 2006 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
bruceR Posted August 13, 2006 Posted August 13, 2006 (edited) 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 August 13, 2006 by Guest
bruceR Posted August 13, 2006 Posted August 13, 2006 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.
Søren Dyhr Posted August 13, 2006 Posted August 13, 2006 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
sherifmayika Posted August 13, 2006 Author Posted August 13, 2006 Thanks to bruce and soren dyhr, The file sent by bruce terrifically solved the problem. sherif
Lee Smith Posted August 13, 2006 Posted August 13, 2006 I have merged the two topics and sent a private message to sherifmayika. Lee
Recommended Posts
This topic is 6688 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 accountSign in
Already have an account? Sign in here.
Sign In Now