Alpha Video Training
Results 1 to 7 of 7

Thread: Table.external_record_content_get()

  1. #1
    Member
    Real Name
    George R. Kenney
    Join Date
    Jul 2005
    Posts
    144

    Default Table.external_record_content_get()

    I am trying to use a variable in the table.external_record_content_get() function as a filter expression so as to only get records with a specific client Id that is in a field on a form. But I don´t know how to write filter expressions.
    And I can´t find any examples of using variables in filter expressions. Certainly not in the help files. It seems they always want you to hard code the expression.
    This is the silliness I have done so far but it just returns “no such field” error message the global variable is alive but it is not recognized in the filter expression I have written.

    Code:
    'Get 'Value' property of 'Client_id' in Form 'Assignments' .
    DIM window_name as C
    window_name = ":"+"Assignments"
    DIM varP_Object as p
    'Get a pointer to the specified window
    varP_Object = obj(window_name)
    'Check if the specified window exists
    if .not. is_object(varP_Object) then 
    	ui_msg_box("Error","The window '"+window_name+"' does not exist.",ui_stop_symbol)
    else
    	DIM GLOBAL VClientId AS c
    	VClientId = varP_Object:Client_id.value
    end if
    Dim List as C
    List=table.external_record_content_get("r00Spouse","Spouse","","Spclient_Id=S_quote(VClientId)")
    Any help would be extremely appreciated.

  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: Table.external_record_content_get()

    Move the s_quoted expression out of the overall filter quote marks.

    Code:
    List=table.external_record_content_get("r00Spouse","Spouse","","Spclient_Id="+S_quote(VClientId))
    I build this type of filter in the interactive by creating a test value for the variable and then testing.

    Code:
    VClientId = "ABC123"
    
    ? "Spclient_Id=S_quote(VClientId)"
    = "Spclient_Id=S_quote(VClientId)"
    
    ? "Spclient_Id="+S_quote(VClientId)
    = Spclient_Id="ABC123"

  3. #3
    Member
    Real Name
    George R. Kenney
    Join Date
    Jul 2005
    Posts
    144

    Default Re: Table.external_record_content_get()

    Stan
    Thanks so much!!!! This did the trick and gives me a big leap forward.
    Great!

  4. #4
    "Certified" Alphaholic
    Real Name
    Mike Christensen
    Join Date
    Nov 2005
    Location
    Michigan U.P.
    Posts
    5,937

    Default Re: Table.external_record_content_get()

    And I can´t find any examples of using variables in filter expressions. Certainly not in the help files.
    http://support.alphasoftware.com/alp...TABLESUM().htm
    And this syntax can be used for basically anything so definitely something to read over and over until learned...
    Mike
    __________________________________________
    It is only when we forget all our learning that we begin to know.
    It's not what you look at that matters, it's what you see.
    Henry David Thoreau
    __________________________________________




  5. #5
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,308

    Default Re: Table.external_record_content_get()

    Additional examples and explanations found in the discussion of the table.count() function, as well.

  6. #6
    Member
    Real Name
    George R. Kenney
    Join Date
    Jul 2005
    Posts
    144

    Default Re: Table.external_record_content_get()

    OK Great
    I´ve had a hard time locating anything that would expose examples where variables were used instead of hard coded strings.
    Seems to me to be really essential to doing anything.
    Thanks.

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

    Default Re: Table.external_record_content_get()

    Quote Originally Posted by netgeorger View Post
    I´ve had a hard time locating anything that would expose examples where variables were used instead of hard coded strings.
    This page is usually suggested.

Similar Threads

  1. Table.external_record_content_get()
    By MikeC in forum Archived Wishlist
    Replies: 0
    Last Post: 02-10-2010, 09:55 AM
  2. table.external_record_content_get slow!
    By perry9999 in forum Alpha Five Version 8
    Replies: 1
    Last Post: 10-17-2008, 11:06 AM
  3. bug with table.external_record_content_get()
    By Mike Wilson in forum Alpha Five Version 9 - Desktop Applications
    Replies: 5
    Last Post: 06-19-2008, 09:01 PM
  4. table.external_record_content_get
    By Blake in forum Alpha Five Version 5
    Replies: 5
    Last Post: 08-18-2003, 05:15 PM
  5. table.external_record_content_get - filter?
    By Daniel Weiss in forum Alpha Five Version 5
    Replies: 3
    Last Post: 05-04-2003, 12:39 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
  •