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

Action Conditional Broken?

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

    Action Conditional Broken?

    Using v10.5 2972-3566.

    Created a procedure with 3 steps using action scripts. If the user presses the cancel button, I want it to cancel.

    Check the box to make the action conditional.
    Choose "execute action if condition expression is true"

    In the past, there was a variable there called varC->Result (or something like that)... and I entered an expression something like this ... varC->Result="OK".

    This variable no longer exists. Is this version of A5 broken?

    #2
    Re: Action Conditional Broken?

    Betty

    See Thumbnail

    When you select from the first dropdown on the condition at the bottom of AS editor, and you select Execute action if expression is true - in the next box you would then click on the xy and the end of the test box and insert in the expression builder
    Code:
     var->varC_result="OK"
    and then click okay at the bottom of the expression builder when you return to the AS editor it will have entered that in that box.

    Is this not happening in your version of 10.5?


    Tom

    Comment


      #3
      Re: Action Conditional Broken?

      Yes. That's how it is supposed to work. That's what I expect.

      This is what actually happens:
      "Invalid or incomplete expression"

      If I press <F6> to choose a variable in the expression builder, the variable "var->varC_result" does not exist.

      Comment


        #4
        Re: Action Conditional Broken?

        Betty

        Does the action script immediately preceeding the one we are discussing contain an xdialog box with ok and cancel. If that does not exist then there will be no VarC_result variable being dimmed.

        What are you using to give an Ok and Cancel Button prior to the action that is conditional on that button?

        Could you produce a thumbnail of the AS code editor showing all the AS actions.
        Tom

        Comment


          #5
          Re: Action Conditional Broken?

          It does. Attached is the first screenshot and here is the code:

          'Display a picklist of scripts for user to select from. Picklist shows selected scripts from the database.
          'Display a picklist of scripts. The list contains is specifed in the 'script_names' variable.
          script_names = <<%list%
          scpHNB2CSV|HNB5640 Checking||Huntington#no_space
          scpMB19992CSV|MB1999 Checking (Personal)||Macatawa#no_space
          scpMB48512CSV|MB4851 Checking||Macatawa#no_space
          scpMB53162CSV|MB5316 Overdraft||Macatawa#no_space
          scpPLC2CSV|HNB Personal Loan||Huntington#no_space
          scpUFC2CSV|United Federal CU Checking||United Federal CU#no_space
          %list%
          ui_select_script(script_names,"Select file to import",10,0,1)

          'Run a saved 'Import' operation: 'opBankImport'.
          query.filter = ".t."
          query.order = ""

          DIM operation_name as c
          operation_name = "opBankImport"
          If operation_name <> "" then
          import.run(operation_name)
          End if

          'Append transactions to the register that have not yet been appended
          query.filter = ""
          query.order = ""

          DIM operation_name as c
          operation_name = "opBank2Register"
          If operation_name <> "" then
          append.run(operation_name,query.filter)
          End if

          Comment


            #6
            Re: Action Conditional Broken?

            Betty, if you assign the selected script to a variable, won't the cancel button return an empty string to that variable? i.e.

            instead of
            Code:
            ui_select_script(script_names,"Select file to import",10,0,1)
            do
            Code:
            [COLOR="Red"]selected_script[/COLOR] = ui_select_script(script_names,"Select file to import",10,0,1)
            I think your later "actions" could then be conditioned on whether or not the selected_script variable is empty.

            Make sense?

            Comment


              #7
              Re: Action Conditional Broken?

              Betty

              I am a little confused by the action script code you have presented.

              First of all, you are using ui_script_select() with a list of scripts that you want run. Are these different scripts than what comes in the next action of action scriptin - running an import operation.

              What does the script that runs when you select one from the list do?

              The way action scripting codes ui_script_select is pretty generic - the way it is written no matter what you do - either by selecting a script from the list or pushing the cancel button, the next line of action scripting is going to run - since there is nothing in the way that it is written to trap say script_name=""

              What are you trying to do with selecting a script and then running import and append operations.

              I really cannot follow the logic.

              If you want you can covert the select script action scipting to inline xbasic and then you would have to insert some xbasic to create a variable to catch the script name selected as follows (code in red is what I added)

              Code:
              'Display a picklist of scripts for user to select from. Picklist shows selected scripts from the database.
              'Display a picklist of scripts. The list contains is specifed in the 'script_names' variable.
              
              [COLOR="Red"]dim sel_scr as c[/COLOR]
              script_names = <<%list%
              scpHNB2CSV|HNB5640 Checking||Huntington#no_space
              scpMB19992CSV|MB1999 Checking (Personal)||Macatawa#no_space
              scpMB48512CSV|MB4851 Checking||Macatawa#no_space
              scpMB53162CSV|MB5316 Overdraft||Macatawa#no_space
              scpPLC2CSV|HNB Personal Loan||Huntington#no_space
              scpUFC2CSV|United Federal CU Checking||United Federal CU#no_space
              %list%
              [COLOR="Red"]sel_scr=ui_select_script(script_names,"Select file to import",10,0,1)
              if sel_scr="" then
                  end
              end if
              [/color]
              I hope I have not confused you.

              Using ui_select_script() function will play the script that is selected as soon as you click the okay button and then continue to run the next line of AS.

              There is no varC_result variable produced.

              That is why my questions and the workaround that I show.

              Comment


                #8
                Re: Action Conditional Broken?

                These scripts are created BY action scripting - and therein lies my question - is alpha broken?

                Comment


                  #9
                  Re: Action Conditional Broken?

                  I will, however, when I get time - try the code that you've suggested.

                  Comment


                    #10
                    Re: Action Conditional Broken?

                    Betty

                    Action scripting is not broken - it is working the way it was set up to work.

                    Action scripting is very generic that is the reason behind in line xbasic being available in action scripting.

                    I have checked the action scripting for scripts - display a pick list of scripts. In the genie that helps you set this up - there is no way to add a variable as both Tom C and I have suggested - you would have to go the route of in-Line Xbasic to add that variable and then you can add the code I had suggested (since you were in xbasic anyway) or as Tom C suggested to use the conditional expression to test to see if the variable is empty and then end the action.

                    Tom Baker

                    Comment


                      #11
                      Re: Action Conditional Broken?

                      http://msgboard.alphasoftware.com/al...917#post544917

                      Comment


                        #12
                        Re: Action Conditional Broken?

                        Thanks Tom; yes - this (the other post) is exactly what I was trying to say.

                        Comment

                        Working...
                        X