5 Replies Latest reply on Feb 27, 2012 10:43 AM by philmodjunk

    Help with using conditional settings to lighting up buttons

    databasing

      Title

      Help with using conditional settings to lighting up buttons

      Post

      I would very much like to have a buttun light up if any of the sorted records holds a specific value within a specific field (text).  I am finding that I simply get a result based one individual record which happens to be at the top of the pile.  Any ideas how I can use a formula that considers all the results?

       

      Many Thanks for any help offered!

        • 1. Re: Help with using conditional settings to lighting up buttons
          philmodjunk

          What would that specific value be? Unless it is always the largest or smallest value of the found set when present, there's no way to tell that value is present in the found without using a script to loop through all the records checking each individual record until the value is found or the last record in the found set is reached.

          If this were a set of related records instead of a found set, we could use the list function to list all values from this field in set of related records. Then your conditional format can change a color or text style if the value is present in this list by using filter values--but that won't work from a found set.

          • 2. Re: Help with using conditional settings to lighting up buttons
            databasing

            Thank you for your quick reply,

            The values I am using are the names of the 6 Houses we use in school (Avon, Brook, Castle, etc), I have a field called 'Form' for this entry.

            I use a find script to select a given year group which uses the 'Cohort' field.

            I then have six buttons to constrain a find, so I can look at just one form (Avon, Brook, Castle, etc).

            I would like all buttons to light up when I look at the year group as a whole and only the relevant buttons when I constrain a set in some way (might be by teaching staff for example).

            At present I am only using one table and am not relating any part to anything.  (Although I have a separate database for my lesson planning and that is related to this table, so it can pull up lists of pupils in a given class, via a portal.)

            What would you recommend?

            • 3. Re: Help with using conditional settings to lighting up buttons
              philmodjunk

              Try this approach:

              If your buttons that constrain the found set perform scripts, you can add a step to the script that uses set variable to change the value of a global variable when they are clicked. The conditional formats can then check the values of such global variables to determine any specified change in format. Example: You put a button with a script to constain the records to just those from the "Avon" house. The script could include a step like this:

              Set Variable [$$House ; value: "Avon"]

              And any button whose appearance should change when the set is constrained to "Avon" can then check the value of $$House to do determine if such a change should take place.

              • 4. Re: Help with using conditional settings to lighting up buttons
                databasing

                Thank you,

                 

                I have created a script button, constraining a found set as suggested, and then used conditional to have a house/form light up.  Except I still have the form button light up that is at the top of the records if a whole year group is selected.  I would like it either not to light up if others of different forms are selected, or all of them light up!  I should say before I apply the form button, the cohort would have been found first and then the form button used to narrow the field.

                 

                I have tried to upload an image of what I did and wondered if you could further advise?

                 

                Many Thanks

                 

                • 5. Re: Help with using conditional settings to lighting up buttons
                  philmodjunk

                  Your conditional format is checking the value of a field instead of the variable the script set to "Avon".

                  It's conditonal format expression should be:

                  $$Form = "Avon"