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

Variables straddling multiple simultaneous applications

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

  • Variables straddling multiple simultaneous applications

    Good Afternoon All...

    Here's the dilema of the day:

    Background:

    I have two Alpha applications: Application A and Application B. Application A is built in version 11, while application B is built in V12.

    User logs on to application A and is redirected to a tabbed ui. The home page in the tabbed ui is an external page from application B (the security framework in application B is enabled, but this page can be viewed by anyone). The home page is an a5w page containing one dialog UX component (let's call that Dialog X)

    Problem:

    When the user logs in to Application A, I need the user id to be recorded in a text box in Dialog X. This is a n0-brainer within the SAME application, but how do you go about this when its a separate application? Is that even possible? I am well versed in session variables, but not global or page variables.

    Any help would be enormously appreciated!

    Thanks,
    Scott

  • #2
    Re: Variables straddling multiple simultaneous applications

    You fo ise a page var, which is just a parameter in the url like mypage.a5w?id=123
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

    Comment


    • #3
      Re: Variables straddling multiple simultaneous applications

      Originally posted by Steve Wood View Post
      You fo ise
      Thanks, Steve. Not sure I understand the first part of your sentence, but I think I see where you're going.

      I actually was partially successful with this by creating a cookie from the user id. My dilema now is how to place the user id cookie in a text box in dialog X. This seems like the easy part, but not quite there. Here's what I have:

      dim cookieone as c
      'finds the cookie
      if variable_exists("request.Variables._My_cookie")
      cookieone = request.Variables._My_cookie
      'populates the dialog
      e.control.userid=cookieone
      end if
      Last edited by Scott B; 01-31-2015, 12:50 AM. Reason: typo

      Comment


      • #4
        Re: Variables straddling multiple simultaneous applications

        Update: I just tried creating an argument in the UX for the cookie. I then set the default value for the textbox to the argument (i.e. =:cookie). Still nothing.

        Any ideas?

        Comment


        • #5
          Re: Variables straddling multiple simultaneous applications

          parameter in url.
          Steve Wood
          Join the ALPHA DEVELOPERS NETWORK
          There is no Cloud. It's just someone else's computer.
          Web - Mobile - Hosting - Products - Frameworks - Developer Resources
          AlphaToGo | IADN (100% Alpha Anywhere Websites)

          Comment


          • #6
            Re: Variables straddling multiple simultaneous applications

            Thanks, Steve. I haven't used page variables in the past. Can you point me to a good reference?

            Comment


            • #7
              Re: Variables straddling multiple simultaneous applications

              Before that, this is a separate app at a different domain and web server right? Cookies are domain specific (website specific). If that were not the case, cookies that were set by my website, if you visited it, would be available variables on your site.

              Url parameter are just page variables. If you have mypage.a5w?id=123, then you can expect the var "id" to be available on that page or in any component on that page. In components you generally convert page vars to arguments.
              Steve Wood
              Join the ALPHA DEVELOPERS NETWORK
              There is no Cloud. It's just someone else's computer.
              Web - Mobile - Hosting - Products - Frameworks - Developer Resources
              AlphaToGo | IADN (100% Alpha Anywhere Websites)

              Comment


              • #8
                Re: Variables straddling multiple simultaneous applications

                Hi Steve,

                Is there a way to use that approach and encrypt the value?
                Gary S. Traub, Ph.D.

                Comment


                • #9
                  Re: Variables straddling multiple simultaneous applications

                  Thanks, Steve. Yes, a different domain and web server. That makes complete sense. So, I'm abandoning the cookie approach... how do you create a page variable?

                  Comment


                  • #10
                    Re: Variables straddling multiple simultaneous applications

                    I'm almost there - I can feel it! Steve, thanks to an old post of yours, I now have my textbox populating with a static value, based on the page variable. What I'm still lost on is the syntax to make this dynamic (in my case, based on username):

                    <iframe src="http://mywebsite.com/page1.a5w?test=a5ws_getCurrentuser()"width="2000 px" height="1000 px"></iframe>

                    In this case, I want to populate the text box with the current username.

                    Again, thank you!!

                    Comment


                    • #11
                      Re: Variables straddling multiple simultaneous applications

                      Been busy on the weekend -- so if you want to pass the currently logged in user's userid, then determine it first in the calling program. Like:

                      <%a5
                      dim myuser as c = a5ws_getCurrentuser()
                      dim url as c = "<IFrame>http://mywebsite.com/page1.a5w?test="+myuser + "width=\"2000 px\" height=\"1000 px\"</IFrame>"
                      ?url
                      %>

                      That will build and fire the URL to the IFrame.

                      But you cannot safely put the userid in a url, it is a security risk (or I should say it is most often a security risk, your situation might be different). You need to either encrypt that value, or have some ID that is known in both applications to represent that user. Like if "123" meant "[email protected]" on both sides, you would use "123". But assuming the two programs are independent, and you still need the Userid to be passed, then encrypt it like this, (where "salt" is some value known only to you):

                      dim myuser as c = a5ws_getCurrentuser()
                      dim myuser as c = urlencode(encrypt_string(x),"salt")

                      And then on the other side, take that page variable, "test" in your case above, and decrypt:

                      test = decrypt_string(urldecode(test),"salt")
                      or
                      test = decrypt_string(urldecode(page.variables.test),"salt")

                      Now you have a variable named "test" that contains the userid from the calling program.
                      Steve Wood
                      Join the ALPHA DEVELOPERS NETWORK
                      There is no Cloud. It's just someone else's computer.
                      Web - Mobile - Hosting - Products - Frameworks - Developer Resources
                      AlphaToGo | IADN (100% Alpha Anywhere Websites)

                      Comment


                      • #12
                        Re: Variables straddling multiple simultaneous applications

                        Thanks so much, Steve. Fortunately (or unfortunately), the -5 windchill kept me in-doors most of the weekend...

                        Your code makes complete sense and seems as though it should work. Unfortunately, when I open the page in the tabbed ui, I'm just getting a small iframe with nothing in it. As you probably have assumed, I'm placing the code as a xbasic block in an A5W page in the calling application.

                        Thanks again for all your help with this -
                        Attached Files

                        Comment


                        • #13
                          Re: Variables straddling multiple simultaneous applications

                          the -5 windchill kept me in-doors most of the weekend...
                          Yeah, same here.

                          I will try it later today. I have not opened an IFrame directly in a TabbedUI before with passed parameters.
                          Steve Wood
                          Join the ALPHA DEVELOPERS NETWORK
                          There is no Cloud. It's just someone else's computer.
                          Web - Mobile - Hosting - Products - Frameworks - Developer Resources
                          AlphaToGo | IADN (100% Alpha Anywhere Websites)

                          Comment


                          • #14
                            Re: Variables straddling multiple simultaneous applications

                            Originally posted by Scott B View Post
                            the -5 windchill kept me in-doors most of the weekend...
                            That's what we call a warming trend..... or sometimes a heat wave.
                            Last edited by Al Buchholz; 02-02-2015, 03:11 PM.
                            Al Buchholz
                            Bookwood Systems, LTD
                            Weekly QReportBuilder Webinars Thursday 1 pm CST

                            Occam's Razor - KISS
                            Normalize till it hurts - De-normalize till it works.
                            Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                            When we triage a problem it is much easier to read sample systems than to read a mind.
                            "Make it as simple as possible, but not simpler."
                            Albert Einstein

                            http://www.iadn.com/images/media/iadn_member.png

                            Comment


                            • #15
                              Re: Variables straddling multiple simultaneous applications

                              You do not need to urldecode() and shouldn't on the server the server decodes the request variable. If you urldecode() a long request variable it will error.

                              Comment

                              Working...
                              X