Jump to content

dreamingmind

Members
  • Posts

    94
  • Joined

  • Last visited

Everything posted by dreamingmind

  1. That formula says: If the related record's 'semester' field contains a '1', then sum the 'workload points' fields in the related table. Restated: Sum all the related records when 'semester' = 1 What you want is to have a relationship that sees only the semester 1 records for a teacher and sums those. Right now, you probably have the two tables related on teacher. You'll need it related on teacher and semester. Maybe that's enough to set you on the right track? Regards, Don
  2. Joe, You're probably going to have to post the file to get resolution. Regards, Don
  3. Well there ya go! The whole magilla! Don
  4. John, You can easily get the layout names in your file with the design function LayoutNames(filename). This will return a value list of all the layout names. Now the problem is to get the tables... You can loop through the returned value list of layout names. But what to do with them. The design function FieldNames(filename;layoutname) can return the field names in a value list. Unforturnately, the fields local to the TO that supports the layout don't tell what the TO name is. All the related fields do identify their TO (TableOccuranceName::FieldName). So, if every layout has related fields on it and you use a TO naming convention like anchor/buoy (base_to.next_to.THIS_TO), you could extract the base TO name. This is not a good bet though. Things would surely fail. As an alternative, you could take responsibility for always adding a named text object on the layout that identifies the Table Occurrence. So every layout would have text on the layout that is the TO name and which is defined as an object named, say, "TO_Name". Then, when you step through the value list that holds the layout names, you could get this object on each layout and examine its content using the Logical function GetLayoutObjectAttribute(). If you ever forgot to add the object to the layout or miss-typed the text, things would fail. But this could give you what you need. Regards, Don
  5. left(A;5) will return you the first 5 characters of A So, you can concatenate them to the beginning of B like this: left (A;5) & B In a script you would use the SetField step. Or, you could do this as an auto entered calculation, but I'm guessing you're working in a script. Regards, Don
  6. I'm suggesting you: manually go to layout 1 manually enter your value manually go to layout 2 manually enter your value then do you still get the goofy result? or perhaps you're script is doing MUCH MORE than this. in that case more info and examination of the intervening processes would be in order. Don
  7. That sounds a bit like there is a look-up or calculation acting on the field. Do you get the same result when you do the process manually rather than through the script? Don
  8. You should be able to do this with the Case statement: Case (evaluate_this_boolean ; do_this_on_true ; do_this_on_false) Case (type = "A" ; hours * 60 ; hours * 90) Case can deal with multiple tests too for more complicated situations. Regards, Don
  9. Are you getting a record locking problem? You may have to commit each record as you go along. Without more info, it's a little hard to guess. At a minimum, what result are you seeing on the 'wrong' attempts?
  10. That's pretty sketchy. Leaves many questions. Non the less: I'm assuming you are using a drop down list or something like that to show the related records? If so, you could show data from a second field in the value list. That's a field from the right hand box in the "Edit Value List" dialog. Regards, Don
  11. jambox, You will surely get more informed opinions with specific explanations, however: Changing your calculations to number fields that auto enter a calculation improves things greatly as you can see from the attached version of your sample file. The calculations now trigger only when a referenced field changes. This will happen for some calculations and not others as you enter data. And NO calcs will run when you navigate from record to record. With all live calc fields as you had, everything in a record must calc as you move around. I wasn't sure what was up with that credit field that uses getnthrecord so I didn't change that one. It looked fishy but I was too lazy to figure it out. Regards, Don
  12. It is a simple matter to do a search/replace in Word. Search ; and replace with ^p (the code for a return). Then save your file as a text file (.txt rather than the usual .doc). Now you can import that file, no sweat. Regards, Don
  13. Treigh I use SmartPill Editions to do this. I've found it to be the simplest way to make the connections and it has the advantage of adding the entire PHP language to FileMakers calculation engine. http://www.scodigo.com/products/smartpill-php This is such a huge addition! Here's the php manual page on sql functions http://us3.php.net/manual/en/book.mysql.php Here's the page for array functions: http://us3.php.net/manual/en/ref.array.php Imagine writing FM scripts to do some of those array tasks! I find those very useful. And you can drop php classes written by other programmers into your solutions to gain all sorts of functionality. I use one that calculates holidays (including those crazy lunar calendar holidays like easter). I also use SmartPill to trigger script when field content changes. You can get other plug ins for this, but why not get a whole programming language in the bargain. It has functions to draw graphics, manipulate image files (it can resize jpegs for example, or tell the dimensions of an image). It can write files to your drive. I wrote a simple file system navigator in FM using SmartPill Editions. Regards, Don
  14. Jon, Here's a simple example that accomplishes your goal. Notice the third table that contains a student and faculty id. This allows you to make the many to many link. I made it so you can assign teachers to students or students to teachers. Look it over. Ask questions Don student_faculty.fp7.zip
  15. George, Hmmm... If you truely have 21 portals, each will naturally show the first related record. Hence, each will show the same thing. In FM9 you can specify which portal row is the initial portal row and how many rows will show. If FM8.5 has this feature, you'll find it in the portal setup dialog. Using this, you could have each portal show one row and each show a different row. Why not put a scroll bar on the portal and let one portal show all 21 rows though? Regards, Don Drake
  16. George, Here is a working sample. Don thingy.fp7.zip
  17. Thanks. Not what I was hoping to hear, but that reading makes sense. Regards, Don Drake
  18. George, It sounds like you are just referencing a wrong relationship somewhere. One common result of such a problem is that the first related record gets operated on no matter which portal row you change. Check the portal, the fields in the portal row and any script steps that reference the relationship and you will probably find an unexpected and incorrect reference in one of them. Regards, Don Drake
  19. That doesn't really answer the question. Here is more detail and a reason WHY I want this feature. I have people records I have location records Several people may be at the same location Any person can link to any number of locations To accomplish this I use an in-between table containing a link to the person and a link to the location, a bridge record. I may want to sever a person from a location, but there may still be other people at that location. In this case, I want to delete the bridge record (but not the location, obviously). In other circumstances I will want to delete everything and leave no orphans as you describe. So? I know it's possible to allow CREATION of related records differently in different layouts and TOs. Why is deletion different? Regards, Don Drake
  20. You could set the field to activate a script. The script says: If test field is empty, go to the field you clicked on. End If In the case where the test field has content, the script will run, capturing your click and the field will not receive the cursor. Regards, Don Drake
  21. Consider Table A and Table B. I have more than one related pairings of these tables like this: A to B on serial, delete related records in B when records in A are deleted. A1 to B1 on serial, delete related records not checked here. There is no connection between AtoB and A1toB1. Now I'm in a layout based on A1 to B1 and I delete an A record. All related be records are being deleted as though I was in a layout based on the first relationship. Am I misunderstanding this feature? Regards, Don Drake
  22. Tom, That's one way to go. Personally, I'd probably just add a little error check to the script to make sure the relationship is turning up some related records. In the case of the error condition just toss up a dialog. Then you don't have to deal with any extra records you might create in your method. I'm a little bit rusty on the specifics right now... maybe the IsValid calculation will work in this case or perhaps you can do GetField on the related data and see if you actually got anything. Regards, Don Drake
  23. - Build a relationship so each state record can see all its related city records --- more info on this process if you need it: ----- state table has state field ----- city table has state field ----- relate the state fields to each other - make your state layout - make your city layout - create a simple script that does go-to-related-record from the state to it's city collection, and which also displays the found set of related records in the city layout. - tie your script to a button on the state layout. Yer all set! Regards, Don Drake
  24. dreamingmind

    Portal

    In your cashier file you can have a global that is set to paid (or not paid) and use this to help link to and filter the invoice items of interest. Regards, Don Drake
  25. dgula, It's a little hard to sort out what you're driving at but... You can show related data outside a portal also. Just put a field from the related table in you layout and... what will you see? The first record from the related data. By sorting the relationship you should be able to control things and see the record you're interested. Regrads Don
×
×
  • Create New...

Important Information

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