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

Need help revising OnPush event for a similar button

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

    #16
    Re: Need help revising OnPush event for a similar button

    Originally posted by Wanda Tucker
    I edited the line to read:
    The error message I get is: Cannot open table.
    Yes, I have tbl=table.open("Sites")
    Why am I getting the error?
    Capacity_Shelter is a field in "building". You should open the child table, "building" not "sites"
    dim t as p
    dim cry as p
    t=table.open("building")
    query.filter="Capacity_Shelter=............."
    cry = t.query_create()


    In this scenario, you do NOT need cry().

    Comment


      #17
      Re: Need help revising OnPush event for a similar button

      Originally posted by Wanda Tucker
      I edited the line to read:
      The error message I get is: Cannot open table.
      Yes, I have tbl=table.open("Sites")
      Why am I getting the error?
      Capacity_Shelter is a field in "building". You should open the child table, "building" not "sites"
      dim t as p
      dim qry as p
      t=table.open("building")
      query.filter="Capacity_Shelter=............."
      qry = t.query_create()


      In this scenario, you do NOT need flattenquery().

      Ignore the previous reply (that's what happens when you use spell check!)

      Comment


        #18
        Re: Need help revising OnPush event for a similar button

        Makes sense, but still not right. I've tried it numerous times in numerous different ways.

        Here is what I have:

        dim global tbl as P
        dim global qry as P
        dim global nrecs as N

        tbl=tbl.open("buildings")

        query.description = "Search for matching records"
        query.order = ""
        query.filter = "trim((flattenquery(sites_Plus->buildings->Capacity_Shelter)=\"Cap_30\""

        If I don't have the (sites_Plus...) from the Query.filter line, I get: can not open set.

        So, I indicate the set name, and get the message: Could not find buildings.set.

        What am I missing?

        Thank you, Gabriel.
        W

        Comment


          #19
          Re: Need help revising OnPush event for a similar button

          Where are you running this script from?

          Comment


            #20
            Re: Need help revising OnPush event for a similar button

            Also, when I write:

            tbl.open("Buildings"), I get the error:

            Alpha Five is unable to reset the current table from within a card. A table reset can be done from a script that is run using the new script.spawn() command.

            So, I studied script.spawn(), and hacked away at placing it here and there in the code. Couldn't figure out, again, WHERE to put it. Help is great at indicating what does what - but horrid at explaining any error messages. So many of the messages just tell you it can't do this that or the other, or it gives enough of a hint to drive me nuts. This is precisely why I struggle with code - and the precise reason I love Action Scripting. Action Scripting doesnt' cover everything, though - and it's those things that just sink me.
            W

            Comment


              #21
              Re: Need help revising OnPush event for a similar button

              Originally posted by G Gabriel
              Where are you running this script from?
              The script runs from a form set up as a menu with several buttons that each run a different search.

              It should be so incredibly simple, but isn't.

              All I need the search buttons to do is filter the number of people a shelter can hold - i.e.:

              capacity_shelter<30
              Capicity_shelter>30.and.<51
              Capacity_shelter>51.and.<75

              Thank you, Gabriel.
              W

              Comment


                #22
                Re: Need help revising OnPush event for a similar button

                Is that form based on the set?
                What do you want to see after the script runs? do you want to see a report? a form showing only the records that meet the criteria?

                Comment


                  #23
                  Re: Need help revising OnPush event for a similar button

                  Originally posted by G Gabriel
                  Is that form based on the set?
                  What do you want to see after the script runs? do you want to see a report? a form showing only the records that meet the criteria?
                  Yes, the Sites form is based on a set. After the script runs, I want to see the parent records that have child records that have the number 30 or less in the capacity_shelter field, in the same form. So, yes, the form, showing only the records that meet this criteria.

                  Thx,
                  Wanda

                  Comment


                    #24
                    Re: Need help revising OnPush event for a similar button

                    Wanda:
                    Actually you could do this very easily with Action Script or if you wish, zip you file.

                    Comment


                      #25
                      Re: Need help revising OnPush event for a similar button

                      With Action Scripting, I'm stuck on this:

                      After the query is run, a browse of the records in Buildings that meet the criteria is opened. I want the Sites form to open, instead.

                      However, when I add the script to open the Sites form after running the query, it does not hold on to the queried records. I think this is because there is a variable in the Oninit Event of the sites form, which Mike Wilson very pains-takingly helped me with. I think the variable clears any query run prior to the sites form opening.

                      On another menu that has a different kind of search criteria (i.e. it filters out all fire department districts that the site is situated in, except for those that meet the criteria - such as sites within the Redwood Valley Fire District) the queries run beautifully, as they are based on the parent.

                      Mike could probably nail this in one fell swoop, knowing what's behind the scenes, so to speak...yet, I already owe him so much for the work he has done to help me, that I hesitate to ask him about this.

                      I've pretty much decided to give up on it. It's not so easy to zip and send the file, either, because I'd have to copy it to a different directory and delete all the confidential data.

                      What a waste of time this has been for both of us!!! I sincerely apologize.

                      No wonder I'm 100% burned out on design work!!!!! I just want to take a sledge hammer to this computer.

                      Thank you, though!
                      W

                      Comment


                        #26
                        Re: Need help revising OnPush event for a similar button

                        I am not realy sure why would you put a search criteria in InOnIt ? That pretty much limit what you could use the form for. Why do not you take that script out off OnInIt, put it on a button or something else Or put it on that menu form), then you could use the form any way you want.

                        Comment


                          #27
                          Re: Need help revising OnPush event for a similar button

                          Because taking it out screws up all the other searches. It all has to do with the ability to ShowAll after a search is run.

                          My brain is totally mush at this point. To rehash it all is not possible, as I know I'd miss a beat here and there. You can look at the thread and follow the whole thing from the beginning. I'll get the correct thread names and post them.

                          Wanda

                          Comment


                            #28
                            Re: Need help revising OnPush event for a similar button

                            [QUOTE=Wanda Tucker] It all has to do with the ability to ShowAll after a search is run./QUOTE]
                            You could do that with couple simple lines before running a new search that says:
                            t=table.current()
                            t.query_detach_all()
                            I am not sure what is the dilemma?

                            Comment


                              #29
                              Re: Need help revising OnPush event for a similar button

                              Gabriel,

                              If you really want to know, take a look at these threads:

                              Need to allow user to invoke "ShowAll"

                              and

                              Conditional action on an Oninit event

                              Good luck wading through it if you so chose to take the plunge!

                              W

                              Comment


                                #30
                                All I can do is give up at this point

                                [QUOTE=G Gabriel]
                                Originally posted by Wanda Tucker
                                I am not sure what is the dilemma?
                                The delima was quite complex. You'll see, when you read through the two threads, I think.

                                Thank you again,
                                Wanda

                                If anyone can see the tree through this forest, I would be most thankful! For now, I've decided to not even use the "capacity search" menu. It's not worth the stress. So what if the user has to look through several records, at this point?

                                I always try to make my apps perfect - and half the time the effort isn't even appreciated. So, they don't get the luxury of running these "capacity" searches. I'm done unless someone takes it upon themselves to rise to the challenge and enlightens me with a solution that I can implement without having to know everything there is to know about code.

                                Comment

                                Working...
                                X