to get a personalized navigation.
to get a personalized navigation.
Hi,
does the joindown between the orgunits work in the API?
Example:
query {
useCompany(no: 4655191) {
orgUnit8(sortOrder: {createdDate: ASC _thenBy: {createdTime: ASC}})
{
items {
orgUnit8No orgUnit1 name joindown_OrgUnit1_via_OrgUnit8{ items{ orgUnit1No name } }
}
}
}
}
Results in:
....
{
"orgUnit8No": "A1000AD",
"orgUnit1": 1000,
"name": "Christine XXXXXXX XXXXXXXXXX",
"joindown_OrgUnit1_via_OrgUnit8": {
"items": null
}
When orgUnit1 = 1000 then it also should be able to get the name from orgUnit1 in the joindown?
Florian
Hi Florian
I suppose you are looking for the name of orgUnit1 connected to each orgUnit8No?
In that case this would be a joinup:
query Check_orgUnit ($cid: Int) {
useCompany(no: $cid){
orgUnit8(sortOrder: {createdDate: ASC _thenBy: {createdTime: ASC}})
{
items {
orgUnit8No
name
orgUnit1
joinup_OrgUnit1{
name }
}
}
}
}
With a result something like this:
{
"data": {
"useCompany": {
"orgUnit8": {
"items": [
{
"orgUnit8No": "ABC",
"name": "Alfa",
"orgUnit1": 11,
"joinup_OrgUnit1": {
"name": "Kurs"
}
},
{
"orgUnit8No": "BCD",
"name": "Beta",
"orgUnit1": 12,
"joinup_OrgUnit1": {
"name": "Kiosk"
}
}
]
}
}
}
Let me know if I totally misinterpreted the question, it is sometimes a bit difficult to understand the context.
Øyvind
Thank you, that was exactly what we wanted. I see, we used the wrong joining path - sorry
Copyright © 2022 Visma.com. All rights reserved.