Question
Sytel Reply
IT
Last activity: 21 May 2024 5:39 EDT
Pega Constellation - How to create nested field group
Hi, Using the new constellation architectture I've a question about how to create a nested field group.
Let's have an example.
In traditional architecture I could've a nested list of 3 level (like List.ChildList.GrandChildList). And using Section I could represent using Repeating Dynamic Layout, within other Repeating Dynamic Layout for each level.
Now RDL are gone in constellation architecture. We use field group of Embedded Data. Testing I only manage to represent one level. How can I have nested field group?
Thanks
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 16 May 2024 10:51 EDT
Capgemini
AT
This functionality is possible in Constellation and App Studio. We have built something similar in a recent PoC. As long as your Data Model is configured appropriately, your UI and Views will be able to reference and render it correctly.
First, you need to create a Data Type (A) that you embed/reference in the Data Model of your Case type as a list. Then create another Data Type (B) that is embedded/referenced as type List in Data Type (A). You can continue in that way to create a Data Type (C) and embed in Data Type (B), etc.
What is important to make this available as field groups is to create form-type (editable) views in the UX Tab of the data types directly so that they can be referenced correctly. This should then allow you to find the views for the embedded PageList properties in the view configurator.
Depending on whether you use embedded data or referenced data will give you different options.
This can be done in DEV and APP Studio.
I hope this helps
Updated: 16 May 2024 10:51 EDT
Pegasystems Inc.
CA
I believe you have to build a custom component for nested field groups. I believe your requirement is similar to this post -https://support.pega.com/question/hierarchy-table-constellation
Sytel Reply
IT
@RameshSangiliThanks.
Accepted Solution
Updated: 16 May 2024 10:51 EDT
Capgemini
AT
This functionality is possible in Constellation and App Studio. We have built something similar in a recent PoC. As long as your Data Model is configured appropriately, your UI and Views will be able to reference and render it correctly.
First, you need to create a Data Type (A) that you embed/reference in the Data Model of your Case type as a list. Then create another Data Type (B) that is embedded/referenced as type List in Data Type (A). You can continue in that way to create a Data Type (C) and embed in Data Type (B), etc.
What is important to make this available as field groups is to create form-type (editable) views in the UX Tab of the data types directly so that they can be referenced correctly. This should then allow you to find the views for the embedded PageList properties in the view configurator.
Depending on whether you use embedded data or referenced data will give you different options.
This can be done in DEV and APP Studio.
I hope this helps
Sytel Reply
IT
@EricSchranz90thanks a lot.
That's what is was doing wrong. Looking to do everything from the first level view from Case. Actually I have to create views directly in data model. So I can refer those when I configure the embedded data on the case. Thanks again for your kind help!
Capgemini
AT
Hi, does your list include the option to select / save something from of those child / grandchild list? Or is it read-only? I haven´t been able to submit the form when i have embedded structures in the first level list. It throws an error "invalid request data".
This is my strucure:
- Embedded List ()
- Embedded List ()
- Values that don´t get saved / throw errors.
- Embedded List ()
Thanks !
Sytel Reply
IT
@VictorB17110673 mine was just an example in order to better understand complex case of Constellation. In my example was read only, but I expect that work also with editable nested lists. Your issue it's very strange. Did you try to see with tracer what's going on and why is not saved?
Capgemini
AT
Yes i did. It seems like it´s not properly creating the pages for the 2nd level list. pyWorkpage in the tracer shows that only 1 value of the 2 embedded list gets saved (the last one selected). Everything else gets overwritten.
I´ve tried creating a data transform to create the needed pages manually and the transform does its job but still nothing gets saved and it throws the same error.
From a UI point of view everything works as expected, i can nest the lists and everything gets displayed as you would expect it.
I´ll have to look further into it. Thanks anyways!
Sytel Reply
IT
@VictorB17110673 maybe something went awry with the creation of property. Did you also tried to delete the property and recreate it again?
Capgemini
AT
@VictorB17110673 maybe something went awry with the creation of property. Did you also tried to delete the property and recreate it again?
I did but that didn´t change it. Also tried on different application, it throws the same errors.
Update:
After some trial and error i found out some things. I´m not sure why it is the way it is but this is what i found out.
Whith a data reference (Multi-Select mode) displayed as Field Group everything works as expected and gets saved properly.
However it throws the error when i change the data reference to single select.
In order to save a single select data reference to my case i need to display the embedded data as a table not as a field group. This allows me to put my single select data reference into a column and it now can be saved.
To me this sounds like a bug since the "display as- option should not alter functionality.