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

Passing Session Variables From Dialog to Dialog

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

    Passing Session Variables From Dialog to Dialog

    Why doesn't this work?

    Dialog1 creates session.regnum

    Dialog2 has as an Argument: vUser = session.regum
    onDialogInitialize has Populate from variable :vUser

    Error: Populate Dialog from Tables Action did not run because of an error.
    Variable for Primary Key values not found. Variable name: :vUser
    Rapid Development, Training, Support
    http://data2web.network
    903-740-2549

    #2
    Re: Passing Session Variables From Dialog to Dialog

    If you are creating a session variable in dialog 1 couldn't you just populate directly from it or have -id = session.regum- in your onDialogInitialize event?

    With arguments I've found that you must create the argument in dialog 2 first, save it, then go to dialog 1 and make the button event that loads the second dialog.

    In any case, I have a dialog setup similar to your example so I'll look at when I get to my dev computer and see if I can help you out.

    A screenshot of your onDialogInitialize event and a screenshot of what shows up when you edit the action script in dialog 2 would probably help as well.

    Comment


      #3
      Re: Passing Session Variables From Dialog to Dialog

      Thank you Jinx for your reply. Here are the screenies...

      logincode.gifdialog2populate.gifdialog2error.gif
      Rapid Development, Training, Support
      http://data2web.network
      903-740-2549

      Comment


        #4
        Re: Passing Session Variables From Dialog to Dialog

        Before your ExecuteServerSide action, do this:
        dim regnum as C = ''
        if len(session.regnum)>0 then
        regnum = session.regnum
        end if

        Then use the local regnum var as your primary key.

        Also note that you are calling sql_lookup twice when you only need to call it once (set session.regnum = pass instead of the second call)

        Comment


          #5
          Re: Passing Session Variables From Dialog to Dialog

          Thank you Andy.
          I tried that and this is what I now get:

          Error executing onDialogExecute event: Error executing event 'onDialogInitialize ': command: if len(session.regnum)>0 then Property not found session.regnum subelement not found

          It appears that the session variable is not being set when it should be?
          Rapid Development, Training, Support
          http://data2web.network
          903-740-2549

          Comment


            #6
            Re: Passing Session Variables From Dialog to Dialog

            Correct. You have the session variable set within an if statement... place a debug(1) before the IF and see what is happening in there...

            Comment


              #7
              Re: Passing Session Variables From Dialog to Dialog

              Andy, I think I need to call sql_lookup twice as Populate expects a Primary Key and password is not a key at all.
              Not all records have a password so I can't use it as a key.
              Rapid Development, Training, Support
              http://data2web.network
              903-740-2549

              Comment


                #8
                Re: Passing Session Variables From Dialog to Dialog

                Oh sorry, didn't see that when I glanced at it.

                Comment


                  #9
                  Re: Passing Session Variables From Dialog to Dialog

                  How do I set a session variable if I am not doing it correctly?
                  Rapid Development, Training, Support
                  http://data2web.network
                  903-740-2549

                  Comment


                    #10
                    Re: Passing Session Variables From Dialog to Dialog

                    Maybe a silly question (and please take no offense to it) but are you testing this live or trying to test it in working preview because the session variables won't work in that case.

                    Also, I assume your Xbasic is executed in dialog 1? And you want to transfer that number to dialog 2 right? If the value you are trying to transfer to dialog 2 is availlable within dialog 1's fields, there is an easier way to do this.

                    Comment


                      #11
                      Re: Passing Session Variables From Dialog to Dialog

                      Dialog 1 is a basic login that clients use to revisit a prior submission. The login authenticates and then returns the ID (reg_number) for the Dialog 2 populate event. I don't want to use page variables as they are a security risk unless I can find a way to encrypt them (HASH?).
                      Rapid Development, Training, Support
                      http://data2web.network
                      903-740-2549

                      Comment


                        #12
                        Re: Passing Session Variables From Dialog to Dialog

                        Michael, I implied earlier that you should dim your session var outside of the IF statement so it at least exists even if the IF statement is false.
                        Did you ever run the debug statement?.

                        Comment


                          #13
                          Re: Passing Session Variables From Dialog to Dialog

                          I placed the Dim within the scope of the IF statement because if the login fails then it is moot, and therefor not needed.

                          Debug shows Dialog 1 working as expected.

                          Re: If the value you are trying to transfer to dialog 2 is availlable within dialog 1's fields, there is an easier way to do this.

                          Jinx, I'm curious, what is your idea?
                          Rapid Development, Training, Support
                          http://data2web.network
                          903-740-2549

                          Comment


                            #14
                            Re: Passing Session Variables From Dialog to Dialog

                            Are arguments secure? I didn't know what you were doing. If arguments would work see this thread near the bottom.

                            http://msgboard.alphasoftware.com/al...gs-One-to-Many

                            I'm on my phone so even searching that up was a trip. I hope you appreciate it... haha.

                            Comment


                              #15
                              Re: Passing Session Variables From Dialog to Dialog

                              You're the best, Jinx :D
                              Rapid Development, Training, Support
                              http://data2web.network
                              903-740-2549

                              Comment

                              Working...
                              X