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

Imbedded Browse issue

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

    Imbedded Browse issue

    On a set, Imbedded browse is on a child table. The browse has fields from 4 associated tables.
    Button to add a record has topparent:Browse1.new_record()
    This works great for the first record.
    On the second record, it errors out with "Enter must begin first"
    . It does the same if attempted without the button.
    The form is modal and have changed to modeless.
    Saving the record, resynch, etc does not help.

    Sad part is this was working a few months back.

    Any ideas could be helpful. I have spent 2.5 work days on this one probably simple issue.

    windows10 and win7, alpha 12.4.2 - 3670 - 4684 but went back several updates and it did not change.
    Dave Mason
    [email protected]
    Skype is dave.mason46

    #2
    Re: Imbedded Browse issue

    Are you checking the mode before you add the new record? ie, saving it first? Are the 4 fields from linked tables 1:1? Just curious it probably doesn't matter.

    What I do is create the new linking record and add a value to a field then save, so after that the record is put in edit mode.

    You can put something in a name field like "<Add new customer>" so the display lets the user know which record to edit.

    I have had this happen too but can't recall what caused it...

    Recently I have become fond of tbl.enter_record() and tbl.change_record() - very simple and easy to use.

    Try this for your button:

    Code:
    if parent.mode_get() <> "VIEW" then
    parent.commit()
    end if
    
    dim r as p
    dim tbl as p
    tbl = table.current(2)  
    r.yourfieldname = "<Add New Customer>"
    tbl.enter_record(r)
    
    browse1.fetch_first()  'or topparent.resynch() or browse1.refresh() or some combination...
    Using this will allow auto increment and other field rules to work too.
    Last edited by MoGrace; 08-23-2016, 08:14 PM.
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

    Comment


      #3
      Re: Imbedded Browse issue

      Records are not entered here on table level.
      It is a simple - new record in the imbedded browse
      the only table that is of concern is a one to many child
      After the 1 record is entered, it is saved - next try errors
      The child in the browse is connected with 1 field. one to many from parent.
      There are as many as 10 child records, avg about 4

      I may have to go to a table level entry. Pretty easy to do. Was just trying to avoid and use a simple method.

      This main has about 125,000 records and the child has well over 450,000 records at this point.

      It is disgusting because when it was designed, it worked fine and I have not been able to determine what happened.

      set is
      main -1 X m child - -1 X 1 3 Gchildren

      On mode? I have found no built in method to check mode on a browse
      parentform:browse1.??? for mode?
      Last edited by DaveM; 08-23-2016, 08:48 PM.
      Dave Mason
      [email protected]
      Skype is dave.mason46

      Comment


        #4
        Re: Imbedded Browse issue

        Went ahead and did the at table level. I needed it ready to go in the morning.
        It turned out nicer and faster anyhow.

        was able to wipe more code than I had to write and that is always a good thing.

        Code:
        'for those that wish to see
        
        'Get variables I need
        DIM SHARED vargetclientid AS c
        vargetclientid = parentform:Clientid.value
        DIM SHARED vargetfile_num AS c
        vargetfile_num = parentform:File_num.value
        DIM SHARED vargetid_num AS n
        vargetid_num = parentform:Id_num.value
        
        'Create an XDialog dialog box to prompt Type
        DIM SHARED varthetype as C
        DIM SHARED varC_result as C
        varthetype = ""
        auto_list_varthetype = table.external_record_content_get("type","Type","type","nodisplay <> .t.")
        
        temp_count = w_count(auto_list_varthetype,crlf())
        DELETE a_varthetype
        DIM a_varthetype[temp_count] as c
        a_varthetype.initialize(auto_list_varthetype)
        ok_button_label = "&OK"
        cancel_button_label = "&Cancel"
        varC_result = ui_dlg_box("Select Type",<<%dlg%
        {region}
        Choose the type of Inspection:| [.80,40varthetype^#a_varthetype];
        {endregion};
        {line=1,0};
        {region}
        <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
        {endregion};
        %dlg%)
        
        'Code to create the record and add the cost of the entry
        dim bill as p
        dim fil as c = alltrim(var->vargetclientid) + alltrim(var->varthetype)
        bill = table.open("billtoclient",FILE_RW_SHARED)
        bill.index_primary_put("Clienttype")
        bill.fetch_find(fil)
        thecost = bill.clientcost
        bill.close()
        
        dim tbl1 as P
        tbl1 = table.open("inspections",FILE_RW_SHARED)
        tbl1.enter_begin()
        
        tbl1.type = var->varthetype
        tbl1.id_num = var->vargetid_num
        tbl1.clientid = var->vargetclientid
        tbl1.file_num = var->vargetfile_num
        tbl1.gs_pr = var->thecost
        
        tbl1.enter_end()
        tbl1.close()
        Last edited by DaveM; 08-24-2016, 03:46 PM.
        Dave Mason
        [email protected]
        Skype is dave.mason46

        Comment

        Working...
        X