3 Replies Latest reply on Jul 24, 2013 1:45 PM by appt

    Search using drop downs

    appt

      Title

      Search using drop downs

      Post

           Hi all,

           I am currently working on a database on the ipad for use at school. The database is running well but I now need to move into functionality and am struggling with the whole area of scripting finds.

           Here's what I need to do and would appreciate some ideas and guidance on.

           The database records the ethicity of students (Maori, NZ European, Pasifika, Other) and then also records lots of academic details, test results, reading age etc.

           What I want to be able to do is have a drop down menu to select an ethnic group then another drop down where I could for example select a reading age and then get a figure for the number of those students who are at or are above that level. I could also then use that infor to calculate the percentage compared to the whole group. 

           I undertstand the maths to do the calculations but am struggling with how to script 2 dropdown boxes and have them search and complete the calculation. No doubt it is easy but help would be appreciated thanks.

            

           Andy

        • 1. Re: Search using drop downs
          appt

               Just to explain further I can get a list of all the students of a particular ethnic group and can also include all of those at a specific level but I cannot get the code to work to look for equal to or more than the drop down value.

               the 2 drop downs are based on the Globals fields so I want to select say Pasifika in the first and say 5 in the second. The code below will list all pupils that meet those 2 criteria but what I need now is for it to list all of them at 5 or above.

               Enter Find Mode[ ]

               Set Field [Pupils::Ethnicity; Globals::SearchEth]

               Set Field [Mathematics::PATMathsT1NumberKnowledge; Globals::SearchNumber]

               New Record Request

               Perform Find []

               Go to Layout ["TestList" (Pupils)]

                

               I tried replacing the third line with 

               Set Field [Mathematics::PATMathsT1NumberKnowledge; Mathematics::PATMathsT1NumberKnowledge  ≥ Globals::SearchNumber]

               but that did not work so I cannot see how to do it.

               Any clues?

                

                

          • 2. Re: Search using drop downs
            philmodjunk

                 Set Field [Mathematics::PATMathsT1NumberKnowledge; "≥" & Globals::SearchNumber]

                 For more examples of scripted finds, See: Scripted Find Examples

            • 3. Re: Search using drop downs
              appt

                   Thanks so much Phil, 

                   awesome, worked perfectly.

                    

                   Andy