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 Scripting not working

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

  • Action Scripting not working

    I have seen a few postings related to this problem, but none that I can utilize and that's possibly because of my programming illiteracy.

    I have attached a zip of the (empty) database I'm having trouble with. On the Defendants tab I had place an Action Script button that is to call the companion form that was created for data entry, instead of the user inputting into the embedded browse directly. This worked fine for the Contacts and Cases tabs, but won't work for Defendants or Medical Records tabs. Don't even want to try one on the Medical Bills tab. The error message for each is consistent in that it states "Argument is Incorrect Data Type", although it may reference different line numbers in the script. The Defendants error references line 52 but there are only 45 lines in the script....? I can't see why it works for the Contacts and Cases tabs, but not these tabs.

  • #2
    Re: Action Scripting not working

    Try again with the attachment. You may have to thin it down some.
    There can be only one.

    Comment


    • #3
      Re: Action Scripting not working

      I may be off base with this, not seeing your database, but you might try accessing the form directly (Open form or browse) and linking via your common record_id instead of using the companion form in the Action Script. I sometimes had issues with the companion command, but had things working using the direct approach.
      "Ollie, remember how dumb I used to be? Well, I'm much better now."

      Pete

      Comment


      • #4
        Re: Action Scripting not working

        Hi Pete, love your image! I did try linking with a different key, but it made no difference. Plus when you choose to Enter New Record the key "goes away". The default is keyno() but I did try using the same primary key that I had created the set with.

        I'll try reposting the DB as it didn't attach the first time.
        Last edited by kyosadls; 01-07-2009, 07:39 PM.

        Comment


        • #5
          Re: Action Scripting not working

          Trying again. I left out some sets, hopefully this gets it under the line...

          Comment


          • #6
            Re: Action Scripting not working

            Two things I see that I don't do. 1. I don't leave spaces between names for sets. I think, from reading, that is not good. 2. I use a lookup for the link field between the parent and child form. You need to create a lookup from the parent id field to the child id field so when you create the child, the parent id will automatically come up in the child field. In other words. Say client_id is in your parent file is 000001. You have a child file that generates an automatic defendant_id, but must also then generate the client_id # from the parent file (000001). From what I see your have a default "user entered" for the client_id in the child form (defendant) with no lookup. Once you have that connection, you can create a link that works correctly, I think.

            I hope this makes sense, perhaps someone else with more experience can chime in, as well.
            "Ollie, remember how dumb I used to be? Well, I'm much better now."

            Pete

            Comment


            • #7
              Re: Action Scripting not working

              I think I know what you mean. I based the form on a set that uses the client, case and defendant tables. Client to case uses Clientid as primary key, then case to defendant uses Caseid as primary key. Should I create a link in that same set from client to defendant using clientid as primary? And I think you're right about the space in the set. (By the way, thank you!)

              Comment


              • #8
                Re: Action Scripting not working

                Tried the lookup table approach, does the same thing. I'm afraid to change those set names as it may corrupt all the forms I've done so far...? I will try copying them to a new set without the spaces. Doesn't explain why the contacts and cases Enter New Record buttons work - I used the same exact approach for them. Here's a snapshot of the lookup table, did I do something ridiculously dumb?

                Comment


                • #9
                  Re: Action Scripting not working

                  Make a backup and work with that one, so you don't loose your forms. I tried working with your tables a bit more, but there are issues that need to be addressed, in my opinion. Keep in mind that you are working with parent and children and they need to be connected via some common ID number to work. I haven't seen anyone else chime in yet. Let me see if I can send along a sample db for you to look at. It may take a few minutes.
                  "Ollie, remember how dumb I used to be? Well, I'm much better now."

                  Pete

                  Comment


                  • #10
                    Re: Action Scripting not working

                    Here is a simple version showing how the links work. I hope this helps and is correct...:)

                    If you double click on the browse in the set form, you get to the existing defendant form.
                    "Ollie, remember how dumb I used to be? Well, I'm much better now."

                    Pete

                    Comment


                    • #11
                      Re: Action Scripting not working

                      I see what you did. I had set up the 3 tables in the set (client, case, defendant) because I wanted to pull the case number for the defendant form. I guess I could have done that another way and left it out of the set. The flow is that there is one client, many cases, many defendants for each case, many medical records for each case, many medical bills for each case, etc. Its been a tough one to start out on because of the various layers. So you're saying that when I get to the medical records panel I should just base the form on a client - medical records set? And so on for the medical bills? What about the lookup you mentioned before? I'm assuming I set that up in the field rules as in the jpg above.

                      Comment


                      • #12
                        Re: Action Scripting not working

                        You can continue on with how you set up your other files, you just need to keep connected as I tried to show in the small sample. The medical file becomes a grandchild of the parent and is connected via id# of the defendant, its' parent, just as the defendant is connected to the client.

                        I hope this helps and I am leading you in the right direction. You might want to look at a couple of the sample databases supplied with Alpha 5. There is a sample called "Students and Classes" in the Template folder within Alpha 5 that may provide you with some good information.
                        "Ollie, remember how dumb I used to be? Well, I'm much better now."

                        Pete

                        Comment


                        • #13
                          Re: Action Scripting not working

                          Pete, I'm really struggling with this. I went back and created a set from client to defendants and created the form and the button and it worked like a charm. Then I went to the main form to recreate it and I can't because of the set that I have to use for the main form.

                          It may have to do with having the main form based on a set that includes all the tables (because the client wanted to be able to see all the "panels" at all time) so I added direct links from the client table to the defendant table (see attached). I realize it was a cludgy way to set up the database but I didn't know any other way to provide the client with what they wanted. But it still doesn't explain why the button on the contacts form works...its the same layout and there's no direct link between clients and contacts.....?

                          I also added lookups in the case and contact and defendant tables via field rules to pull the clientid from the client table. Still no luck. Why is it saying "Argument is incorrect data type"? I added a DefendantID field to the Defendants table but that didn't change the error. I've redone the embedded browse, no luck. Is there any other way that I can pull the Defendants form to allow a new record entry from a button? This is making me nuts and I know I'll have the same issue when I work on the medical records and medical bills tabs. Thanks for hanging in here with me...

                          Comment


                          • #14
                            Re: Action Scripting not working

                            It may have to do with having the main form based on a set that includes all the tables (because the client wanted to be able to see all the "panels" at all time)...
                            This is a common request, and it is often very poor design. Especially for applications that are intended to be used on a local area network. Visit www.learn alpha.com. Read the article "Simplify your applications for better performance". Adopt the design principles the author recommends.

                            Comment


                            • #15
                              Re: Action Scripting not working

                              Thanks Tom, I'll do that. This client wants a certain look to the database but I'm not sure that it can be done easily in AlphaFive (at least for someone with limited experience). From your experience, are you suggesting that I should completely redesign this? Can I ask why you say that it is poor design for a local area network?

                              Comment

                              Working...
                              X