Jump to content

jax

Members
  • Content Count

    11
  • Joined

  • Last visited

Community Reputation

0 Neutral

About jax

  • Rank
    newbie

Profile Information

  • Gender
    Not Telling
  1. Thanks guys. I will add this at a later point. Just after looking up what a join table is .
  2. I will change the 2 points indicated. In fact, I was looking for a boolean format when I set up the variable but only found number format which didn't seem right. I guess if you spent enough time with FileMaker looping and other programming becomes 2nd nature. I had already been working on this for an hour when you posted and hadn't arrive yet at the right solution. If this where DNA I'd be faster ;-) Thanks for all the help.
  3. Ok, I've gone through this cool script line by line reading up on the commands used. I pasted the text into the global text field and ran the script but at first it only read the first question and options. I discovered that this was a newbie error causes by the weird way that the FileMaker Script editor does not allow direct text editing of scripts but forces users to put everything in click by click. This was the bad line I pasted in by mistake: Set Variable [ $i; Value:"Value:$i + 7"]. It should have read [ $i; Value:$i + 7]. I include the some details below for others noobs to be able to reproduce comment's great solution. It turns out there's no space between the X and the option, so I adjusted the LEFT and RIGHT commands accordingly. These are the commands I didn't know. Left takes 3 characters from the left of the $option text string. If that matches [X] $correct is set to 1. Right takes the full length of the string minus 3 characters from the right to not store the X in the option. The rest I couldn't come up with is clever looping using 2 counters $i and $j. This is the test text I used is attached. test questions.txt
  4. Excellent stuff. I'll give it a try. Still can't believe how you guys type this down in a few minutes. I would have to substitute minutes for hours Thanks a bunch.
  5. Hi comment, Thanks. Do you have a pointer for me where to find out on how to write a script like that and how to run it on a global text field?
  6. Hi FMers, I'm trying to get multiple choice quiz questions into a FileMaker database. The information is in a plain text file. Question and options are simply separated by returns: Where in the cell is the genome located? Mostly in the cytosol. Mostly in the mitochondria. [X] Mostly in the nucleus. Stored in the membrane. Stored in RNA. Next question... Each question has 5 options, one of which is correct [X]. There's an empty line between questions. What's a good approach to get this into a FileMaker database with separate fields for the questions, the options, and the correct solution? All the best
  7. Thanks comment. Works like a charm. I interpreted this differently since in my work as a scientist 1.0 means you are sure about the decimal. 1 means you have no idea whether it's 1.0 or 1.4. This is why I expected Round (number;1) to also return a zero.
  8. I use a formula to round a number to 1 decimal point and put brackets around it before plugging it into a text document. This works fine for most numbers but it fails for numbers ending in zero. They are instead returned by the function without any decimal, 1 nothing instead of 1.0. That's a bug as far as I can see. If I specify 1 decimal point and get none from the function, I consider the code broken. input: numbers with variable decimal points, e.g. 2.345 and 1.0 formula: "(" & Round ( final grade ; 1 ) & ")" output: 2.3 (correct) and 1 (incorrect) expected: 2.3 and 1.0 How can I work around this? I'm running FM Pro 12 Advanced.
  9. Hi comment, What a weird bug. One would think that such a basic function/calculation would be properly implemented in FileMaker. In any case, I tested it and it worked like a charm. Thanks a bunch. Regards
  10. Hi comment, hi eos, Thanks for answering. Sorted the relationship - check. Retrieved the grades in order using GetNthRecord() - check. I did this In separate fields to test. The command below correctly retrieved 1.0 as the best grade in a 1st, 2nd, 3rd system out of the following series: 1.0, 1.2, 1.4, 2.0. GetNthRecord ( module allocation::module grade ; 1 Then, I attempted the following computation of the average of the 3 best grades: Average ( GetNthRecord ( module allocation::module grade ; 1 ) ; GetNthRecord ( module allocation::module grade ; 2 ) ; GetNthRecord ( module allocation::module grade ; 3 ) ) But the average came out wrong and I have not the foggiest why. For 1.0, 1.2, 1.4, 2.0 it came out as 1.0 although after discarding 2.0 as the worst grade it should have been 1.2.
  11. Dear experts, Â I've got a student table linked via a linkup table to 3 or more courses in a 3rd table (see screenshot). The linkup also contains the grades. Â I've been chewing on the following calculation: calculate an average of the 3 best course grades, e.g. discarding the worst if a student took 4 courses. So, I have to collect the grades via the student ID and then discard the worst if more than 3. Â I've already burned 2h hours on this since I'm not very familiar with FM. I hope somebody can help me out. Â All the best,
×

Important Information

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