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

Is this a bug

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

    Is this a bug

    I have this script on a button That asks the user which account to filter, I set this up under aoperation-query records:

    Account is equal to =var->AskC_Enter_an_Account

    I run this on the active link table it always returns NO RECODS In Query
    I run it on a passive link table (same database -same records) it returns all records .

    I tested that on few different databases, always same result.
    No records on activelink table, some records on passive link table.

    #2
    Re: Is this a bug

    Did anyone try this ? any one experiencing the same issue ?

    Comment


      #3
      Re: Is this a bug

      Originally posted by Anis View Post
      I have this script on a button That asks the user which account to filter, I set this up under aoperation-query records:

      Account is equal to =var->AskC_Enter_an_Account

      I run this on the active link table it always returns NO RECODS In Query
      I run it on a passive link table (same database -same records) it returns all records .

      I tested that on few different databases, always same result.
      No records on activelink table, some records on passive link table.
      There is not enough information in your question to give an answer.

      I need to know in more detail about what you are doing.

      Comment


        #4
        Re: Is this a bug

        Selwyn;


        I have an activelink table and created a form to display the fields from that table. I wanted to add a button for the user to select and account, the script is created thru the Genie to create a query records operation.
        It asks the user to enter the account number.

        The same query is run against the passive link table of the same database, it returns records.
        The only special thing I'm doing with the active link is thru the Select statement I'm grouping records by certain criteria, if that makes a difference.
        Like total qty for that account.

        In the screen shots attached, you see the account number actually displayed and exists, I just picked this one to show that it's there in the database, but no matter what account I used it returns no records.

        Comment


          #5
          Re: Is this a bug

          Originally posted by Anis View Post
          Selwyn;


          I have an activelink table and created a form to display the fields from that table. I wanted to add a button for the user to select and account, the script is created thru the Genie to create a query records operation.
          It asks the user to enter the account number.

          The same query is run against the passive link table of the same database, it returns records.
          The only special thing I'm doing with the active link is thru the Select statement I'm grouping records by certain criteria, if that makes a difference.
          Like total qty for that account.
          May I ask why you are grouping results in an active link table? The main purpose of those os being able to update records, wheras grouped records are more for reporting than anything else.

          There may well be a bug on this since the same query works with passive link tables, but it sounds to me like you just keep trying to use active link tables for purposes they just were not designed for.

          Comment


            #6
            Re: Is this a bug

            You could be right, but I'm using the active link table to group because I can't group the records in alpha5, the performance of this in A5 is very slow (I mean if I group an active link table records in A5) and I can't use passive link because I have to update the records all day.

            The active link table is working fine with the grouping and refreshing and the data is coming in all day with speed and reflect on the form almost instantly.

            Comment


              #7
              Re: Is this a bug

              Originally posted by Anis View Post
              Selwyn;


              I have an activelink table and created a form to display the fields from that table. I wanted to add a button for the user to select and account, the script is created thru the Genie to create a query records operation.
              It asks the user to enter the account number.

              The same query is run against the passive link table of the same database, it returns records.
              The only special thing I'm doing with the active link is thru the Select statement I'm grouping records by certain criteria, if that makes a difference.
              Like total qty for that account.

              In the screen shots attached, you see the account number actually displayed and exists, I just picked this one to show that it's there in the database, but no matter what account I used it returns no records.

              1. Please reply showing the xbasic code that is getting executed when you press the button. If the button's action was created using action scripting, you can open the action scripting editor, right click on an action and select 'show xbasic', then go to the all actions tab, and copy the xbasic.

              2. Your embedded browse already has focus on the row showing the ID value. So, you don't really need to prompt for it again. You can simply read the value from the current row in the embedded browse.

              Comment


                #8
                Re: Is this a bug

                1-Button script:

                query.filter = ""
                query.order = ""

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


                operation script:
                dim filter as c
                dim order as c
                dim options as c
                dim description as c
                dim show_all_flag as L
                dim layout_name as c
                dim layout_type as c
                filter = "Pty_accnt = var->AskC_Enter_an_Account"
                order = "recno()"
                options = ""
                description = "Saved Query: account"
                show_all_flag = .f. 'user cannot turn off the query
                layout_type = "browse" 'to open a form, set this to "form"
                layout_name = "" 'This will open the default layout. You can also specify a named layout here
                dim args as sql::arguments
                if eval_valid("arguments") then
                if typeof(arguments) = "P" then
                args = arguments
                end if
                end if
                a5_open_layout(layout_type,layout_name,"transactions",filter,order,description,options,show_all_flag,args)



                2- I agree the reason I showed the same record just to show it exists, I added the browse just for me temporarily. I also have more than 3000 accounts it's not practical to go down searching for specific one and having a button to filter to that account is much simpler and faster.

                Thanks

                Comment


                  #9
                  Re: Is this a bug

                  Originally posted by Anis View Post
                  You could be right, but I'm using the active link table to group because I can't group the records in alpha5, the performance of this in A5 is very slow (I mean if I group an active link table records in A5) and I can't use passive link because I have to update the records all day.

                  The active link table is working fine with the grouping and refreshing and the data is coming in all day with speed and reflect on the form almost instantly.
                  I guess I am just not sure why you are running the queries on an active link table - surely a passive link table or even an SQL report would be more useful than active link tables which are designed for updating data and are constantly having to refresh etc. to keep the data current? I could imagine that for data entry an active link table that filters the results is more efficient than having to pull ALL entries out of the database just because you need those for reports?

                  Comment


                    #10
                    Re: Is this a bug

                    Selwyn;

                    Have you had a chance to look at this ? this is still a problem when you run the script, it finds no records if you run this query by asking the user for an account number and run it against the active link table.

                    Thanks

                    Comment


                      #11
                      Re: Is this a bug

                      Originally posted by Anis View Post
                      1-Button script:

                      query.filter = ""
                      query.order = ""

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


                      operation script:
                      dim filter as c
                      dim order as c
                      dim options as c
                      dim description as c
                      dim show_all_flag as L
                      dim layout_name as c
                      dim layout_type as c
                      filter = "Pty_accnt = var->AskC_Enter_an_Account"
                      order = "recno()"
                      options = ""
                      description = "Saved Query: account"
                      show_all_flag = .f. 'user cannot turn off the query
                      layout_type = "browse" 'to open a form, set this to "form"
                      layout_name = "" 'This will open the default layout. You can also specify a named layout here
                      dim args as sql::arguments
                      if eval_valid("arguments") then
                      if typeof(arguments) = "P" then
                      args = arguments
                      end if
                      end if
                      a5_open_layout(layout_type,layout_name,"transactions",filter,order,description,options,show_all_flag,args)



                      2- I agree the reason I showed the same record just to show it exists, I added the browse just for me temporarily. I also have more than 3000 accounts it's not practical to go down searching for specific one and having a button to filter to that account is much simpler and faster.

                      Thanks


                      (It is not clear to me if your active link table uses arguments in the SQL Select statement or not. I presume that it does not, becuase if it did, then you would get a second prompt for the argument value. That's because even though you are passing in arguments to the a5_open_layout() function, you are not setting any argument values).

                      The prompt that you are seeing is the prompt for the ask variable. I can duplicate that this is not working, and I am investigating it.
                      In the mean time if you change you script, you can get it to work:





                      Code:
                      dim filter as c
                      dim order as c
                      dim options as c
                      dim description as c
                      dim show_all_flag as L
                      dim layout_name as c
                      dim layout_type as c
                      dim acct as c 
                      acct = ui_get_text("Account","Enter account number")
                      if acct = "" then 
                            end 
                      end if 
                      
                      filter = "Pty_accnt = " + s_quote(acct)
                      order = "recno()"
                      options = ""
                      description = "Saved Query: account"
                      show_all_flag = .f.   'user cannot turn off the query
                      layout_type = "browse" 'to open a form, set this to "form"
                      layout_name = ""   
                      
                      a5_open_layout(layout_type,layout_name,"transactions",filter,order,description,options,show_all_flag,args)

                      In other words, we are prompting for the parameter and then setting the filter to an explicit string before we call the a5_open_layout() function.

                      Comment


                        #12
                        Re: Is this a bug

                        Thanks Selwyn;

                        You are right it's not going against the SQL with an argument. I have another script that does and open a browse table for that. For this one I wanted that to be available on a form directly and goes against the A5 table and still use the same form displayed.
                        In your code that should open another instant of the form for the filtered account, which is fine.

                        Comment


                          #13
                          Re: Is this a bug

                          we have now fixed this

                          the bug was that if the filter in the a5_open_layout() command included ask variables, and the layout is based on an active link table, the command did not work.

                          this is now fixed. thanks for bringing this to out attention.

                          Comment


                            #14
                            Re: Is this a bug

                            Thanks Selwyn very much

                            Comment

                            Working...
                            X