New call-to-action
Results 1 to 8 of 8

Thread: Browse - filter refresh

  1. #1
    Member
    Real Name
    Justin Faircloth
    Join Date
    Jun 2003
    Posts
    80

    Default Browse - filter refresh

    I have an embedded browse in a form where the form is based on a Set & the browse is based on the child table. When the user clicks a button I want the browse to be filtered by the field trntype.

    I have the following code in the OnPush event for the button. It doesn't give me an error but doesn't change my browse display either.

    topparent:browse1.basequeryrun("trntype = "POS"")
    topparent:browse1.Resynch()
    topparent:browse1.Refresh_Layout()

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: Browse - filter refresh

    You probably want

    topparent:browse1.basequeryrun("trntype = 'POS'")

    if you are filtering for trntype = "POS"

    or

    trntype = ' " + POS + " ' "

    if you are filtering for trntype = the value held in POS (field or variable)

  3. #3
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: Browse - filter refresh

    I meant

    topparent:browse1.basequeryrun("trntype = ' " + POS + " ' ")

  4. #4
    Member
    Real Name
    Justin Faircloth
    Join Date
    Jun 2003
    Posts
    80

    Default RE: Browse - filter refresh

    Stan,
    When I changed it I got the following Error Message

    Filter Expression Not Valid:
    trntype = 'POS'

    fyi - I am filtering for trntype = "POS"

  5. #5
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: Browse - filter refresh

    I can't say I've ever used this method.

    I do notice that the order expression is listed in the help files as not optional (it is not enclosed in square brackets in the syntax line), then as optional, so at least you might try

    topparent:browse1.basequeryrun("trntype = 'POS'","")

    The field "trntype" is a valid field in the child table on which the browse is based? It is a character field holding values like "POS"?

  6. #6
    Member
    Real Name
    Justin Faircloth
    Join Date
    Jun 2003
    Posts
    80

    Default RE: Browse - filter refresh

    Doesn't seem to matter if I clarify all the parameters or not, I still get the same error.

    The field "trntype" is a valid field in the child table on which the browse is based? It is a character field holding values like "POS"? Yes

  7. #7
    Member
    Real Name
    Bill Warner
    Join Date
    Apr 2000
    Posts
    905

    Default RE: Browse - filter refresh

    Justin, I've been somewhat (not completely) successful getting a browse to refresh by doing this:

    topparent:browse1.activate()
    topparent:jobno.activate()

    where jobno is a field in the parent table (not the child).

    It seems that refreshing the browse alone doesn't work, but activating it, and then activating a record in the parent, does. It's worth a try anyway.

  8. #8
    Member
    Real Name
    Justin Faircloth
    Join Date
    Jun 2003
    Posts
    80

    Default RE: Browse - filter refresh

    Is anyone familiar with the .baseQueryRun method?

    I can use the exact same filter string with the .viewqueried method and I get the results i'm looking for. However, when I use the same filter with the .basequeryrun method I get teh "filter expression invalid" error.

Similar Threads

  1. refresh browse
    By Sieward in forum Alpha Five Version 6
    Replies: 3
    Last Post: 09-29-2005, 06:11 PM
  2. Browse Refresh
    By alexmuir in forum Alpha Five Version 5
    Replies: 4
    Last Post: 07-18-2005, 05:29 PM
  3. browse refresh
    By geoff m in forum Alpha Five Version 5
    Replies: 10
    Last Post: 10-09-2004, 02:00 AM
  4. browse refresh
    By JeffShaw in forum Alpha Five Version 5
    Replies: 2
    Last Post: 03-13-2003, 10:35 AM
  5. Can't get a browse to refresh
    By drgarytraub in forum Alpha Five Version 4
    Replies: 5
    Last Post: 09-01-2000, 02:35 AM

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
  •