Alpha Video Training
Results 1 to 6 of 6

Thread: Change Existing Field from Character to Logical

  1. #1
    Member
    Real Name
    Bruce Roberson
    Join Date
    Mar 2011
    Posts
    88

    Default Change Existing Field from Character to Logical

    I import in an xls spreadsheet each month, and for some reason, I can't make Excel send this one field over as a logical field for the Alpha 5 table. I am exporting it out of an XLSX into an xls file because Alpha 5 first has to import a spreadsheet into a database called txastax,xls and creates a new file called txastax.dbf. In doing so, even though the field Tax_Reimb is populated with T or F, Alpha 5 always imports that to the new file as a character field. I am using an inline xbasic action to do the import based on clicking a form button. After the import, it goes on to do an append operation into a permanent dbf file that already has this field Tax_Reimb formatted as Logical. So txastax.dbf has to be formatted, preferably with xbasic code to change one field to logical. I cannot seem to record this in the script recorder. And, I can't find a way to access this in the inline xbasic actions either.

    Given these fields I would appreciate an xbasic script to make this change a part of the inline xbasic steps.

    Thanks,

  2. #2
    Member
    Real Name
    Bruce Roberson
    Join Date
    Mar 2011
    Posts
    88

    Default Re: Change Existing Field from Character to Logical

    Actually, never mind. I managed to get the import to change the type there to a logical, and retried the import and it works.

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

    Default Re: Change Existing Field from Character to Logical

    Excel will also save an XLS as a DBF file, which you can modify in Alpha
    Robin

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

  4. #4
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,243

    Default Re: Change Existing Field from Character to Logical

    You can actually read and write from/to the spreadsheet within alpha five.
    It took me a bit to figure this out, but you do have complete control.
    Check out office namespace in documentation.

  5. #5
    Member
    Real Name
    Bruce Roberson
    Join Date
    Mar 2011
    Posts
    88

    Default Re: Change Existing Field from Character to Logical

    Oringinally you could do a saveas and save it to a dbf file within Excel. I am on Excel 2016 and I think it was first in Excel 2010 where the dbf functionality went away.

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

    Default Re: Change Existing Field from Character to Logical

    Which is why I switched to Libre
    Robin

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

Similar Threads

  1. Tip: Using Logical check box field to change value in another field
    By kingcarol in forum Application Server Version 10 - Web/Browser Applications
    Replies: 5
    Last Post: 11-21-2012, 07:56 PM
  2. Logical Field / Character Field
    By brentjohnjohn in forum Alpha Five Version 10 - Desktop Applications
    Replies: 6
    Last Post: 01-09-2010, 09:51 AM
  3. Change value in field based on change of logical field?
    By smrogers in forum Alpha Five Version 7
    Replies: 5
    Last Post: 02-27-2006, 04:37 PM
  4. Logical to Character - Why???
    By forskare in forum Alpha Five Version 5
    Replies: 7
    Last Post: 02-19-2003, 06:09 PM
  5. append logical field to character
    By crimmelcp in forum Alpha Five Version 4
    Replies: 4
    Last Post: 07-07-2000, 07:29 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
  •