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

Previews with Session Variable

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

    Previews with Session Variable

    Hi All,

    I am sure there is an easy answer to this but I can't find it.

    My project uses session variables from a secure login which are used to filter the data used in the various controls .This means means the working and live previews do not work.

    What is the way around this?

    Thanks

    Chris

    #2
    Try this.
    Code:
    'TIP: To simulate session variables when running in Working Preview you can use this code:
    if eval_valid("request.SERVER_PROTOCOL") then
        if request.SERVER_PROTOCOL = "A5RES" then
            'running in working preview
            session.var1 = "simulated value for var1"
        end if
    end if
    ​
    Gregg
    https://paiza.io is a great site to test and share sql code

    Comment


      #3
      I think that method was deprecated. New method is...

      Code:
      if a5_isWorkingPreview() then
          'running in working preview
          session.var1 = "simulated value for var1"
      end if​
      Mike Brown - Contact Me
      Programmatic Technologies, LLC
      Programmatic-Technologies.com
      Independent Developer & Consultant​​

      Comment


        #4
        Quick screenshot for my method of testing:

        image.png

        If you want to use them for JavaScript functions, you'll need to publish them as follows:

        image.png

        ​​

        Comment


          #5
          Thank you Mike and Greg. Where do I actually place this code in the UX component. Would it also be in the onDialogueInitialize, as suggested in Russell's example?

          Comment


            #6
            Yes.
            If you look near the bottom, just above end function, you will see the tip we referred to.
            Gregg
            https://paiza.io is a great site to test and share sql code

            Comment


              #7
              I do the same thing as Russell can confirm for me it is the easiest method - also simple to comment out when not in use!
              NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

              Comment


                #8
                I agree with CharlesParker. You can't leave these in OnDialogInitialize when you publish to your server, but do leave them in the Published Session Variables.

                Also, be aware that if you use the comment out button at the top, sometimes it will jump up to the top and comment out the very top line.

                A commented out line looks like:

                ' session.employeeKey = 1

                And the text will turn blue when it's commented out.

                Comment


                  #9
                  sometimes it will jump up to the top and comment out the very top line.
                  interesting, havn't seen that yet but will keep it in the back of my mind as a possible issue! Thanks
                  NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

                  Comment


                    #10
                    Thank you very much for everyone's advice here. In the end I just assigned the session variables in OnDialogInitialize and commented them out manually when publishing. This has allowed me successfully me to develop an xbasic function to achieve what I needed.

                    If anyone is interested my first post on the forum was about looping down a list in JavaScript, which turned out not to be possible. It is the functionally that I discussed in that thread, that i have now achieved using xbasic.

                    Thank you again.

                    Chris
                    Last edited by FoodtestChris; 01-30-2024, 12:18 PM.

                    Comment


                      #11
                      Looping through a list not possible with javascript ?
                      I loop through things all the time with javascript.
                      Gregg
                      https://paiza.io is a great site to test and share sql code

                      Comment


                        #12
                        Hi Gregg,

                        You and I did discuss it in the other thread but it seemed not to be possible. I had a JavaScript double click action that worked when clicking each item in a list, but relied on the item in the list being 'selected' so that the details text boxes were populated. I wanted a way to automatically double click each item in the list.

                        Comment


                          #13
                          Are you getting those items double-clicked using xbasic ?
                          If not, we should be able to get the same results using javascript.
                          Gregg
                          https://paiza.io is a great site to test and share sql code

                          Comment


                            #14
                            Hi,
                            I use the following in On Dialog initialize xbasic:

                            if variable_exists("session.compid")
                            else
                            SESSION.COMPID="7"
                            SESSION.USERNAME = "kozahaya Diab"
                            end if​

                            I used before russel's method but it happened few times were I forgot to remove it before publishing, so users were switched to another company..
                            with this, if the session variable is initialized, it won't get re-assign it.

                            Comment

                            Working...
                            X