Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Verified Answer
Replies
4 replies
Subscribers
12 subscribers
Views
5645 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Best Practices
When I should use nested fields and when I should avoid it?
oksanak
over 6 years ago
What are the cases to use nested fields?
Discussion posts and replies are publicly visible
Parents
+1
arikd398
over 6 years ago
Hi
oksanak
,
Nested fields you mean to say nested CDT's right ?
In that case below are the use cases where opting for nested CDT's might help.
1.When you have a parent and child relationship CDT's be it one to one or one to many.
docs.appian.com/.../CDT_Relationships.html
Lets take a simple example of employee and its department.
So inorder to fetch the employee data along with his position and department, you can create a view joining both the employee and department table or else you can go for the nested CDT's
There is no need for creation of view if we use nested cdt.
2.We can fetch data of child cdt from parent cdt
Let’s say that our employee CDT was nested, with department and title living in a nested position CDT. When we go to query the data our expression would look something like this:
a!querySelection(columns: {
a!queryColumn(field: "firstName"),
a!queryColumn(field: "lastName"),
a!queryColumn(field: "position.department"),
a!queryColumn(field: "position.title")
}
)
The alias parameter in a!queryColumn() can be used to make referring to nested values easier in an interface expression.
docs.appian.com/.../Adapt_a_SAIL_Recipe_to_Work_with_My_Applications.html
But It has much more limitations than advantages:
1. Debugging of process instance is much difficult.
2. We can't give a name of column in master table.
3. Unnecessarily we need to fetch child table data
and many more disadvantage So View is much better approach than nested cdts.
Some more issues could lead into complex looping when you are working in Nested CDTs which would potentially lead to High health checks. However it varies from case to case.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Reject Answer
Cancel
Reply
+1
arikd398
over 6 years ago
Hi
oksanak
,
Nested fields you mean to say nested CDT's right ?
In that case below are the use cases where opting for nested CDT's might help.
1.When you have a parent and child relationship CDT's be it one to one or one to many.
docs.appian.com/.../CDT_Relationships.html
Lets take a simple example of employee and its department.
So inorder to fetch the employee data along with his position and department, you can create a view joining both the employee and department table or else you can go for the nested CDT's
There is no need for creation of view if we use nested cdt.
2.We can fetch data of child cdt from parent cdt
Let’s say that our employee CDT was nested, with department and title living in a nested position CDT. When we go to query the data our expression would look something like this:
a!querySelection(columns: {
a!queryColumn(field: "firstName"),
a!queryColumn(field: "lastName"),
a!queryColumn(field: "position.department"),
a!queryColumn(field: "position.title")
}
)
The alias parameter in a!queryColumn() can be used to make referring to nested values easier in an interface expression.
docs.appian.com/.../Adapt_a_SAIL_Recipe_to_Work_with_My_Applications.html
But It has much more limitations than advantages:
1. Debugging of process instance is much difficult.
2. We can't give a name of column in master table.
3. Unnecessarily we need to fetch child table data
and many more disadvantage So View is much better approach than nested cdts.
Some more issues could lead into complex looping when you are working in Nested CDTs which would potentially lead to High health checks. However it varies from case to case.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Reject Answer
Cancel
Children
No Data