Search code examples
excelms-accessservicenow

Format issues while conversing True/False values from MS Access through Excel to Service-Now


I'm using a MS Access query to import records from SCCM to Service-Now (which is called CMDB in my Access database) through an Excel file. I have to set the Active field in Service-Now to 'TRUE'. There is an Active field in the CMDB extract inside the Access database, called CMDB.Active. I would like to set the value of this field to always 'TRUE' regardless of the existing value (I don't always import records, sometimes update them based on the last usage). In order to set CMDB.Active always to TRUE, I converted the field to a calculated field: '"TRUE" AS Active'. In Design View and also when I export the query, it is displayed as TRUE, however, when I upload the Excel loading sheet to Service-Now, the format of the Active field is not recognized somehow and the Active field is left as FALSE after uploading the loading sheet. However, when I don't convert the Active.CMDB field to a calculated field, but manually change the FALSE values in the Excel loading sheet from FALSE or empty to TRUE, then Service-Now recognizes the format.

I tried to change the format of the Active field to True\False, but it didn't help. When the Excel loading sheet contained 'True' as value, Service-Now didn't accept it, because it requires 'TRUE'. Maybe I was using the Format function in the wrong way?


Solution

  • You pass a string, "TRUE", not the symbol for True, so try to pass:

    True AS Active
    

    If that still doesn't work as intended, use the numeric value -1 (or 1).