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

session variable

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

    session variable

    Hi from a previous post.

    i am setting a session variable in xBasic that runs on the click event of a button on a grid

    function QuoteNumber as c (e as p)
    session.Qno1 = e._currentRowDataNew.QuoteNo
    'debug(1)
    end function

    after running this i have a dialog open action. the Qno1 variable has a value which i can see in the debug

    in the onititialize of the dialog i have

    ExecuteServerSideAction("Populate Dialog from Tables::Populate_a_Dialog_with_quote")

    this is set to readfromvariable "Qno1"

    however the debug on this shows that is can not find the variable.

    however if i open the dialog from the file iteself it will load with the correct information as set from the click button on the grid.

    I am not sure how to resolve this, clearly the variable has a value which can be used but not when i click the button on the grid.

    What am i missing here?

    Thank you

    Mark

    #2
    Re: session variable

    this is set to readfromvariable "Qno1"
    Shouldn't this be "session.Qno1" if you're using a session variable? If you just have "Qno1" in the settings it will be looking for a page variable, not a session variable.
    Jim Coltz
    Alpha Custom Database Solutions, LLC
    A5CustomSolutions.com
    [email protected]

    Comment


      #3
      Re: session variable

      session variable.jpg

      I have attached a screen shot of the debug window on the called dialog.

      I had every hope that your suggestion would work, thank you very much.

      I have the primary ket set on the data tabe to QuoteNo. Forgive me but this is a new venture for me and understanding why i do not get a result is hard

      Thank you for your help.

      Mark

      Comment


        #4
        Re: session variable

        Mark,

        What do you have in the dialog's ExecuteServerSideAction("Populate Dialog from Tables::Populate_a_Dialog_with_quote") settings? You have "Primary key source" = "ReadfromVariable", that is correct. What do have in the "Variable that contains the primary key" property? This should be "session.Qno1" (no quotes).
        Jim Coltz
        Alpha Custom Database Solutions, LLC
        A5CustomSolutions.com
        [email protected]

        Comment


          #5
          Re: session variable

          session variable 2.jpg

          Hi

          this is the action screen for ExecuteServerSideAction("Populate Dialog from Tables::Populate_a_Dialog_with_quote")

          the quotataions are created by the application which i can not edit but i can see your logic do you think it is a bug? is there another way to do this?

          Many thanks

          Mark

          Comment


            #6
            Re: session variable

            That looks correct. What error message(s) do you get?
            Jim Coltz
            Alpha Custom Database Solutions, LLC
            A5CustomSolutions.com
            [email protected]

            Comment


              #7
              Re: session variable

              Error_message.jpg

              The screen opens with this error message when using the button on the grid.

              however if i open the dialog in working preview directly from the file
              working preview 2.jpg

              its a bit bewildering, it looks like the variable has content and the primary key field is set correctly

              Thank you for your help I hope this answers your last question

              Mark

              Comment


                #8
                Re: session variable

                The error message it letting you know the session.qno1 variable does exist, and that A5 did try to find the record whose primary key is in the session variable. If it didn't you would get a different error. So, the problem must be that the session variable contains a value that does not exist in the table.

                In your dialog's onDialogInitialize server side event add this code, right at the top. It will alert out the value of the session variable. That may give you a clue.

                Code:
                e.javascript = "alert(' " +session.qno1 + " ');"
                Jim Coltz
                Alpha Custom Database Solutions, LLC
                A5CustomSolutions.com
                [email protected]

                Comment


                  #9
                  Re: session variable

                  Hi Jim

                  I really apreciate your help, i have learnt alot. I have done as you say and include 2 screen shots
                  message alert.jpg
                  Table Data.jpg
                  I still get the no data problem, i have shown the data table in the attachment. The data source is an access query maybe I should use the main table in the query as the next test

                  Thank you

                  Mark

                  Comment


                    #10
                    Re: session variable

                    Mark,
                    In the dialog's ExecuteServerSideAction("Populate Dialog from Tables::Populate_a_Dialog_with_quote") I see you have the show debugging info box checked. Examine the SQL statement that is being sent (click the link for server side commands). Compare that SQL to what you know works and look for the difference.
                    Jim Coltz
                    Alpha Custom Database Solutions, LLC
                    A5CustomSolutions.com
                    [email protected]

                    Comment


                      #11
                      Re: session variable

                      Hi Jim

                      All i get is message not found, how would i get the sql generated that would be useful.

                      Today I have changed to dialog to a data source on the native Access table and tried using the primary key field instead of the quote number. It made no difference

                      Having learnt how to populate a session variable has been useful but getting this dialog to work is quite frustrating now

                      Thank you

                      Mark

                      Comment


                        #12
                        Re: session variable

                        Unfortunately, this is one of those cases where A5 isn't very helpful. The action script will show the server side select statement, but only if it succeeds. If it fails you just get that message saying the "record is not found".
                        Jim Coltz
                        Alpha Custom Database Solutions, LLC
                        A5CustomSolutions.com
                        [email protected]

                        Comment


                          #13
                          Re: session variable

                          Hi Jim

                          Success at last, I was using the wrong open action, I should have been using 'Open a dialog component' and not one of the edit ones. Thank you for your help, i will need this knowledge I have learned lots more.

                          Its such a new environment for me, and its taking lots of effort to master, I wont forget this one!

                          kind Regards

                          Mark

                          Comment


                            #14
                            Re: session variable

                            Excellent. I'm happy to hear you got it sorted out.
                            Jim Coltz
                            Alpha Custom Database Solutions, LLC
                            A5CustomSolutions.com
                            [email protected]

                            Comment

                            Working...
                            X