Alpha Video Training
Results 1 to 11 of 11

Thread: Field is not bound error

  1. #1
    Member
    Real Name
    Jeff Fried
    Join Date
    Aug 2000
    Posts
    589

    Default Field is not bound error

    On a browse with an Excel export button on the toolbar, the intention is to export the browse to Excel with the settings (sorted and filtered) selected by the user.

    However, one of the columns is a link to the content of a field that stores the address and file name of a file to look up. If not for this column, the browse would export to Excel with no issues. With this column, I get the message "Script a5_browse_export line: 157 Field is not bound".

    There are a couple ways to deal with this. One is to create a custom export that includes all the fields but the unbound one and retains the selected sort and filter as selected. This seems like a lot to do to deal with this error. Another way to deal with this is to bind the field, so the question is whether there is a way to bind the field in such a way that it allows the Excel spreadsheet to be created.

    Yet another solution would be a simple way to exclude just this field from being part of the export, but I'm not seeing this as different from my first observation for a custom export.

    The link column needs to be part of the browse, so it is not an option to remove it from the browse.

    Is there a simple way to make the link field bound to something such that I can export properly? Thank you.

    Jeff

  2. #2
    "Certified" Alphaholic Ray in Capetown's Avatar
    Real Name
    Ray Hendler
    Join Date
    Jan 2009
    Location
    South Africa
    Posts
    2,036

    Default Re: Field is not bound error

    If you use a mapped table then fields from both tables appear in Excel.
    On my side anyway, just tried it.

  3. #3
    Member
    Real Name
    Jeff Fried
    Join Date
    Aug 2000
    Posts
    589

    Default Re: Field is not bound error

    Quote Originally Posted by Ray in Capetown View Post
    If you use a mapped table then fields from both tables appear in Excel.
    On my side anyway, just tried it.
    Sorry, Ray, I don't understand what you mean. All I was saying is that one of my browses has a column defined with a script for each row that runs a procedure when clicked. That column is unbound. I need to either exclude that column or do something that makes it bound. Thanks.

    Jeff

  4. #4
    "Certified" Alphaholic Ray in Capetown's Avatar
    Real Name
    Ray Hendler
    Join Date
    Jan 2009
    Location
    South Africa
    Posts
    2,036

    Default Re: Field is not bound error

    Quote Originally Posted by Jeff Fried View Post
    one of the columns is a link to the content of a field that stores the address and file name of a file to look up. If not for this column, the browse would export to Excel with no issues.

    Jeff
    assumed that the linked field content is a field in a linked table.

  5. #5
    Member
    Real Name
    Jeff Fried
    Join Date
    Aug 2000
    Posts
    589

    Default Re: Field is not bound error

    Quote Originally Posted by Ray in Capetown View Post
    assumed that the linked field content is a field in a linked table.
    The field with the link address is not necessary to this at all. Not needed in the resulting Excel spreadsheet. The only field in the browse that interferes with a proper export is an xbasic command that calls the content of the link address field. This is "not bound". Neither the xbasic command column nor the link address field are relevant to the export. Do you know of any way to bind the xbasic command column?

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

    Default Re: Field is not bound error

    Jeff what, exactly, do you mean by the phrase: "... oneof the columns is a link to the content of a field..." ?

    Sure sounds like you're talking about a field in another table.

    Maybe its time to post an example so we can for ourselves ?

  7. #7
    Member
    Real Name
    Jeff Fried
    Join Date
    Aug 2000
    Posts
    589

    Default Re: Field is not bound error

    Quote Originally Posted by Tom Cone Jr View Post
    Jeff what, exactly, do you mean by the phrase: "... oneof the columns is a link to the content of a field..." ?

    Sure sounds like you're talking about a field in another table.

    Maybe its time to post an example so we can for ourselves ?
    Fair enough, Tom. Let me do it this way.

    This is a simplification but covers the specifics. I'll call the table with all the data "proposal.dbf". The form with proposal fields is "ProposalForm". When a user is viewing the "ProposalForm" and presses F8, they see "ProposalBrowse".

    The "ProposalBrowse" columns are Sales Rep, Proposal #, Proposal Link, Estimated Amt, Origination Date, Prospect Name, Contact, Status, etc.

    The user will sort and filter, then export to Excel for further analysis or whatever. For example, maybe the filter is by a certain Sales Rep and sorted by Estimated Amt. The export to Excel would normally work instantly without issue except for the column "Proposal Link". "Proposal Link" is not a field in "proposal.dbf". Rather, it uses the data stored in a field of "proposal.dbf" called "linktoprop". The content of "linktoprop" is the location and file name of a file on the network which is typically a document (Excel, Word, PDF, etc.) with information about the proposal. Each row of the column "Proposal Link" has a button title "Get Link". If the user clicks on "Get Link", up pops the stored document from the network location stored in "linktoprop". Below is the code for "Get Link".

    Because of this "Proposal Link" column, the export to Excel does not work. Reason given is that "Proposal Link" is not bound. It is not a field in "proposal.dbf" but exists on the "ProposalBrowse" just for the purpose of the user being able to bring up the stored document for the selected proposal.

    Let me know if this does not clarify my meaning and I'll explain further. Thanks.

    CODE FOR "GET LINK"
    'Date Created: 31-Dec-2013 09:58:12 AM
    'Last Updated: 31-Dec-2013 10:16:33 AM
    'Created By : Jeff
    'Updated By : Jeff
    FUNCTION vmgetlink_ButtonClick AS V ( event AS C, data AS C , row AS N )
    'DESCRIPTION: Fired when a button is clicked on a column.
    'Arguments: event - the name of the event that is fired
    ' data - the data in the column cell
    ' row - the row number in the browse
    'this.SetViewport_Row() sets the current row to the row with the button that was clicked.
    this.Set_Viewport_row(row)
    if .not.isblank("proposal->linktoprop") then
    m_link = proposal->linktoprop
    if file.exists(m_link) then
    sys_open(m_link)
    else
    ui_msg_box("Error Opening File","File '"+trim(m_link)+"' does not exist.",ui_stop_symbol)
    end if
    'ui_msg_box("Response",m_link)
    end if
    END FUNCTION

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

    Default Re: Field is not bound error

    Jeff, it sure sounds like the data in the "proposal Link" column IS BOUND to the table supporting the browse.

    I'd try changing the column title to match the actual field name "linktoprop".

    If that doesn't work, I'd try removing the Get Link button(s) that display the data file referenced in "linktoprop".

    If that doesn't work, I'd copy the export xbasic and paste it into a formatted post here so we can see what's going on a bit better. It may be time to use the xbasic to create a custom export that excludes the troublesome column altogether.

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

    Default Re: Field is not bound error

    Simplest solution that comes to mind is to append the filtered browse to another table without the unbound field, then export that table to Excel.
    Alternatively, (and what I would rather do personally) is to save the browse as csv file and import that into Excel.

  10. #10
    Member
    Real Name
    Jon Moody
    Join Date
    Sep 2010
    Location
    Brackley, UK
    Posts
    222

    Default Re: Field is not bound error

    Jeff, I had a similar problem with a browse that included a couple of action buttons on each row to enable a user to enter a payment or go to the detail record for a customer.

    My solution was to create a second browse with the offending fields omitted which I put on a new form which included an 'export to excel' action followed by 'close window' in the oninit event. I then added a button to the original form to open the new one using the current filter/sort order.

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

    Default Re: Field is not bound error

    I just had this happen on a table I was trying to add a browse button to. I got the button working ok, but on saving the record this error popped up without any other clue as to why. Even on the default browse. It turned out when I checked the index, a deleted record was caught up somehow. A table pack fixed the problem. Hopefully, this might save someone else the HOURS I just spent trying to find out what this error was about!
    Robin

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

Similar Threads

  1. Replies: 1
    Last Post: 11-28-2013, 09:27 PM
  2. Bound fields in forms
    By delsandberg in forum Alpha Five Version 9 - Desktop Applications
    Replies: 7
    Last Post: 12-22-2011, 04:14 AM
  3. What is secured and bound?
    By Jeff Fried in forum Alpha Five Version 7
    Replies: 1
    Last Post: 05-05-2011, 08:42 AM
  4. Change field values in table bound to a form?
    By jjfcpa in forum Alpha Five Version 10 - Desktop Applications
    Replies: 4
    Last Post: 12-22-2009, 04:34 PM
  5. Db is bound and secure by another
    By MikeData in forum Alpha Five Version 9 - Desktop Applications
    Replies: 7
    Last Post: 04-16-2009, 06:47 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
  •