Alpha Video Training
Results 1 to 12 of 12

Thread: embedded browse on form not displaying results

  1. #1
    VAR
    Real Name
    Cheryl Lemire
    Join Date
    Jul 2003
    Location
    Pembroke Pines, FL
    Posts
    2,914

    Default embedded browse on form not displaying results

    go to forms tab
    load Search form in view mode
    go to Vendor Info Tab
    Click on 4th button down on left side - Items Currently At A Vendor For A Specific Company
    Type Beverly in the prompt
    An outside browse will load showing 6 records currently at a vendor for Beverly
    close the outside browse using the close browse button on toolbar
    when returning to the search form, only serial number 0030 shows as currently at a vendor for beverly, although 2 of them are displaying as blank for 0031 and 0033
    If you look at the browse tab, I have tried several different browse options
    I have also tried using the saved browse layout on my search form

    if you click on the 3rd button down on the left side, just above the one you clicked above
    you will get no matching records, this is incorrect as there should be 6 records that match the filter

    Here is what I need to accomplish. When clicking the 3rd button, prompt for a company name, check the nceinvn table for matching company name and atven logical field set to true
    Then display a browse on the vendor tab displaying the 6 records with the following data:
    serial #, company and vendor names, date out and date in, atv ship #, rma, model and description

    No matter how I try to create the browse, my display never shows properly

    How can I add a browse to this tab to display the proper records and fields?
    Cheryl
    #1 Designs By Pagecrazy
    http://pagecrazy.com/

  2. #2
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,204

    Default Re: embedded browse on form not displaying results

    Can't work on this right now.. too convoluted..getting several error messages.. one of them regarding the browse to open. Taking a quick look at the button onpush event:
    you are calling a UDF to open an xdlg with record list, you choose a company name and attempt to open a browse using another UDF browse() which takes 3 arguments all characters.

    You supply those arguments, the first is hard-coded the other two come from query.filter and query.order.

    Haven't really gotten beyond that error. It will not open the browse and indicates "different variable type"

    I can't delve into this right now, but you might want to check into this: I am not sure if query.fiter & query.order are considered character variables, my guess they are pointer variables and you might have to quote them or convert them to get them to work, or change the arguments in the UDF to A instead of C but there is a road block there.
    Last edited by G Gabriel; 04-29-2008 at 01:55 PM.

  3. #3
    VAR
    Real Name
    Cheryl Lemire
    Join Date
    Jul 2003
    Location
    Pembroke Pines, FL
    Posts
    2,914

    Default Re: embedded browse on form not displaying results

    Thanks for looking Gabe. I am not sure why you may be getting the errors you state, possibly because you are not using V7 of Alpha. Hopefully somebody else can duplicate my steps and find a way for me to accomplish my task at hand.
    Cheryl
    #1 Designs By Pagecrazy
    http://pagecrazy.com/

  4. #4
    "Certified" Alphaholic MoGrace's Avatar
    Real Name
    Robin
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    3,686

    Default Re: embedded browse on form not displaying results

    Hi Cheryl,
    You have got a crazy invoice numbering system for sure! The Atvendor table contains only the 4 records for Beverly, which suggests that there may be a mismatch in those linking numbers somewhere...? Something is causing those 2 blank records which appear to be linked. I did see some duplicates too, but have not traced how you are adding the records into the Atvendor table.

    You are also missing the variable vcgmenutitle.
    Robin

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

  5. #5
    VAR
    Real Name
    Cheryl Lemire
    Join Date
    Jul 2003
    Location
    Pembroke Pines, FL
    Posts
    2,914

    Default Re: embedded browse on form not displaying results

    Hi Robin,

    Thanks for looking. I know about the variable, it is correct in the working db, always tough when stripping things down. I apparently have some garbage data in my sample. I did not include the forms/functions for you to add items to the vendor table. I will take some time now to try and clean up the data and upload a revised sample.

    Thanks
    Cheryl
    #1 Designs By Pagecrazy
    http://pagecrazy.com/

  6. #6
    VAR
    Real Name
    Cheryl Lemire
    Join Date
    Jul 2003
    Location
    Pembroke Pines, FL
    Posts
    2,914

    Default Re: embedded browse on form not displaying results

    OK I have cleaned up the data. The browse that is currently being loaded from the 2nd button is garbage. The embedded browse on the search form is also garbage. This is where my main problem is.

    Problem 1) When searching all items ever at a vendor for Beverly, I am getting the error that there are no matching records, when there should be some records. (As I think outloud while posting this thread, my filter is incorrect. I am asking for the atven to be .t. which would be wrong. Once a piece is returned from a vendor, this field will be marked as .f.) So my filter needs to be changed to check for the company name Beverly in the atvendor table.

    Now I will need to retrieve the unique inv_id values from that search in the atvendor table and refresh my search form filtered on those inv_id values. I am guessing I need to do this because a .basequeryrun can only be filtered on the parent table and not a child table.

    Problem 2) I am not sure how to properly create the browse on the vendor tab of the search form to display the records with the fields desired.

    Problem 3) When searching for items currently at a vendor for Beverly, my filter would need to be on the company field in the atvendor table and the date_in field being blank in the atvendor table.

    The outside browse that I am loading is garbage. I am not sure how to create that browse so that it displays the proper records.

    I cleaned out the atvendor and nceinvn records some more so hopefully I did not leave any additional garbage data.
    Cheryl
    #1 Designs By Pagecrazy
    http://pagecrazy.com/

  7. #7
    "Certified" Alphaholic Mike Wilson's Avatar
    Real Name
    mike wilson
    Join Date
    Apr 2005
    Location
    Grand Rapids, Michigan
    Posts
    4,198

    Default Re: embedded browse on form not displaying results

    Cheryl,
    I have been looking at your issue. I haven't uncovered the problem, but I rebuilt the browse with only company name and serial_num, and it seems to be working.
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

  8. #8
    VAR
    Real Name
    Cheryl Lemire
    Join Date
    Jul 2003
    Location
    Pembroke Pines, FL
    Posts
    2,914

    Default Re: embedded browse on form not displaying results

    Hi Mike,

    Which browse, the one on the search form or the stand alone browse? Did you use the company name and serial number from the nceinvn table or the atvendor table?

    Let me summarize, hopefully in english, what I need to accomplish. What I currently have tried in my buttons onPush event really don't matter as all attempts have been garbage.

    First search
    1) I need to locate all records in the atvendor table for a specific company.
    2) I need to then refresh my search form to display the proper parent records and then display the related child records in a browse on the search form.

    Second search
    1) I need tolocate all records in the atvendor table for a specific company that have not been returned yet. These would have the date_in field blank.
    2) I need to then refresh my search form to display the proper parent records and then display the related child records in a browse on the search form.

    For both searches, I need to be able to load an outside stand alone browse that is separate from the search form.

    Theoretically, the browse on the search form and the stand alone browse should be the same.

    Thanks
    Cheryl
    #1 Designs By Pagecrazy
    http://pagecrazy.com/

  9. #9
    "Certified" Alphaholic Mike Wilson's Avatar
    Real Name
    mike wilson
    Join Date
    Apr 2005
    Location
    Grand Rapids, Michigan
    Posts
    4,198

    Default Re: embedded browse on form not displaying results

    Hi Cheryl,
    I rebuilt the search form embedded browse. But it is something more than that. Last night I recognized that the action of checking for matching records with your matching_records() UDF was dominating, so I removed that pulled that forward so the A5_get_records_in_query() was within the button script and used the same filter variable as the base query, and that seemed to make a difference for the button 3 (All Items Ever At A Vendor For A Specific Company). Don't quite understand why.



    Code:
    'Check for matching records
    'matching_records( "nceinvn", "(Company = Var->vcgCompanySrch) .and. (nceinvn->Atven=.T.)" )
    dim query.filter as C
    query.filter = "(( Var->vcgCompanySrch $ Company ) )  .and. (Atven = .t.  )"
    if a5_get_records_in_query("nceinvn",query.filter) = 0
    	this.Enable()					'enable the button
    	parentform:browse2.refresh()	' refresh browse
    	END'    '<============== script ends here
    END IF
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

  10. #10
    VAR
    Real Name
    Cheryl Lemire
    Join Date
    Jul 2003
    Location
    Pembroke Pines, FL
    Posts
    2,914

    Default Re: embedded browse on form not displaying results

    That is strange Mike, but glad you found it. That portion of the code should now look like:

    Code:
    'Check for matching records
    'matching_records( "atvendor", "Company = Var->vcgCompanySrch" )
    
    dim company_filter as C
    company_filter = "Company = Var->vcgCompanySrch"
    if a5_get_records_in_query("atvendor",company_filter) = 0
        this.Enable()                    'enable the button
        parentform:browse2.refresh()    ' refresh browse
        END'    '<============== script ends here
    END IF
    Note the difference in above is using the atvendor table and only looking for the company name match. This would be the correct filter as I noticed that portion was incorrect yesterday :(

    My next step would be to somehow go through the atvendor table for all records matching the company name and retrieve unique inv_id values for each of those records.

    I would then need to use those unique inv_id values as a filter to somehow re-display my search form with those matching records from the parent table. This should also result in the browse displaying the proper child records with the field data from the atvendor table.

    I am thinking that perhaps opening the atvendor table filtered by the company name, fetch the first record, retrieve the inv_id value and place it in an array and go to the next record.

    Once the array is built then open the set, retrieve unique inv_id values in the array, and use them as the filter for the set based form?
    Cheryl
    #1 Designs By Pagecrazy
    http://pagecrazy.com/

  11. #11
    "Certified" Alphaholic Mike Wilson's Avatar
    Real Name
    mike wilson
    Join Date
    Apr 2005
    Location
    Grand Rapids, Michigan
    Posts
    4,198

    Default Re: embedded browse on form not displaying results

    Cheryl,
    Couldn't you have a field in the table to mark a record, open the atvendor table to the company name and mark the records, and then open the set form filtered for marked records? Otherwise, table.external_record_content_get() should get you the array in one function if you proceed that route.
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

  12. #12
    VAR
    Real Name
    Cheryl Lemire
    Join Date
    Jul 2003
    Location
    Pembroke Pines, FL
    Posts
    2,914

    Default Re: embedded browse on form not displaying results

    Hi Mike,

    I ended up following your suggestion and adding a logical field to my parent table. I pulled the inv_id value from all matching records in the atvendor table and marked those records in the parent table to refresh my master set form with.

    As far as the browse is concerned, although some will say it is not the best design, I chose to add multiple instances of my atvendor table linking by the company field in one and the vendor field in another. I then added a conditional object on my master set form to display the different browses based on the search selected by the user.

    This master set form and browses are for read only purposes and I do not expect them used often, so I do not foresee any complications. I have also allowed a means for the user to open a stand alone browse if they choose to display the search results that they can edit with.

    Thanks to all for suggestions and assistance.
    Cheryl
    #1 Designs By Pagecrazy
    http://pagecrazy.com/

Similar Threads

  1. Problem displaying embedded browse in A5V4
    By Hawky in forum Alpha Five Version 4
    Replies: 2
    Last Post: 12-03-2007, 06:27 PM
  2. How to display query results in a browse on form?
    By brett s in forum Alpha Five Version 7
    Replies: 0
    Last Post: 11-24-2006, 10:15 PM
  3. Embedded browse is displaying same record multiple times
    By acceptthis in forum Alpha Five Version 7
    Replies: 11
    Last Post: 02-24-2006, 12:45 PM
  4. Embedded browse object produces bizarre results
    By Michael Cieslak in forum Alpha Five Version 5
    Replies: 7
    Last Post: 10-17-2003, 02:50 PM
  5. Displaying Browse from a Form
    By Rhett Scott in forum Alpha Five Version 4
    Replies: 1
    Last Post: 06-16-2000, 07:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •