12 Replies Latest reply on Jun 14, 2017 1:20 PM by rgordon

    FileMaker Go/Script help

    dbice

      Hello,

       

      I'm hoping that someone can point me in the right direction. I am using FileMaker Go to enter responses for an assessment. I will be the one entering the responses, as the testers are too young to do so. I need a way to notify when the tester has received 3 scores of 0 out of any consecutive 5 question items. The scores of 0 do NOT need to be consecutive. So for example:

       

      1.     1

      2.     0

      3.     1

      4.     0

      5.     1

      6.     0

      7.     0

      8.     1

      9.     1

      10.   1

       

      I would need to be notified in this instance because out of 5 consecutive items (#4-8), there are 3 scores of 0.

       

      Does anyone know how I could do this? Thanks!

        • 1. Re: FileMaker Go/Script help
          erolst

          Hmm, off the top of my hat, try this:

           

          • create a summary field List of: for the score field

           

          • use the calculation

           

          ValueCount ( FilterValues ( sListOfScore ; 0 ) )

           

          in Conditional Formatting, or to hide/un-hide an alerting object ... like a text object "Three or more 0s" with the Hide if calculation ValueCount ( FilterValues ( sListOfScore ; 0 ) ) >= 3

           

          Note that this assumes that a single score is stored in a single record; the summary field uses the Found Set, so this also assumes that only the new entries for the current contestant are active.

           

          If you have another data model or another workflow that doesn't lend itself to that method, let us know.

          1 of 1 people found this helpful
          • 2. Re: FileMaker Go/Script help
            dbice

            Thanks so much for this!

             

            Just to make sure I am understanding, are you suggesting I make a summary field for the score total field? I'm not familiar with using summary fields, so I'm trying to read up on them and experiment, but you may be able to explain it better.

            • 3. Re: FileMaker Go/Script help
              erolst

              No, I'm suggesting you create a summary field of type List of that gives you a list of all scores that you can examine for the count of zeroes, as described above.

              1 of 1 people found this helpful
              • 4. Re: FileMaker Go/Script help
                rgordon

                I believe ValueCount ( FilterValues ( sListOfScore ; 0 ) ) will determine when 3 zeros have been entered regardless of where they occur.  Assuming that the scores are entered in order, this calc should determine when 3 zeros occur within the last 5 consecutive scores.

                 

                ValueCount ( FilterValues ( RightValues ( sListOfScore ; 5 ) ; 0 ) ) ≥ 3

                 

                This calc could be used in an OnObjectModify script triggers that brings up a dialog box telling the user to stop.

                 

                If (ValueCount ( FilterValues ( RightValues ( sListOfScore ; 5 ) ; 0 ) ) ≥ 3)

                    Show Custom Dialog [Stop!!]

                End If

                1 of 1 people found this helpful
                • 5. Re: FileMaker Go/Script help
                  erolst

                  rgordon wrote:

                  Assuming that the scores are entered in order, this calc should determine when 3 zeros occur within the last 5 consecutive scores.

                  Yes, I managed to overlook that bit. Thanks for the clarification and correction.

                  • 6. Re: FileMaker Go/Script help
                    dbice

                    Thanks so much for this! I'm still having trouble figuring out the summary field, but I'm definitely on the right track now. erolst Thank you both for your help.

                    • 7. Re: FileMaker Go/Script help
                      erolst

                      dbice wrote:

                      I'm still having trouble figuring out the summary field

                      It's not really complicated:

                       

                      Screen Shot 2017-05-26 at 18.20.06.png

                       

                      Screen Shot 2017-05-26 at 18.30.46.png

                      • 8. Re: FileMaker Go/Script help
                        dbice

                        I know it has been nearly a month since I've posted this, but due to other work obligations, I am just now getting back to FileMaker. I'm still having a bit of trouble with this. Regarding the Summary field, I'm confused because it assumes there is a single score field, when actually the score is made up of 25 fields. I created a Calculation field to list all the scores to see if that could be used, but I still can't seem to get it to work.

                         

                        When I tried experimenting with conditional formatting, I was able to have a dialogue box pop up, but the issue was that the box would pop up when the first 3 items were scores of 0. I would still need to administer items #4 and #5 before the stop criteria would be met.

                         

                        I've attached the file I'm experimenting with for reference (Layout: DTVPII). I don't mean to exhaust my resources here, but there is definitely a learning curve. I'll take whatever help I can get

                        • 9. Re: FileMaker Go/Script help
                          philmodjunk

                          I'm confused because it assumes there is a single score field, when actually the score is made up of 25 fields.

                           

                          For better data analysis, this should only be one field in 25 related records. Makes things a lot more flexible and then a summary field can be used.

                          • 10. Re: FileMaker Go/Script help
                            rgordon

                            You have the trigger on the list field.  You need to apply the OnModify triggers to the 25 checkbox fields.

                            1 of 1 people found this helpful
                            • 11. Re: FileMaker Go/Script help
                              dbice

                              Thanks so much! That makes much more sense now.

                              • 12. Re: FileMaker Go/Script help
                                rgordon

                                I'm glad I was able to help.