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

x Dialog Question-

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

    x Dialog Question-

    To All:
    using the code below:
    When I select an employee number from the External list Record get, I need to fill in the First Name, last Name, Craft and Craftdesc.
    Where do I put the Xbasic so that when I leave focus of the Select Employee Number Box, I can do the lookups.

    Thanks
    charlie Crimmel

    'Date Created: 27-Nov-2009 07:59:53 AM
    'Last Updated: 23-Jan-2010 02:20:24 PM
    'Updated By : charlie
    trace.clear()
    DIM SHARED v_empnum as C
    DIM SHARED v_lastname as C
    DIM SHARED v_firstname as C
    DIM SHARED v_craft as D
    DIM SHARED v_craftdesc as C
    DIM SHARED v_workrel as D
    DIM SHARED v_wrkdesc as C
    DIM SHARED v_costcode as D
    DIM SHARED v_cccc as C
    DIM SHARED v_entrydate as C
    DIM SHARED v_payweek as C
    DIM SHARED v_wo as D
    DIM SHARED v_xperdiem as C
    DIM SHARED v_xother as C
    DIM SHARED v_xtravel as C
    DIM SHARED v_xreimb as C
    DIM SHARED varC_result as C
    DIM SHARED v_EMPNUM as C
    DIM SHARED varC_result as C
    auto_list_v_SelectEmp = table.external_record_content_get("empdata","Empnum + \" \" + substr(Lname,1,25) + \" \" + trim(Fname)","Lname+Fname","")
    auto_list_v_SelectWr = table.external_record_content_get("workrel","str(Workorder,10) + \" \" + substr(Costcenter,1,13) + \" \"+Descript","Workorder","")

    temp_count = w_count(auto_list_v_SelectEmp,crlf())
    temp_count2 = w_count(auto_list_v_SelectWr,crlf())

    DELETE a_v_SelectEmp
    DELETE a_v_SelectWr

    DIM a_v_SelectEmp[temp_count] as c
    DIM a_v_SelectWr[temp_count2] as c
    a_v_SelectEmp.initialize(auto_list_v_SelectEmp)
    a_v_SelectWr.initialize(auto_list_v_SelectWr)

    heading_string = "Timentry"
    ok_button_label = "&Save Record"
    cancel_button_label = "&Cancel"
    varC_result = ui_dlg_box("Enter Xtra Billing",<<%dlg%
    {region}
    Select Employee:| [%v%.62v_SelectEmp^+a_v_SelectEmp];
    {endregion};
    {region}
    Employee Num:| [.40v_empnum] ;
    {endregion};
    {region}
    Last Name:| [.40v_lastname] First Name:| [.40v_firstname];
    Craft:| [.40v_craft] Craft Desc:| [.40v_craftdesc];
    Entrydate:| [%DATE%.40v_Entrydate!v_Entrydate] Payweek:| [%DATE%.40v_payweek!v_payweek];
    Work Release:| [%v%.72v_SelectWr^+a_v_SelectWr];
    Wrkrel Desc:| [.60v_wrdesc] Costcode:| [.40v_costcode];
    CCCC:| [.25v_cccc] Wo:| [.25v_wo];
    {endregion};
    {region}
    Perdiem:| [.25v_xperdiem] Travel:|[.25v_xtravel];
    Other:| [.25v_xother] Reimbursement:|[.25v_xreimb];
    {endregion};
    {line=1,0};
    {region}
    <*15=ok_button_label!Save Record> <15=cancel_button_label!CANCEL>
    {endregion};
    %dlg%)

    #2
    Re: x Dialog Question-

    Originally posted by crimmelcp View Post
    Where do I put the Xbasic so that when I leave focus of the Select Employee Number Box
    Every xbasic code segment in an xdialog goes...


    Code:
    %dlg%,<<%code%
    [COLOR="Red"]'HERE[/COLOR]
    %code%)
    You might be meaning to ask how to respond to

    when I leave focus of the Select Employee Number Box
    That would seem to be the killfocus event. That seems to be explained here.
    There can be only one.

    Comment


      #3
      Re: x Dialog Question-

      Sample data would help us help you. Your script won't run without it.

      Comment


        #4
        Re: x Dialog Question-

        OK:
        I have attached some sample data.
        There are 3 tables (empdata,customer and workrel)

        There are 2 xdlg examples in the code tab.
        (xdlg_empdata and xldg_customer)

        In the xdlg_empdata-when I select an employee name, I want to fill in the firstname,lastname,craft and crdesc.
        The lookup works and writes to trace window to confirm.
        I cannot refresh the fields in the xdialog.

        In the xdlg_customer-when I select the customer, I want to fill in the customer information.

        Please comment out the lines for testing the trace window.
        'if a_dlg_button = "v_SelectEmp_killfocus" then
        'end if

        Any Ideas
        Thanks
        Charlie Crimmel

        Comment


          #5
          Re: x Dialog Question-

          I finally got the empdata xdialog to work.

          now for the customer

          Charlie Crimmel

          Comment


            #6
            Re: x Dialog Question-

            Charlie, your customer code is trying to use an SQL approach via AlphaDAO without using an SQL backend database. I don't think you can do that.

            On the other hand you can do what you want with native tables without using DAO calls.

            Why did you start down this path? Am I missing something here?

            Later...

            Here's an example that might help. It illustrates how to populate a record-list listbox from a native Alpha Five table, and then parse the return string into separate "fields" that can be used to populate text boxes for user edits. To see the example run the script called "Toms_try".

            Hope it helps.
            Last edited by Tom Cone Jr; 01-25-2010, 08:03 PM.

            Comment


              #7
              Re: x Dialog Question-

              In the cold light of day I see that one of the comments in my script makes no sense.

              At line 15 change:

              Code:
              ' User edits first the change events for the two text boxes
              
              to
              
              ' User edits [COLOR="Red"]fire[/COLOR] the change events for the two text boxes

              Comment


                #8
                Re: x Dialog Question-

                I made some additional changes. These are mostly for:
                - Here's another way(s). (There are many ways, I'm just showing what I would do.)
                and
                - Here are some bits and pieces for the purpose of learning.

                I added two modified scripts that start with "Cals_" and changed one last name in the data from "McMiggan" to "McMiggan, Sr." just so you can see how I would deal with that [all too common] type of situation.

                See the comments on the on-screen xdialogs themselves and in the code.

                There are things about:
                - regions that aren't needed and what affect they have on the appearance.
                - use of named regions
                - using ^+ vs. ^=
                - an easier way to define buttons. (You do NOT need to define the button text in a separate variable.)
                - using {ysize=}
                - using separators between fields.
                - using tabs {T=} to line up columns. (Requires %O={@@}% in the object definition - see code.)
                - using {data=} to control returned values. (I seldom use this)
                - setting up events so you can trap the Change, Killfocus, etc. events for an object.
                - probably other stuff.

                Here's a video that may help also.

                Later:
                I just noticed that the resulting "Wo:" field in the xdlg_empdata scripts (the one shown in the video) is rather strange. The input box is far to the right of the field label. This is because the use of the | (pipe) symbol that lines things up is wrong. They were only used to line up the input boxes and not the labels.

                This is the way I would do it in this case - only using pipes to line up the first input box on each line:
                Wrkrel Desc:| [.60v_wrdesc] Costcode: [.40v_costcode];
                CCCC:| [.25v_cccc] Wo: [.15v_wo];


                This is another way where the Wo: label is lined up with the Costcode: label AND the input boxes are lined up:
                Wrkrel Desc:| [.60v_wrdesc] |Costcode: |[.40v_costcode];
                CCCC:| [.25v_cccc] |Wo: |[.15v_wo];
                Last edited by CALocklin; 01-27-2010, 07:06 PM.

                Comment

                Working...
                X