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.0044 is available as of 06-20-2024! Check the Downloads Discussion for the release notes and to get the latest version.
Grooper 23.1.0024 is available as of 09-03-2024! Check the Downloads Discussion for the release notes and to get the latest version.
How do you pull the value of a text field from another field?
ThunderMenOKC
Posts: 3 ✭
Can I use a Default Value Expression or some other solution to pull a text value from a parent object's Data Field value?
I see examples of how to pull an integer value from a parent object using Calculate Expression (ParentInstance.ParentSection.Tables("SourceTable").SumOf("SourceColumn") but Calculate Expression only works for integer values so I assume I need to use a Default Value Expression.
*The data field value I need is not nested in a table. It is just a member of the data model.
I see examples of how to pull an integer value from a parent object using Calculate Expression (ParentInstance.ParentSection.Tables("SourceTable").SumOf("SourceColumn") but Calculate Expression only works for integer values so I assume I need to use a Default Value Expression.
*The data field value I need is not nested in a table. It is just a member of the data model.
0
Answers
Product Manager
mharrison@bisok.com
Product Manager
mharrison@bisok.com
ParentInstance.DocumentInstance.FindChild("Parent Field Name", True).Value
This will work from any level in the data model. I tested it from various levels within the data model.
The above solution will work in this scenario but I'm wondering if we could give you an easier solution than needing to script the value into the field. One of us may be able to offer an alternate solution based on your extraction goals.
What is it that you are trying to accomplish by referencing a parent field? Please provide a screenshot of your data model if you'd like a few suggestions from us.
Grooper on!
I have an import watcher picking up emails from a mailbox. Each email has attachments (PDFs and Excel documents). My goal is to take the subject line of the email and tie that value to each attachment, so when I do a document export each attachment has a metadata file with containing the email subject line as a value in the metadata file. These files will be consumed by a downstream application.
Currently, I am successfully picking up the email via the import watcher and I am extracting the email subject into a field that I am calling "API_Number". I am using the following Default Value Expression to extract the subject from the email: DirectCast(Handler, MailMimeTypeHandler).Subject into API_Number. This is working perfectly.
I am now attempting to assign the value in API_Number to all of the email attachments / sub-elements below the email object. Actually, the way I am approaching solving this is to pull the API_Number value from the root object / email's API_Number into a data element on each attachment.
When I use the script you provided ( ParentInstance.DocumentInstance.FindChild("API_Number", True).Value) in a calculate expression. It sets the value of "ParentAPI" field to the value of API_Number on the email object (both fields on the same object), but it does not set the value on the attachments (child objects of the email).
See pictures below showing the data being extracted on the email object, but not on the attachments / child objects:
Thank you. I am also open to other ways of solving this.
Try this
Variable = SumFieldInstance("Parent name\child level 1 name\child level 2 name\variable name") + SumFieldInstance("Parent name\child level 1 name\child level 2 name\variable name")