to get a personalized navigation.
to get a personalized navigation.
Hi
query {
useCompany(no: 4655191) {
companyChangeLog(filter: {_and :[ {logType :{_eq : 1}}, {tableNo :{_eq : 152}}, {columnNo :{_eq : 4084}}, { changedDateTime : {_gte: "2023-09-05T01:10:07"}} ]}, sortOrder: {createdDate: DESC _thenBy: {createdTime: DESC}})
{
items {
logType
tableNo
columnNo
newValue
previousValue
changedDateTime
primaryKey
}
}
}
}
results in:
{
"data": {
"useCompany": {
"companyChangeLog": {
"items": [
{
"logType": 2,
"tableNo": 170,
"columnNo": 5703,
"newValue": "2031",
"previousValue": "0",
"changedDateTime": "2023-09-05T12:08:00",
"primaryKey": "(Cap. asset no.) 12950"
},
{
"logType": 2,
"tableNo": 170,
"columnNo": 9575,
"newValue": "21",
"previousValue": "",
"changedDateTime": "2023-09-05T12:08:00",
"primaryKey": "(Cap. asset no.) 12950"
}
]
}
}
},
"extensions": {
"vbnxt-trace-id": "0000000000000000e4efa4f3e7a6f641"
}
}
It seems like the changeddatetime-filter overrides the other filters.
Is there something wrong with my query?
When I remove the datetimefilter I get the right tableid and column but I also need the filtering on lastchanged...
Florian
The fix for this has been deployed to production.
Can you try to use the following filter and see if there is any difference?
filter: {
_and :[
{logType :{_eq : 1}},
{tableNo :{_eq : 152}},
{columnNo :{_eq : 4084}},
_or : [
{changedDate : {_gte : 20230905}},
_and : [
{changedDate : {_eq : 20230905}},
{changedTime : {_gte : 110}}
]
]
]
}
Interesting, same problem...
query {
useCompany(no: 4655191) {
companyChangeLog(filter: {
_and :[
{logType :{_eq : 1}},
{tableNo :{_eq : 152}},
{columnNo :{_eq : 4084}},
{_or :[
{changedDate : {_gte : 20230905}},
{_and : [
{changedDate : {_eq : 20230905}},
{changedTime : {_gte : 110}}
]}
]}
]
}, sortOrder: {createdDate: DESC _thenBy: {createdTime: DESC}})
{
items {
logType
tableNo
columnNo
newValue
previousValue
changedDateTime
primaryKey
}
}
}
}
{
"logType": 2,
"tableNo": 170,
"columnNo": 9575,
"newValue": "21",
"previousValue": "",
"changedDateTime": "2023-09-05T12:08:00",
"primaryKey": "(Cap. asset no.) 12950"
}
But filter on createdDateTime seems to work at least.
Just one idea about that here: The changelog would actually never be changed - is this maybe the root for the problem? I can test to get around this by filtering on createDateTime instead.
It seems like that only occurs when the filter does not hit any rows. When both tableno columno logtype and lastchangeddatime filter hit any rows I get the rows with right filtering
Copyright © 2022 Visma.com. All rights reserved.