Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Session variable and Show/Hide expression

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Session variable and Show/Hide expression

    I have this code in Show/Hide expression property on the client side to hide a button. Here is the code: costctr <> "session.__protected__ulink" .or. costctr <> "200515" this equates to True when I tested it on the Interactive and the button is hidden, but when I change the signon to another user who has a different costctr the button still hides.

    All I want to say is: if the session variable is costctr "200515" the button should show if not then the button should hide

    Should I be using costctr= session.__protected__ulink as part of the code?

    Anyway, US will beat England on Saturday in the World Cup soccer. :). Thats my prediction. Lets go USA.
    Thanks

  • #2
    Re: Session variable and Show/Hide expression

    Originally posted by kdankwah View Post
    All I want to say is: if the session variable is costctr "200515" the button should show if not then the button should hide
    Do you really only want it when costctr = "200515"? If so, just enter:

    costctr = "200515"

    and it will show when it is, and hide all other times.

    I was just searching this same topic and saw your post. My question is more general:

    Can session variables be used in the show/hide expression (or the enable expression)? If not, can they be assigned to another variable or field to make them visible there?
    Stephen Pilon
    Associate Librarian
    Christendom College

    Comment


    • #3
      Re: Session variable and Show/Hide expression

      StephenP. What you said does not work for me.

      Thanks

      Comment


      • #4
        Re: Session variable and Show/Hide expression

        Originally posted by kdankwah View Post
        I have this code in Show/Hide expression property on the client side to hide a button. Here is the code: costctr <> "session.__protected__ulink" .or. costctr <> "200515" this equates to True when I tested it on the Interactive and the button is hidden, but when I change the signon to another user who has a different costctr the button still hides.

        All I want to say is: if the session variable is costctr "200515" the button should show if not then the button should hide

        Should I be using costctr= session.__protected__ulink as part of the code?

        Anyway, US will beat England on Saturday in the World Cup soccer. :). Thats my prediction. Lets go USA.
        Thanks
        session variables (by definition) only exist on the server. they do not exist on the client (where only javascript variables can exist). therefore you cannot use session variable in a client side show/hide expression.

        Comment


        • #5
          Re: Session variable and Show/Hide expression

          Is there are server side equivalent for show/hide? I haven't been able to get anything to work reliably.
          Stephen Pilon
          Associate Librarian
          Christendom College

          Comment


          • #6
            Re: Session variable and Show/Hide expression

            While my earlier statement that session variables can't be used in a client-side show hide expression is correct, I have just added an ability to reference session variables in client-side expression. It will be in the first update for the recently released v10.5

            You can get a pre-release of this here:


            This file contains a pre-release of the updates to the aex file that will be in the next update.
            Exit from Alpha Five and unzip this file into your A5V10 program folder.
            You must also unzip it into the A5V10 Server folder if you are running the stand-alone App Server.
            http://downloads.alphasoftware.com/a...te/aex_v10.zip

            This file contains an update to the exe and dll files. Exit Alpha Five and unzip into your program folder.
            You must also unzip it into the A5V10 Server folder if you are running the stand-alone App Server.
            You can also unzip these files into your A5V10 Runtime folder.
            http://downloads.alphasoftware.com/a...dllexe_v10.zip


            Features
            Grid Component - Detail View - Client-Side Expressions - data.rowNumber - Client-side expressions (used in calculated fields, show/hide expressions, enable expressions, conditional style expressions, and conditional image expressions) that reference the special 'data.rowNumber' variable will now work correctly when the record is in enter mode. Previously the value of data.rowNumber was always set to 1. Now, it is set to 1 for an existing record and -1 for a new record. So, for example, the following enable expression for an field will allow a user to enter a new value in the field, but not edit an existing value:
            data.rowNumber = -1

            Client-Side Expressions - Session Variables - Client-side expressions are evaluated in the Browser using Javascript. They cannot reference session variables because session variables are server-side variables. Now, however, you can specify that certain session variables should be 'published' to the client. The 'published' session variables can then be referenced in your client side expressions. For example, the following show/hide expression will show a field is the session variable 'company' is equal to 'Alpha', otherwise the field will be hidden.
            SESSION.COMPANY = "Alpha"

            Notice that the session variable must be UPPER CASE!

            Grid Component - Grid Methods - .showGridColumn() Method - A new method has been added to the Grid object that allows you to dynamically show/hide columns in the Grid. The method takes two arguments: the name of the Grid column (which is the field name of the field shown in the column - with spaces in the field name replaced with underscores), and a flag which is true or false, depending on whether you want to show or hide the column.
            The following example hides the 'Address' column in the Grid. Notice that the grid column name must be UPPER CASE.
            {grid.object}.showGridColumn('ADDRESS',false);

            Comment


            • #7
              Re: Session variable and Show/Hide expression

              Excellent
              Cheers
              Mauricio

              Comment


              • #8
                Re: Session variable and Show/Hide expression

                Thank you, Selwyn, that is exactly what I needed!
                Stephen Pilon
                Associate Librarian
                Christendom College

                Comment


                • #9
                  Re: Session variable and Show/Hide expression

                  Another great feature would be to allow us to change the style of the disabled field.
                  Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

                  Comment


                  • #10
                    Re: Session variable and Show/Hide expression

                    Originally posted by frankbicknell View Post
                    Another great feature would be to allow us to change the style of the disabled field.
                    that's what the client side conditional style if for.

                    Comment


                    • #11
                      Re: Session variable and Show/Hide expression

                      Originally posted by Selwyn Rabins View Post
                      that's what the client side conditional style if for.
                      Thank you Selwyn for pointing that out. I will give it a try.
                      Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

                      Comment


                      • #12
                        Re: Session variable and Show/Hide expression

                        Selwyn, I have the logical condition working OK. The font size changes, bold works, but no matter what I put in the conditional style for color the font is still 'greyed out'.
                        Any ideas?

                        conditional style can be applied at the cell level, the control level, or both. you need to choose the correct level where you want your conditional style to apply.
                        Last edited by Selwyn Rabins; 06-12-2010, 01:35 PM.
                        Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

                        Comment


                        • #13
                          Re: Session variable and Show/Hide expression

                          Originally posted by frankbicknell View Post
                          conditional style can be applied at the cell level, the control level, or both. you need to choose the correct level where you want your conditional style to apply.
                          What I am trying to accomplish is that I would like the text color of a disabled textbox contol to be black not light grey.

                          I am sure I understand the different levels, however, when the control is disabled the text color is light grey no matter what the settings of the conditional style are. Is there another way to accomplish this or should I add this to the wish list?
                          Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

                          Comment


                          • #14
                            Re: Session variable and Show/Hide expression

                            Originally posted by frankbicknell View Post
                            What I am trying to accomplish is that I would like the text color of a disabled textbox contol to be black not light grey.

                            I am sure I understand the different levels, however, when the control is disabled the text color is light grey no matter what the settings of the conditional style are. Is there another way to accomplish this or should I add this to the wish list?
                            you have no control over the color of text in a disabled control. the browser sets it to be grey.

                            Comment


                            • #15
                              Re: Session variable and Show/Hide expression

                              Thank you, that seems like something the developer should be able to control. The disabled text is almost impossible to read in the bright sun.

                              Joy, I found that the settings work in FireFox.
                              Last edited by frankbicknell; 06-14-2010, 10:12 AM.
                              Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

                              Comment

                              Working...
                              X