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

Xdialog problem

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

  • Tbaker
    replied
    Re: Xdialog problem

    Ted

    am trying to run a query ie BHS and use just those records in the room_inventory script that you helped me with. I tried adding to the room_inventory script another script that calls a saved query (BHS) but it is not working. Advise?
    Here is a revised script. Open TextbookS form - there is a new button "Run BHS Report" - that button contains a script "Script_play("Run_bhs_rpt") from the code tab. On the code tab you can open the "Run_bhs_rpt" in design mode to check out the code there which is "Run a saved Query (BHS)" then "Preview the report". I also changed the BHS query's order to Room_number+Grade_level+subject.

    When you push that button, the query is run to show only Basile High School records and the report is room number order.

    Just wanted to show you how you can use the query.

    Tom Baker
    Last edited by Tbaker; 12-23-2008, 09:24 AM. Reason: Changed the zip file

    Leave a comment:


  • csda1
    replied
    Re: Xdialog problem

    Hi Cal,

    Originally posted by CALocklin View Post
    2. Script in the Code tab.
    - Click the Code tab in the Window Bar and edit the script.
    - Click on the form name in the Window Bar and test your changes.
    I know you meant this:

    2. Script in the Code tab.
    - Click the Code tab in the Window Bar and edit the script.
    - Save the script (leaving it open though)
    - Click on the form name in the Window Bar and test your changes.

    As Mike states and has learned, UDFs simplify even more as there is no parameters that have to be set prior to using it vs a script_play() and with the side benefit of making debugging easier by compartmentalizing code.

    Leave a comment:


  • tsoileau
    replied
    Re: Xdialog problem

    Tom,

    I am trying to develop a database which will help me and the schools in our district keep track of all textbooks both at the school level and the district level. What I need is for each school to keep track of their textbooks and their location as well as new books coming in and books that are transfered to another school. As the person who is in charge of textbooks at the district level, I need to have access to all the schools as well as have reports district wide. I figured what I would do is have a central database with each school logining in--ie. Basile High School, which will query the whole database and bring up only those records that belong to Basile High. I need the query to stay until Basile closes the database. At the sametime, every school should be able to login in and see their infor without seeing anyone elses. I hope this helps you see what I am trying to do.

    Thanks,

    ted

    Leave a comment:


  • Tbaker
    replied
    Re: Xdialog problem

    Ted

    I just got home from work - and looked at the forum and found your post - evidently the board was down from 2:48 PM EST yesterday to sometime this morning.

    Question: I looked at the BHS query - it is based on school which is Baslie High School and the order is school+grade_level+subject.

    The report for room inventory doesn't list the grade level or the subject but lists category etc.

    What are you trying to get in the report?

    I have to go out for awhile, so I might not get back to you until later this
    evening.

    But I will get back to you.

    Tom Baker

    Leave a comment:


  • tsoileau
    replied
    Re: Xdialog problem

    Tom,

    Thanks for the help. I tried getting back to you yesterday but the message board would not load. I believe I understand what you and Cal were saying in that I should create a script in the code editor then use a button on the form to call up that particular script? You also mentioned that it appears that the application was first created in Alpha 4. That is correct and boy I am finding that Alphafive is different than 4. Should I just recreate the application in five--would this help avoid other problems? I am trying to run a query ie BHS and use just those records in the room_inventory script that you helped me with. I tried adding to the room_inventory script another script that calls a saved query (BHS) but it is not working. Advise?
    I do appreciate you help and patience.
    Thanks,

    ted

    Leave a comment:


  • Mike Wilson
    replied
    Re: Xdialog problem

    Cal,
    I am glad that you have written up what I have tried to explain to several folks about the efficiency of scripts off buttons. I have gone one step further in making them user defined functions (UDFs), which is even easier to type.

    Let me also add this. Form Curruption. There have been occassions where a form gets corrupted and whatever is on the form is LOST! Hours work on a form with lots of coding on buttons...not yet backed up...lost. That only needs to happen once to adopt this approach.

    Leave a comment:


  • Tbaker
    replied
    Re: Xdialog problem

    Cal

    Good advice


    Tom Baker

    Leave a comment:


  • CALocklin
    replied
    Re: Xdialog problem

    Originally posted by Tbaker View Post
    You could also just copy your code to that button and it will do the same thing.
    Absolutely true BUT it's often easier to develop when the code is in the Code tab and use Script_play("<ScriptName>") to call it from the button/event.

    Consider these two editing scenarios. You've just finished testing your first attempt at fixing a problem and find you need to change something else. (I know, a truly good developer would get it on the first attempt but not me.):

    1. Code on the button:
    - Switch the form to Design mode. (a short wait)
    - Right click the button to be edited.
    - Select Events / On Push.
    - Another short wait for the script to open then edit the script.
    - Save and close the script.
    - Save the form and switch back to View mode (another short wait) to test your changes.

    2. Script in the Code tab.
    - Click the Code tab in the Window Bar and edit the script.
    - Click on the form name in the Window Bar and test your changes.

    I don't know about other developers but I like #2 much better.

    Even if you're just starting the first edit in option #2, you don't have to close the form. Just go to the Control Panel, select the Code tab, and open the script. After that you can just switch back and forth.

    That's not to say I don't have quite a few scripts directly in my buttons/events but those are only the very simple ones that shouldn't need to be edited unless I decide to make a change to the functionality. (i.e., a simple script like parentform.commit() probably won't need to be edited unless I decide to add some other feature.) If the script is complex or longer than what fits on about 1 screen, I usually put it in the Code tab for ease of development.

    Leave a comment:


  • Tbaker
    replied
    Re: Xdialog problem

    Ted

    Just to keep this thread in order, I have attached a zip file based upon the edit from my last post.

    I put a button on the "TextbookS" form called "Run the room inventory Report" which just has the code

    Code:
     script_play("room inventory")

    You could also just copy your code to that button and it will do the same thing.

    I changed the code back to your original code and deleted the filter from "select records" in the reports properties.

    Tom

    Leave a comment:


  • Tbaker
    replied
    Re: Xdialog problem

    Ted

    It seems that this app was converted from Version4. There also seems to be one corrupted form (room number).

    Anyway, I have attached your zip file revised. Put the filter for the report in the report itself (in design mode, select report, then select "select Records" and in the box at the top I put the filter (room_number=var->room_number).

    Then in action scripting for "print the layout" in your code, I changed the select records to print from "records selected by a filter expression" to "no additional selection criteria".

    Now when you run the report, you put in a room number in the dialog box and then the report runs showing just the room number you want.

    There seems to be some trouble using the filter from the code - I don't know why right now, but I will keep on checking a get back to you. But by putting the filter directly into the select records of the report - it will work just fine.

    Tom Baker


    Edit -

    I wasn't seeing the forest for the trees.

    If you put a button a form which is based on the testbook_orders.dbf which calls the script (code), it will run the report the way you want it from you original code.

    I was trying to run the code from the code editor which was not relating properly to the correct table when running the report.

    Again just place a button on a form associated with textbook_order table and run the room inventory script from that button.
    Last edited by Tbaker; 12-21-2008, 02:14 PM. Reason: Found the reason

    Leave a comment:


  • tsoileau
    replied
    Re: Xdialog problem

    Tom,

    I do appreciate you patience. I created the code--it is room inventory--it should be the only code. The report is room inventory.

    Leave a comment:


  • Tbaker
    replied
    Re: Xdialog problem

    Ted

    I see a lot of forms - can you tell me which one I should be looking at for the dialog and then the report?

    Tom

    Leave a comment:


  • tsoileau
    replied
    Re: Xdialog problem

    Let me try it again.

    Leave a comment:


  • Tbaker
    replied
    Re: Xdialog problem

    Ted

    There was nothing in the zip file except folders

    Tom

    Leave a comment:


  • tsoileau
    replied
    Re: Xdialog problem

    Here is the folder with the start of the application. Any suggestions is appreciated.
    Attached Files

    Leave a comment:

Working...
X