Grooper 21.00.0082 is available as of 12-12-2023! Check the Downloads Discussion for the release notes and to get the latest version.
Grooper 23.00.0042 is available as of 03-22-2024! Check the Downloads Discussion for the release notes and to get the latest version.
Grooper 23.1.0018 is available as of 04-15-2024! Check the Downloads Discussion for the release notes and to get the latest version.
Options
Is there a way to use fields from a parent section in a data model to calculate a field.
Aston
Posts: 17 ✭
For example,
ParentSection
ParentField
ChildSection
ChildField
Could I somehow use IIF(ParentField="string", 1, 0) as a calculation for ChildField, because right now I can't reference parent fields in the calculation? I can only reference other ChildSection fields.
ParentSection
ParentField
ChildSection
ChildField
Could I somehow use IIF(ParentField="string", 1, 0) as a calculation for ChildField, because right now I can't reference parent fields in the calculation? I can only reference other ChildSection fields.
Tagged:
0
Best Answer
-
Optionsjclark Posts: 60 ✭✭✭@Aston
Setting your calculate expression to: ParentInstance.ParentSection.Fields("IN Product Code").Value
should correct your issue. As we are referencing the field name directly we should be using the exact spelling of the name and should not need to use underscores instead of spaces, also the "N" should be capitalized in the field name as well.
As you can see in the updated screenshots below the Child Section with the underscores does not work but the Child Section 2 without underscores does.
5
Answers
However, I see a note that the article is still in progress and traversing the data model's hierarchy is one of the things needed. @Brian is this something you could help with in the mean time?
Product Manager
mharrison@bisok.com
@Aston
Does this Calculate Expression help with your issue of not being able to reference Parent Fields?
Below is the output showing that the value from the ParentField from the Parent Section can be referenced to populate the ChildField in the Child Section.