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

Going from Web login page to customer table

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

    Going from Web login page to customer table

    Hello,

    I assume this has been covered, but I was unable to find it searching.

    I've created the web based login and want the new user to move from the create login screen to a customer table to input additional field data. I assume Ulink will be involved, but not sure how to get there yet. I eventually want new users to go to different tables based on choosen group setting in the account type, but first things first.

    Could someone point me in the right direction?

    Thanks for your time,

    Bob

    #2
    Re: Going from Web login page to customer table

    Bob, if you do a search on ulink, you'll find a lot of info on it - as quite a few of us struggled with it. There is a tutorial by Paul K ("valleyboy1303") on this thread.

    What I do is put a redirect.a5w page under "redirect after login" in Security Settings. This page is xbasic only - no header, no html, just xbasic - that does some lookup in my user table and sets some session variables - and after the code is run, I have a few response.redirect() depending on conditional code on the page. Hope that helps point you in the right direction.
    It is easier to get older than wiser

    Comment


      #3
      Re: Going from Web login page to customer table

      Marius,

      Thank you. I found the Ulink tutorial you mentioned and Steve's rsponse on security with ulink. I've been reading through it all day and have not made the connection yet. I'll keep trying. Thanks.

      Bob

      Comment


        #4
        Re: Going from Web login page to customer table

        Marius,

        Could you post an example of the xbasic language you use for this purpose.
        Thanks

        Kevin Callanan

        Comment


          #5
          Re: Going from Web login page to customer table

          Yup. Here is my redirect.a5w page:
          Code:
          <%a5
          dim pUser as p 
          dim session.vUserCompany as c 
          dim session.vUserName as c
          dim session.vUserEmail as c
          dim session.vUserFullname as c
          dim session.vUserPhone as c
          dim tbl as P 
          dim qry as P 
          
          a5ws_logged_in_user_values(pUser,request,session) 
          
          if eval_valid("pUser.userid") = .T. then 
          session.vUserEmail = pUser.userID
          tbl = table.open("[PathAlias.adb_path]\webusers") 
          query.filter = "userID = "+quote(pUser.userid) 
          query.order = "" 
          qry = tbl.query_create()
           
          tbl.fetch_first() 'fetch first in filtered list - should be only one record
          
          while .not. tbl.fetch_eof() 
          session.vUserCompany = webusers->user_company
          session.vUserName = webusers->user_firstname
          session.vUserFullname = (webusers->user_firstname)+" "+(webusers->user_lastname)
          session.vUserPhone = webusers->user_phone
          tbl.fetch_next() 
          end while 
          tbl.close() 
          end if 
          
          if session.vUserCompany="PNGLC"
          response.redirect("activityP.a5w")
          else
          response.redirect("activity1.a5w")
          end if
          %>
          It's making a lookup on a table called webusers.dbf, and setting the value of a number of variables I need in other pages. I know some of these variables should be protected, but for some reason my code fails when I make them protected - so I left them like this for now.

          I use a variant of this code - without the response.redirect() - in a hewader.a5w that I include in each page - so if a user tries to access a page and is sent to the login page, the code will still run when he comes back to the page he was accessing.

          EDITED to say that in order to keep the page as an xbasic only page, you need to do the editing in the "Source" tab of the HTML Editor. If you open it in the WYSIWYG tab, Alpha will add a header and footer. If that happens, just go in the source and delete all the HTML - leave just the code between the <%a5 ....%> tags.
          Last edited by mariusm; 03-18-2008, 09:30 AM.
          It is easier to get older than wiser

          Comment


            #6
            Re: Going from Web login page to customer table

            Marius,

            Thanks for posting this information it really helped me and should help others too.

            Kevin Callanan

            Comment


              #7
              Re: Going from Web login page to customer table

              If you are using ULINK, then that code can be shortened to:

              Code:
              session.vUserCompany = alltrim(lookupc("F",alltrim(session.__protected__ulink),"user_company","[PathAlias.ADB_Path]\webusers","ID"))
              session.vUserName = alltrim(lookupc("F",alltrim(session.__protected__ulink),"user_firstname","[PathAlias.ADB_Path]\webusers","ID"))
              session.vUserFullname = alltrim(lookupc("F",alltrim(session.__protected__ulink),"user_firstname + " " user_lastname","[PathAlias.ADB_Path]\webusers","ID"))
              session.vUserPhone = alltrim(lookupc("F",alltrim(session.__protected__ulink),"user_phone","[PathAlias.ADB_Path]\webusers","ID"))
              Where the ulink session variable was set in Security Framework and the index of the ulink field is named ID.
              Steve Wood
              See my profile on IADN

              Comment


                #8
                Re: Going from Web login page to customer table

                I'm sure Steve's code is the proper way to do it; unfortunately I spent a huge amount of time trying to make that work on my applications, and I got nowhere. See the thread here: http://msgboard.alphasoftware.com/al...ighlight=ulink

                Eventually I had to give up using ulink and just use the code I posted here. I guess I'll have to try again if the documentation in v. 9 is any better or if tehre'll be some more explanations about ulink on this forum.
                It is easier to get older than wiser

                Comment


                  #9
                  Re: Going from Web login page to customer table

                  Code:
                  <%a5 session.vCompanyid = alltrim(lookupc("F",alltrim(session.__protected__ulink),"company","user","ulink")) %>
                  <%a5 session.vUsrid = alltrim(lookupc("F",alltrim(session.__protected__ulink),"usrid","user","ulink")) %>
                  <%a5 session.vNameid = alltrim(lookupc("F",alltrim(session.__protected__ulink),"fname + " " lname","user","ulink")) %>
                  I have been using the code noted above(with minor modification) to set my session variables. Now I have converted over from using alpha native tables to using SQL Express and these will not work anymore and return an error (which it should). Looking for some guidance on how to reference the SQL table in the expression instead of the Alpha table.
                  Last edited by tommyrotten; 12-23-2010, 02:52 AM. Reason: Posting to V10.5

                  Comment

                  Working...
                  X