11 Replies Latest reply on Aug 29, 2014 11:17 AM by art_l

    Issue with: Behaviour>Hide Objects When

    art_l

      Title

      Issue with: Behaviour>Hide Objects When

      Post

            Here is the situation:

           3 Radio Buttons under "SelectSchoolType"

           Standard      Public        Separate

           My code in the Inspector Behaviour box is:

           Location::SelectSchoolType= "XXX"

           XXX = either Public or Separate, if Public was selected, then XXX would equal "Speparte", for this example

           I have _$$Container1 and _$$Container2 that have "Check Marks" graphics in them. 

           I have two tables that populate with information that relates to either Public or Separate or BOTH, that populate a report.

           I need for the report to show the check mark above the table that relates to either PUBLIC or SEPARATE, only, when selected.

           If Standard is selected, no Check marks.

           I made "Container" a Global field with one value for all records to hold the check marks, that isn't working....

           Any assistance/guidance greatly appreciated. 

           Namely:

           1) Properly settting up _$$Container1 and 2 to hold the Check Mark graphic for all records

           2) What I am doing wrong with coding to get the Check Mark to show properly

            

      SampleChart.png

        • 1. Re: Issue with: Behaviour>Hide Objects When
          philmodjunk

               As long as you only permit single values to be selected in the radio button field (requires an auto-enter calculation to be sure of that), then this expression:

               Location::SelectSchoolType= "Standard" Or IsEmpty (Location::SelectSchoolType= "Separate" )

               Will hide the layout object if the value of SelectSchoolType is "Standard" or no value has yet been selected.

                

          • 2. Re: Issue with: Behaviour>Hide Objects When
            art_l

                  Yes, it did that as stated, thanks.

                 However, I still have the issue of Showing ONLY Public when Public is selected and the Same for Separate.

                  

                 Example:

                 Standard Selected: No Check Marks

                 Public Selected: Check Mark ONLY on Public

                 Separate Selected: Check Mark only on Separate

            • 3. Re: Issue with: Behaviour>Hide Objects When
              philmodjunk

                   You'll need to describe this part of your design in more detail:

                   

                        I have to tables that populate with information that relates to either Public or Separate or BOTH, that populate a report.

                   By "tables" do you mean portals? what tables (actual tables defined in Manage | Database) and relationships do you currently have for this part of your database?

              • 4. Re: Issue with: Behaviour>Hide Objects When
                art_l

                     Yes, and they function fine and are separate from this one function. 7 Tables in total.

                     They do not link to this function.  The Radio buttons determine when I need the check mark.  Does this help or do you wish to see more?

                      

                     Note, I am open to the possiblity of a better solution suggesion than this.

                • 5. Re: Issue with: Behaviour>Hide Objects When
                  philmodjunk

                       I'm not sure what you have in place here. Knowing the relationships involved would help.

                       As I understand it, the items listed under the check box icons should change depending on the value of the SelectSchoolType field. Is that correct or do you want the entire portal to appear and disappear based on the value of this field?

                  • 6. Re: Issue with: Behaviour>Hide Objects When
                    art_l

                          Phil,

                         You are correct, the portals appear and disappear as the Check Marks are supposed to.  The Radio Buttons also control this the reason being, there are reports run from this layout based on a sorted grouping.

                         That is why the Check Marks are linked to the 3 buttons.  Depending on the found group, they manipulate the tables to print.  On exit, it always defauts back to one setting.

                         So, here is what I have done (this is my 3rd time typing this cuz each time, the site timed out and it got errased!!)

                         I created a 3rd Container and duplicated it and put one NEXT TO each container with the check mark shown above!

                         Standard Code:

                         Location::SelectSchoolType=   "Public"  or  (Location::SelectSchoolType= "Separate" )

                          

                         Public Code

                         Location::SelectSchoolType= "Separate" or IsEmpty (Location::SelectSchoolType= "Public" ) or (Location::SelectSchoolType= "Standard" )

                          

                         Separate Code

                         (Location::SelectSchoolType= "Public" ) or Location::SelectSchoolType= "Standard"

                          

                         Good, bad or ugly, it works.  One small problem, when you have Public or Separate, you have 1 portal showing and 2 Check Marks.  Have to work on this.  There is no issue with the user because it does not cause confusion and this had to be done for yesterday.  After next week, I can fix this at my leisure.

                    • 7. Re: Issue with: Behaviour>Hide Objects When
                      art_l

                            1 = Standard

                           2 = Public

                           3 = Separate

                            

                           See above description

                      • 8. Re: Issue with: Behaviour>Hide Objects When
                        philmodjunk

                             What I cannot see in the last uploaded image is exactly what value you have in SelectSchoolType at the time you get the results shown. (and is this ther result you want or the incorrect result that you don't want?)

                             Due to a noxious forum bug, please protect yourself with a "Select-All, copy to your clipboard" action just before submitting a private message or comment to this forum. The bug can lose your comment and log you out of the forum--forcing you to sign back in and re-enter the comment or message. By copying to the clipboard before posting, you can re-enter your message by pasting from the clipboard instead of having to retype it all over again.

                             And the "time outs" for this seem totally random as to how long till you get kicked out and lose a comment. Had to paste this from the clipboard myself to get this submitted...

                        • 9. Re: Issue with: Behaviour>Hide Objects When
                          art_l

                                Thanks, starting to do that....

                               OK, maybe this is easier.......

                               Radio Buttons to Push:

                               Standard                 Public                  Separate

                                

                               If Standard, then these results should show:

                               A & D

                               If Public

                               B

                               If Separate

                               C

                               That is ideal and it would be 100%

                               What happens is, if you Press Public, B does correctly show but so does "D" check mark, not the Portal, in all cases, the Portals work fine.

                               If you press C, the "A" Check mark shows.

                               If I could get rid of D and A, it would be perfect.

                               Hope this makes it clearer....

                          • 10. Re: Issue with: Behaviour>Hide Objects When
                            art_l

                                  Phil,

                                 I just discovered what could be causing me all the grief.... incorrectly made these GLOBAL FIELDS!!  I changed this and we are testing. May have fixed it.

                            • 11. Re: Issue with: Behaviour>Hide Objects When
                              art_l

                                    Due to my having never tried the Behaviour>Hide Object When.... all of the above is incorrect and I scraped it and started again.

                                   The Correct way to do this is:

                                   Set up a Graphic Table ... in Table Occurances, we set up a relationship with the Table I was discussing above.

                                   I created 2 containers

                                   Defined them as follows:

                                   C1

                                   Case (CrossingLocation::SelectSchoolType = "Standard" or CrossingLocation::SelectSchoolType = "Public"; Test_Relation 2::CHECKMARK)

                                   C2

                                   Case (CrossingLocation::SelectSchoolType = "Standard" or CrossingLocation::SelectSchoolType = "Separate" ; Test_Relation 2::CHECKMARK)

                                   Calculation result set to Container for each of the above.... Works Seamlessly! 

                                    

                                   Thanks for your assistance, Phil, greatly appreciate it as always!