Consider the following POST to /crm/v3/objects/companies/search
data = {
"filterGroups": [
{
"filters": [
{
"propertyName": "sync_id",
"operator": "LT",
"value": "1TVj11"
}
},
]
}
You would imagine that "1TVfTD" would be returned since lexographically 1TVfTD < 1TVj11. However, this has proven to not be the case. Could someone provide some insight on how strings are compared in the Hubspot API? An extension question would be if lowercase characters are considered lesser or greater than uppercase characters.
Edit: I will add, "1TVfTD" is returned when compared against "2", but not against "1Z". What gives?
Given this information, I think you may be better off formatting the property as a date or datetime (where the underlying property values in HS are actually millisecond UNIX epoc counters) Then you have a lot more flexibility for comparison or range selection in a search.
@06018 - Although you may find this unsatisfactory, I feel you may be reaching into an arena of undefined or at least underdocumented behaviour. For my part, I only use GT, LT type comparisons on numeric properties. And limit string operations to EQ, NEQ or CONTAINS_TOKEN, etc.
I see. The strings I am trying to compare are base62 representations of Unit time (seconds since Jan 01 1970). I suppose I could use integers for this, but this should be documented somewhere
Given this information, I think you may be better off formatting the property as a date or datetime (where the underlying property values in HS are actually millisecond UNIX epoc counters) Then you have a lot more flexibility for comparison or range selection in a search.