We are trying to build a namedQuery for the CostObject where we want to have a list "Persons" that list the names of the related persons, no matter if they are related to a project or to an order.
A CostObject only can be related to a project OR an order.
We are able to build this as two separate "Multi records expressions", but since they cannot have the same name, we can not call both "Persons". Another possibility would be if you could hide the upper level from the json result, but we have not been able to do this either.
The ProjectPerson and the OrderPerson related to the same Person Entity.
Any suggestions?
Best Answer
S
Subham Dixit
said
about 2 years ago
Step 1 - I've setup this very simplified model:
Step 2 - I create in the Name query a Property "Person" :
This property is calculated with the following Value Expression expression:
Case when any Orderses has (1=1)
then lookup
string_agg PersonID
separated by ','
from Orderses.Person
end
else lookup
string_agg PersonID
separated by ','
from Projects.Person
end
end
It allows to extract in a single field the all the persons related by a project or by an order, separated by ','.
I don't think you can fins a solution to calculate a Multi Record Expression (you cannot use SemQL for Multi-record expression).
1 Comment
S
Subham Dixit
said
about 2 years ago
Answer
Step 1 - I've setup this very simplified model:
Step 2 - I create in the Name query a Property "Person" :
This property is calculated with the following Value Expression expression:
Case when any Orderses has (1=1)
then lookup
string_agg PersonID
separated by ','
from Orderses.Person
end
else lookup
string_agg PersonID
separated by ','
from Projects.Person
end
end
It allows to extract in a single field the all the persons related by a project or by an order, separated by ','.
I don't think you can fins a solution to calculate a Multi Record Expression (you cannot use SemQL for Multi-record expression).
Subham Dixit
We have this kind of setup in the datamodel :
We are trying to build a namedQuery for the CostObject where we want to have a list "Persons" that list the names of the related persons, no matter if they are related to a project or to an order.
A CostObject only can be related to a project OR an order.
We are able to build this as two separate "Multi records expressions", but since they cannot have the same name, we can not call both "Persons". Another possibility would be if you could hide the upper level from the json result, but we have not been able to do this either.
The ProjectPerson and the OrderPerson related to the same Person Entity.
Any suggestions?
Step 1 - I've setup this very simplified model:
Step 2 - I create in the Name query a Property "Person" :
This property is calculated with the following Value Expression expression:
It allows to extract in a single field the all the persons related by a project or by an order, separated by ','.
I don't think you can fins a solution to calculate a Multi Record Expression (you cannot use SemQL for Multi-record expression).
Subham Dixit
Step 1 - I've setup this very simplified model:
Step 2 - I create in the Name query a Property "Person" :
This property is calculated with the following Value Expression expression:
It allows to extract in a single field the all the persons related by a project or by an order, separated by ','.
I don't think you can fins a solution to calculate a Multi Record Expression (you cannot use SemQL for Multi-record expression).
-
Extend a model with new entities or attributes
-
Data types in xDM
-
Effective date on entities
-
Search using wild cards
-
Export a model from production and import on a development environment
-
"Allow Delete" vs "Allow Removal" privileges
-
LOV label in Named Query
-
Select location on a map and save coordinates
-
Is there a way to set up a master-detail relationship on browse mode?
-
Choose Either a Stepper or A Workflow Based on The User Privileges
See all 263 topics