Jump to content

Copying from a Table into a related portal record Script or buttontrigger?


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

Recommended Posts

I managed to write a script that copies from table to the top row of a related portal record, but I am having trouble making a button that does the same. Do I need a separate button to do this?

Should i use a script trigger  (and button) to fix this problem?

I ideally would like to do this in one step and it's not  working out ( I managed to get the script to create a blank record, but then it overwrites the same record over and over)

 

 

Link to comment
Share on other sites

yilbber,

 

It seems to me that you're diving into FileMaker without a solid understanding of basic concepts. Have you reviewed the training materials FMI publishes? http://www.filemaker.com/learning/training/fts.htmlThey are very well done and imho will help you avoid hours of frustration. FM is deceptively simple.

 

To your question, "copies from table" You don't "copy from table" but perhaps "copy" from a field. Copying in general is to be avoided in a relational database, unless your data needs to reflect a moment in time, such as a product price at time of invoice.

 

Please describe your goal, rather than ask about script steps and tools. We can better suggest the technique if we more clearly understand the context of your need.

 

hth,

Barbara

  • Like 1
Link to comment
Share on other sites

yes it needs to be recorded and saved, ... but since you mentioned this is done in invoicing, I'm going to see what I can glean from the scripts i already have.

The goal of the script is to copy the Crew field and crew info to the related table record, but it needs to occur with one "step" without switching layouts.

The steps it does do is that it looks up the related record, using the current layout and the correct tab, Copies the several ids to the related record, and saves the record. What's not working is it creating a new record so i can continue adding via the same button. I believe it's an issue with sorting and where new records appear.

If i sort by creation order, I believe I might fix some of my problem.

Link to comment
Share on other sites

The goal of the script is to copy the Crew field and crew info to the related table record

 

At the risk of repeating what Barbara already said: you are asking how to do something that in a properly structured solution should not need to be done. I suggest you revisit your fundamental design (what entities do you track and what are the relationships between them) before you continue to weave this tangled web of more and more complex scripts.

  • Like 1
Link to comment
Share on other sites

No, you need to not do that operation at all; and learn database concepts and FileMaker; and fix your design.

Especially if you actually expect to get help here.

Link to comment
Share on other sites

Hi yilbber,

 

 

What Bruce and others are telling you, is that your questions are setting 0ff alarms with us about your database structure, or that you have a lack of knowledge that is taking you down the wrong path. None of us want to help you do that.

 

Although the FmForums helps all skill levels, it is the members responsibility to have some basic knowledge of FileMaker, and database structure. There are many ways to acquire these necessary basic skills. Read the FileMaker User Manual, buy aftermarket books, enroll in online training courses, attend local seminars etc.

 

Things such as ERDs, naming conventions, relationships and relationships graph, etc. are not luxuries, they are essential knowledge that you need to acquire.

 

I would recommend that you take one of the online courses. However, you could do a search in Google for FileMaker Training, you will receive a lot hits to links for these resources. I can recommend a couple that I liked, if you want a list of those, please contact me by Private Message

Link to comment
Share on other sites

yilbber,

 

You really need to listen to professional developers who REALLY know what they are talking about.  If you proceed down the wrong path, you will at best have a slow, twisted system and at worst (more likely), have a system which must be pulled back apart and properly structured as was suggested repeatedly.

 

If you continue to build without understanding the fundamentals, you will waste MANY MANY hours doing it wrong only to do it all again right after you finally listen.  Believe it ... we've all been in this business professionally for a group total of easily 40 years.  Do you really think that turning a blind eye is wise at this point?

 

Your base structure is the most important to get right.


LOL, well now yilbber knows for sure what to do.  We can point out a cliff but we can't stop someone from stepping over.  :-)

Link to comment
Share on other sites

I agree with all the advice you've been offered here. Failure to get the basic relational structure right at the beginning will without doubt result in a huge result of wasted time in the (very near) future. Believe me. I've been there but have been fortunate to have made corrections before doing too much damage. Currently I'm "weeding out" references to a very important but badly conceived idea in my business solution that I implemented years ago but should never have done. To complete the job will take untold hours. Had I more information at the time I would have never implemented the questionable method. You have, courtesy of the contributors to this forum, been given excellent advice at what appears to be quite close to your starting point. Take the advice and study up before making major design decisions.

Link to comment
Share on other sites

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