7 Replies Latest reply on Mar 24, 2017 9:54 AM by dbice

    Help with scripts

    dbice

      To preface this, I am a research analyst that was thrown into using FileMaker without any prior knowledge of the software or development experience in general. My team originally used FM for simple data entry, but now they would like to use FM Go for data collection on the field.

      I am trying to recreate our assessments on FM and having a bit of trouble. There are two things I would like to do:

       

       

      1. There is one assessment question that asks the participant to select specific shapes out of an assortment of about 30 images. There are several correct answers. The participant receives points for choosing each correct image, but also receives points for NOT choosing the incorrect images. My thought is to put buttons on each image, but I have no idea how to even begin writing a script for these buttons. Thoughts?

       

      2. With some assessments, we have implemented stop criteria so that if the participant gets a certain number of items incorrect, we stop the assessment and move on. For instance, if a child gets two consecutive scores of 0, we are supposed to stop the assessment. I would like to be able to notify the experimenter when stop criteria has been met. Any ideas?

       

       

      Thanks!

        • 1. Re: Help with scripts
          Jaymo

          On question 1, it's probably easier to use a portal. That way you don't have to do the work over and over by assigning each button at task. However, the structure is more complicated than what I think you might have right now. What you would do is create a table of images. Each time someone takes an assessment, import the images into a join table. The table structure would be:

           

          Assessment ---< Join >--- Images

           

          Question 2 is fairly easy to implement but all depends on the structure of your solution. I would set it up with records so it is adaptive. It sounds like you have one table right now so that is considered flat. You might need some assistance on your structure so you don't have to redo everything each time a question is changed or added. It will also allow for better reporting. What that means is you are going to need a table for questions and a join table for questions asked. Before going any further can you tell us a little about your current relational structure.

          • 2. Re: Help with scripts
            dbice

            I’m not too sure the portal is the best option for me, as I am not sure what it is. I should reiterate, I have no prior training. The less complex, the better. J I may be completely helpless in these forums, but I figured I’d give it a shot anyway.

             

            With that being said, each image’s point value is different. So for instance, if I choose image A I get awarded 1 point, if I choose image B I get awarded 0 points, and if I do not choose image C I get awarded .25 points. This whole thing is just one question on the assessment, so it is going towards a score total.

             

            Short answer…I have no structure. Everything is in one table. For each question on this particular section, the participant receives a score of either 0 or 2. I have these set up in checkboxes. (We chose checkboxes over radio buttons because we were having issues with experimenters accidentally making a selection on an item that was supposed to be blank and not being able to undo it on FM Go).  So if the participant gets two scores of 0 in a row, I need some way to flag it so the experimenter knows to go on to the next test. Other teams have used the PatternCount function for this, but I wouldn’t know how to go about it. 

            • 3. Re: Help with scripts
              Jaymo

              I hear you. The only problem is, not obeying relational design can create problems. FileMaker is an easy product to work with but you've chosen a fairly complex project for your first outing. Let me point you to some script steps you will likely need to use with your file as it is. However, I do this reluctantly because it's likely going to cause problems down the line. Start with Set Field. It allows you to place the result of a calculation into a field. The calculation doesn't have to be complex. You might have a field for every image and simply place a "1" into the corresponding field to determine that it was selected. If the person decides to deselect the image, an IF step can determine whether a "1" is present and replace it with nothing. Use conditional formatting to turn change the color of the button so the user knows a selection has been made. This will require a simple IF calculation. Try this on for size and see how you do.

               

              Attached is an example of what I am talking about. It's a very simple and straightforward script knowing you are a beginner. Good luck!

              2 of 2 people found this helpful
              • 4. Re: Help with scripts
                dbice

                This is all super helpful. Thanks so much!

                • 5. Re: Help with scripts
                  BMyers

                  dbice, think about how you want it to appear and describe it to us.  When I read your post I thought of a test where the child will see an image on what might look like a flash card.  The child makes the choice by clicking the appropriate box, and then that choice gives a visual confirmation with a checkmark or a color change.  Then the child clicks a "next" button, or perhaps the next image card would appear automatically after a delay of two or three seconds. 

                   

                  Or I could imagine a test with groups of shapes, with the sort of question that is "pick the three objects that have triangles."  This is a big difference in the back end design.  Not harder, but different.

                   

                  Will the child see whether the choice was correct then, or just at the end?  At the and you would need a "you're all done" message.  Then you will need some way to calculate the score.  Does the total score go to an administrator or can the child (or administrator) go back through the cards to see whether the correct choice was made?

                   

                  Does the system store all the cards and choices, or does the system discard the cards and only store the final score?

                   

                  The next question is whether a child will take this test once or multiple times, or perhaps different tests at different times?

                   

                  The experts on this forum can give you some good guidance with this information.

                   

                  It all sounds simple until we dig into the actual process.  You might actually want to pay a consultant to set up the basics for you.  You'll pay either in the consultant's fee or a lot of your work time.  There is no free lunch with app design.  Your project is interesting and a bit complicated for a beginner, but once you saw it built you could catch on to the process pretty quickly for your own future maintenance and improvements.

                   

                  By the way, if this project is important you will want to look at the upcoming FileMaker 16 which will arrive shortly. There is a new feature (sorry I can't describe it) that will be very handy in displaying the flash card type of interface.

                  • 6. Re: Help with scripts
                    bigtom

                    Containers or image maps could work. JS in WV is another way, but might be too much for the simple task.

                     

                    Do do you have a picture of what it might look like?this should be pretty easy. 

                    • 7. Re: Help with scripts
                      dbice

                      I definitely agree this is pretty complex for a beginner, but unfortunately it wasn’t my choice. I’ve attached a very rough example of what I’m doing. (The real one doesn't look quite as bad, I promise! But still pretty bad.) The participants will see all of the images at once. So for instance, if the question was “Which shapes have 4 sides?” they would receive a point for choosing Shape A and Shape C, and they would also receive a point for NOT choosing Shape B. So ideally, instead of checkboxes I would want buttons. I would need something to come up to show that the shape was selected, whether that be the button changing color or an X coming up…it doesn’t matter really. Another issue is that this would only be one of the questions on the assessment, and the participant may not get to it. If none of the shapes are selected, the participant is not penalized and nothing goes toward the total score. But if they do get to this question, then could receive points for a shape NOT being selected.

                       

                      And then would come the second part of the question. If there were two scores of 0 in a row, how could I make a notification for that?