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



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

UI Dialog to Choose Records

  • Filter
  • Time
  • Show
Clear All
new posts

  • UI Dialog to Choose Records

    This is a continuation of the "Array out of Bounds" topic that I have worked with in the past couple of days. I am through with topic so I started a new one now.

    With the help of several posts, I have gone from scratch on my form to the point of designing a UI Dialog box that displays well names from a table called MMSPRP that is contained within a set called MMS in a database. Choosing a well name from the table MMSPRP and clicking the "ok" button on the UI dialog box was working as of yesterday.

    However, there was still much work to be done on the form, and I have been able to somewhat get my next improvement on the form to work.

    Yesterday, I had character fields on the form instead of date fields which basically referenced a year and month in the format "CCYYMM". This works fine if you know what you are doing when you select a beginning and ending period.

    To make it easier for the user though, I broke the field Beg_month into two components, begmo and endmo, and replaced Beg_month on the form with these two fields. I set up drop down boxes for each with the month always a 2 character allowed response. I did the exact same thing for the field end_month by breaking it into endmo and endyr.

    Then, I set up beg_month and end_month as form calculated fields. As an example; Beg_month was assigned the expression: var->begyr+begmo which produces the character result "200208" if the values in begmo and begyr respectively are "08" and "2002". It is necessary to get these types of formats since this is the way the records in the database are set out.

    One of my questions is concerning how to not allow the user to type in an erroneous value for lets say the begmo drop down box. If I type in "8" instead of selecting "08" right now, the drop down lets me do that. But that would cause a problem for record selection for the report I am wanting to print.

    Also, my other question has to do with passing the beg_month and end_month variables to my report. When I had trouble getting my report to pull in these global variables on my form, I used another method at the same time to see if this would pass the calculated values in beg_month and end_month to my report. In the dropdown4 object (which is my end year value contained in endyr) under actions, I did the following for the Ondepart Event; end_month=endyr+endmo. For the dropdown2 object (which is my begyr value) under actions, I did the following for the Ondepart Event; Beg_month=begyr+begmo. So, I'm not sure yet if the calculated fields on the forms are what is working or if the Ondepart Event thing I just typed out is what is causing the global variables beg_month and end_month to get passed to the report.

    My report called "Report by Well Name" has the following for its filter expression under the records tab of the detail properties.

    Here is my OnDepart action for the "wellname" field on my form which basically transforms its value to the variable "namex" in this script.

    dim welllisting(1024) as c
    dim inputf as p
    dim name as c
    dim global wellname as c
    dim global namex as c
    dim i as n"mmsprp",file_ro_shared)
    while .not. inputf.fetch_eof()
    end while
    name=ui_get_list_array("Select your well",1,"welllisting")
    Report.Preview("Report by Well [email protected]:\myfiles\a5v4data\mms\mmshist.dbf")

    Once I fully understand what is going on here, then I will be doing a separate UI box for the form that will allow the user to specify a property code.

    Each well can have the product "Oil" or "Gas", so basically each well is showing up twice in my UI box right now. I am not concerned yet about tackling this part of the product code UI box. But, I would like it at this point if the well name in the UI box only displayed once, rather than however many times it actually is in that field.

    I hope this lengthy explanation makes sense. Please let me know if you need further clarification to answer my questions.



  • #2
    RE: UI Dialog to Choose Records


    Concerning your first question, you might try implementing the drop down list of permitted choices using a lookup field rule (simple list). Scroll down the dialog form used to set the specs for the simple list rule and set the 'allow exceptions' property to deny the user permission to insert something other than one of the items on your list. This could be used to control the input values for your month, year, and even the day segments that you want to use to create a beginning or ending date.

    Another alternative would be to validate the input values themselves using a simple script attached to the onDepart event for these fields. The script could look at the input value and force the user to back up and 'do over' if they typed in a month value lower than 01 or greater than 12, for example.

    Soapbox on:
    You've framed several questions within one post. This may be easier for you, but it's harder on the rest of us (in my opinion). This board seems to work best when each post deals with a single question. Given the post, reply, post, reply, reply, reply format it becomes unwieldy if multiple mini-threads occur within the one message thread. This makes it hard for folks to retrieve useful information from the thread later on, too. So, my suggestion would be to try to limit posts to a single issue, wherever possible. I think you'll find that you'll get more responses that way.
    Soapbox off:

    -- tom