Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

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

filter web app HELP!!!!!!!!!!!

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

    filter web app HELP!!!!!!!!!!!

    I tried asking this other ways and not getting any help to resolve it so I am trying another way
    I want clients to login on the web and get filtered to there information only
    Is there a setting in the security to do the filtering or is it done by the component
    what would the variable be.

    #2
    Re: filter web app HELP!!!!!!!!!!!

    hi eric,

    i can help you here (its not often i can help others), the variable is set from the login using the ulink value in the web security set up. you would set the ulink value to a unique id field in your table

    then in the web component in the query tab, click 'define arguments' and create a 'session variable'.

    name - give it a name
    data type - character
    get argument value from - session variable
    variable - click elipsis, add variable, give it a name, and select type as 'session'

    you have now defined your argument, now you need to set your filter

    in the filter field enter

    'database_field_with_unique_id_value=(:your_session_variable_as_created_above)'

    when you user logs on and selects a page with this component in, only those records which meet the value you have filtered will show.

    i hope i have this right, im sure someone will help if not.

    Comment


      #3
      Re: filter web app HELP!!!!!!!!!!!

      Hi Eric:

      I'm certainly no expert at this, but I think my setup is similar to what you are asking about. I have a grid component for a table that has a Username field. I filter the table (and thus the grid) based on the userid at login.

      Here's how it works:

      At the very top of my login.a5w page I have this code...

      <%a5
      if eval_valid("submitbutton")
      if eval_valid("userid")
      dim session.__protected__userid as c
      session.__protected__userid = userid
      end if
      end if
      %>

      [This was based on a suggestion from another post. I'm unclear as to why it goes at the top or what it even does - doesn't make sense - but this is working for me.]

      Then in my grid component on the Query (DBF) screen, I have an Argument ("Define Argument" button) with the following settings:

      Name: varname (Whatever variable name you want to use)
      Data Type: Character
      Get argument value from: Get value from variable
      Variable: userid (Session Variable)

      For that last part, you need to go into another dialog box, add a new variable, give it the name "userid" and set "Scope" to "Session Variable".

      After you have created the Argument, go in to Filter box and enter the following:

      Username := varname

      "Username" is the name of the field in the table you want to filter. "varname" is the variable name you created in the first step. My understanding is that you must have the colon before the equal sign to indicate that varname is an argument and not any other type of variable.

      I think that's it. Hope this helps.

      Comment


        #4
        Re: filter web app HELP!!!!!!!!!!!

        hi eric, scott,

        you don't need to set the code at the top of each page (im not sure if there is an advantage to doing this) but i have no code in my pages as the sessions variable is set when the user logs in and doesn't need to be set again.

        the argument in your components filter the grids based upon the session variable.

        you just need to make sure your ulink value is set to the field in your table which will filter the records (this is in the web security settings, under 'customize options' > 'session variable for identifier field')

        Comment


          #5
          Re: filter web app HELP!!!!!!!!!!!

          hay thanks for the help I have been trying for days to get some where

          but I do a couple questions about it

          (define) - security settings
          I clicked the Enable external user identifier field to get the Session variable for indentifier field do I need to add name from the query tab
          "image attached"

          in the Define Arguments there was not a option for get argument value from "session variable"
          "image attached"

          last question in the filter I tried to plug in database_field_with_unique_id_value="client"
          "image attached"

          thanks

          Comment


            #6
            Re: filter web app HELP!!!!!!!!!!!

            Eric - Scott and Richard are describing two methods to place some ID -- representing the logged in user -- into a variable for filtering records. Scott's solution places the Username into that variable, the value the user enters as their username when they log in. This is a common solution because it is easy to envision using that username as a field in the table you want to filter.

            Richards solution uses the "ulink" value from Security Framework. That takes some reading up on Security Framework before you start. This is a more rigerous solution since Security Framework ENSURES that value will be present in the session variable as long as that person is logged in (not true with the previous solution). Another advantage is that this ulink value is arbitrary and unique; it still represents the user even if they change their Username. But it can take more work to establish this ulink value IF you want to do it dynamically from your website. But if you are creating all of your users yourself, you can create any value for the ulink, as long as it is unique.

            Scott - the code doesn't have to go at the top, but being there ensures it will fire when the Submit button is pressed. The reason it works is that the login dialog has a field named userid where the user types their login value. It just sets it to that session variable IF the submit button is pressed (and not before).
            Steve Wood
            See my profile on IADN

            Comment


              #7
              Re: filter web app HELP!!!!!!!!!!!

              eric,

              images 2 and 3 you have right, the first, you need to change the name to the field in your table which will uniquely identify the record you want to filter to,

              for example mine is a field in my table called 'caseref' which is an autoincrement field and i also called my session variable caseref

              so my filter is

              Code:
              caseref=(:caseref)
              hope this makes sense

              Comment


                #8
                Re: filter web app HELP!!!!!!!!!!!

                ps - took me some time to understand and get right and thanks to steve for all his help with this.

                Comment


                  #9
                  Re: filter web app HELP!!!!!!!!!!!

                  If you accept my advice, all three images show improper methods.

                  Image 3: the variable should be named __protected__ulink. The word "ulink" is optional, you can call it client if you want to, but the __protected__ part is MANDATORY. (That's double-underscore "protected" double-underscore. Without going in to details let me say I can hack your security if you use a non-protected variable here. "Ulink" is a good choice for the suffix because that's what this value is. It's not a clientID or anything else related to the users role, it's the unique identifier for the logged in user, which could be a client, or could be YOU.

                  Image 2: Then entry would be __protected__ulink.

                  Image 1: Per above, the entry would be database_field_with_unique_id_value=:ulink assuming you named the argument "ulink".

                  Also, your database_field... variable name is too long, especially if that is your common practice. There are places within Alpha where a variable name will be truncated. I'm thinking of Component Names which truncate to 15 in the A5W page, but it is safer to keep all variable names shorter.
                  Steve Wood
                  See my profile on IADN

                  Comment


                    #10
                    Re: filter web app HELP!!!!!!!!!!!

                    Also, your database_field... variable name is too long, especially if that is your common practice. There are places within Alpha where a variable name will be truncated. I'm thinking of Component Names which truncate to 15 in the A5W page, but it is safer to keep all variable names shorter.
                    sorry, this is what i meant by image 1 being incorrect. the field name was just copied from my first post above.

                    Comment


                      #11
                      Re: filter web app HELP!!!!!!!!!!!

                      i hadnt used protected in mine, i should adopt this method.

                      this is why i thought they were ok.

                      Comment


                        #12
                        Re: filter web app HELP!!!!!!!!!!!

                        hay richard

                        thanks for the help and being unstanding
                        but I still not getting it
                        I took the name from my table
                        (see image table.jpg)

                        I changed the filter setting
                        (see image filter_field.jpg)

                        security settings
                        (see image security.jpg)

                        it is allowing me to login but it is pulling 1 job that does not even connect to the client id

                        could it be my login I have the clint attached to a group and using the Abreviato (client id) for the group id

                        example:
                        group "ABC" the abc is the Abreviato or client id
                        Client "[email protected]"

                        once thanks for the help

                        Comment


                          #13
                          Re: filter web app HELP!!!!!!!!!!!

                          Like I said in my first post, you need to study Security Framework in the Help documentation to get this. You are mixing Group ID with Ulink, at a minimum. Also, please read my last post with very important advice on this.
                          Steve Wood
                          See my profile on IADN

                          Comment


                            #14
                            Re: filter web app HELP!!!!!!!!!!!

                            eric,

                            apart from steves advice, which you should follow, you have exactly what i use so far.

                            you may not have completed the final step which is taken when you add the users, if you are importing them from a table, then you need to choose values in the web security table against those in your table

                            for example, username, password, email address and ulink

                            you need to set the ulink field to get the value from your abreviato field in your table.

                            if you are adding the users one at a time then you need to set the value of your 'abreviato' field in the field 'external user id'.

                            im not sure how you have added users so far, go to web security > users and groups, and then either 'import' or 'add user'


                            i hope this helps, but if not just let me know.

                            Comment


                              #15
                              Re: filter web app HELP!!!!!!!!!!!

                              Richard

                              I set up users in the web security using add user then I named the group the same name that is located in the table under the aberviato.

                              Users :user1
                              Groups :abc

                              then I assigned the user to a group

                              I am just little confused for the fact how does it connect to the group
                              how does it know to look in the abervito line for "abc" matching the groups name

                              I did more reading last night I just dont see were the connection is that will complete it so thanks for the help



                              eric

                              Comment

                              Working...
                              X