December 6, 200124 yr This should be an easy one for the Gurus: I have two simple databases: DB1 is a simple call log for a tech support team. DB2 is a simple knowledge base. I need to have the option to create a new record in DB2 from some of the fields in DB1 by using a simple switch in DB1 such as "Add record to DB2: Yes/No" I'm a graphics/CAD guy but I get very turned around with databases. Any help would be greatly appreciated. Thanks, Dave www.daviator.com
December 7, 200124 yr Author That's because I thought it covers two areas of the forum. Besides, there was no answer here so I thought I'd post it there. If you look at the time stamps, they're hours apart. Who are you? The FM Forum police?:? I've seen your postings before. You're the guy who tells the newbies that their stupid but never answers the questions. Why don't you just help or leave? [ December 07, 2001: Message edited by: daviator ]
December 7, 200124 yr He was just trying to clean up the message boards. Someone who is looking for help should be more polite...but then again what do I know, I'm just Canadian Here's a quick and probably ugly fix to your problem. Create a global number field in File B and set it to 1. Create a number field in File A that is preset to 0. In File B create a relationship between these fields. On the layout that you enter the info, include a button with the caption "Update File B." This button will be attatched to a script that will set the number field to 1, perform an external script in File B, and then set the number back to 0. In File B the script should create a new record, and set all the fields using the relationship. Set Field[ "Txt Field" , "File A::Txt Field" ]
December 7, 200124 yr Author Thanks FUBAR. I'll give that a shot. I didn't mean to be impolite but Vaughan seems to just do that...clean up the message boards. Since my issue could possibly overlap two areas, relationships and scripts, I posted in both areas. Not 3 or 4, just 2. Answering my post with a note that I posted twice is not helpful, that seems to "dirty" a board more than two posts. I answer dozens of posts and emails on 3-4 hobby websites (including my own website) weekly. I never feel the need to be condescending even when I see the same posts on multiple sites. F.Y.I. I love Canada Thanks again! Dave Eckert www.daviator.com [ December 07, 2001: Message edited by: daviator ]
December 7, 200124 yr Author Thanks FUBAR! I got it working now. It will create dupes but I'll figure that one out on my own. Thanks again! Dave
December 8, 200124 yr Author To FUBAR, A couple of follow up questions if I may: How do I Set a Global Field to 1? How do I perform an external script? How do I set all the fields using the relationship with a script? Sorry, I'm new to this and am just trying understand what I'm doing to not only make it work but have the knowledge myself. Thanks again! Dave
December 8, 200124 yr 1. Either create a layout and put the global field on the layout and set it to 1 (only have to do this to one record since its a global field) or use the script step "Set Field" ---> Set Field[ gFlag , 1 ] 2. Use the script step "Perform Script" then chose "External Script" then choose the second database, then choose the script you want to run. 3. Create a script that creates a new record and sets the fields with something similar too... ---> Set Field[ "Name" , "File A::Name" ] ---> Set Field[ "City" , "File A::City" ] etc. etc.
Create an account or sign in to comment