Jump to content

Eli Walker

  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Eli Walker

  • Rank

Profile Information

  • Title
    Wildlife Research
  • Industry
    Wildlife Conservation

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thanks everyone for all the suggestions, these are all very helpful and have solved my problem. Really appreciate it!
  2. I found a thread regarding this from 11 years ago, but couldn't find anything else so thought it may be best to check if the newer versions of FM have a solution to this problem. Is there any function or custom function that would allow me to check if the value in a field is numeric? I have a field that is supposed to be only numeric (primarily only positive integers) however occasionally there are entries like '1 + 4' or '10 + 2'. I'd like to enter the contents of this field into another field, but only with the entries that are numeric only. Any thoughts? Really appreciate any help.
  3. Eli Walker

    Problems with SQL sum

    One other question though, how can you use the sum function on related records but only for records that meet a certain condition? Is there a way without creating a new relationship? That's what I was trying to avoid by using with sql. Thanks again!!!
  4. Eli Walker

    Problems with SQL sum

    Thanks bcooney! Really appreciate the quick feedback! I will check that page out and see if I can understand everything. Oh... well I really was trying to make that more complicated than it needed to be! Your suggestion works great, thanks... I guess for some reason I didn't think a simple sum like that would work.
  5. Hi all, I'm trying to use execute sql to populate a field with the sum of all the values in a field of related records. All I get is a ? so obviously something is wrong with my syntax but I cannot figure it out. Any help much appreciated! This calculation is occurring within the 'Collections' table. Let ( [ query = " SELECT SUM(S.Volume.used) FROM \"Straws_for.entry\" AS S JOIN \"Animals.to.Collections_join\" AS A ON \"S.fk_a.to.c.join\" = \"A.pk_join\" WHERE \"A.fk_collection\" = ? " ; collection = Collections::pk_collection ; result = ExecuteSQL ( query ; "" ; "" ; collection) ] ; result ) Also, after some reading on similar threads I see people suggest not using this function in a calc. field... if there's any better way of doing it I'd love to hear it. Thanks for the help, really appreciate it.
  6. Eli Walker

    Join table portal within portal

    Hmm.. I didn't think of using global fields like that but I'll look into it. That may do what I need! Thanks Wim
  7. Eli Walker

    Join table portal within portal

    Thanks for the response Wim. Yeah, I've seen it done but I'm not yet versed in the practice. However, isn't that for displaying/reporting on data? With this layout I'm mainly interested in data entry...
  8. Eli Walker

    Join table portal within portal

    Hi Wim, thanks for your response. It's not the cheetahs that are being killed. A 'Kill' is anytime a cheetah successfully hunts and kills a prey animal. That's why within the portal with the kill details, I'd like to have a portal to the cheetahs to kills join table so that I could create a new join record for every cheetah that participated in the hunt (in order to individually link the kill to each relevant cheetah). Does this make sense? And yes, at the moment since it's a single row I can only enter one kill per tracking session but I'm going to change that to allow more rows. No, this information is not tracked here. All of the necessary information for each kill is contained within that 1-row portal. All I'm needing to do is indicate which cheetahs participated in the kill (and if I'm correct I think it's best to do this with a join table?). Yes! Most definitely, that's the main reason I had set it up using a join table. I want to be able to easily report on kills by individual cheetah Yes, I have a join table between kills and cheetahs because each cheetah has multiple kills and each kill has multiple cheetahs. From your advice and comment's advice, I think I have the joins set up properly. I just want to be able to access them within a single layout... which requires the portal within portal (as a checkbox will not create the join records that I need). Thanks for putting the example file together it definitely helps me understand what you are suggesting. Does this clarify much? Thanks so much for everyones help on all of this and sorry it's not making much sense.
  9. Oh sorry, I see. That script isn't the latest version, but I thought it was. I'll post it tomorrow!
  10. Ok will do. But it should look exactly the same. The problem was the time format in the layout from which I pulled the time variable. Once I put it into the right format the script worked fine. I'll also try and make a mock file as josh requested to recreate the error so you all can see. Will have to do this tomorrow though as I don't have internet at my house and I'm currently typing on my phone... Plus our power is about to shut off
  11. Hi, let me clarify. In the table there are two fields, one date field and one time field. The find that the script performs has three find requests, one on the date field and two on the time field. Then during the script, error 500 would display after running the find. Nothing I did to the date fixed the error but as soon as I removed the find requests involving the time field the error no longer displayed... Which is where the confusion is. Why does error 500 display for an incorrect time format? (I later added the two time requests back in and made sure the time format was correct and it worked fine)
  12. Eli Walker

    Join table portal within portal

    <bump> Any thoughts on this?
  13. No, the field is just a time field, not a timestamp field. The error shows in the script debugger after running through the find step. The find returns no records and the error appears. I removed the time variables and the find worked fine without any error showing and it was definitely error 500... not 501
  14. Well it's not an auto-enter field if that's what you mean? It's just a normal editable time field... strange.
  15. Hi Comment, thanks for all your help on this... I finally managed to identify the issue. Apparently, it was the format in which the two time variables were entered. I guess error 500 encompasses date and time, not very intuitive. The find is now working as I originally had it.

Important Information

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