Workflow Records - How do I connect the records for field population?
C
Christa Helgeson
started a topic
3 months ago
I have a workflow creating 2 records (Record A and B). I create record A and then want the second record to have a couple of its fields auto-populated from the values in eh first record. I can not sure how to do this.
Best Answer
H
Haashim Jhungeer
said
3 months ago
Hi Christa,
Can you confirm both are on the same entity or are they separate entities?
For the enricher, the key is that Record B needs an input value that allows the enricher to find the correct Record A.
For example, if Record B has a field like RecordAID, RequestID, or CaseID, the enricher on Record B can use that value as an input and then populate the output fields from Record A.
Conceptually, the enricher would be configured like this:
Input:
Record B linking field, for example RecordB.RequestID
So in the SemQL enricher, each target field on Record B would use a SemQL expression that retrieves the corresponding value from Record A, filtered by the shared key.
For example, the expression for a Record B field might be similar to:
RecordA.FieldToCopy
with the enricher filter/lookup condition restricting Record A to:
RecordA.RequestID = RequestID
The exact syntax will depend on the entity names, aliases, and the relationship or shared key available in your model.
If there is no shared field yet, I would first add one, such as RequestID or SourceRecordAID, and populate it during the workflow before opening Record B. Once Record B has that value, the enricher can use it to retrieve the matching Record A and copy the required values.
Then in the stepper/application, configure the Record B form step enricher to run:
On Form Open, so the user sees the values immediately when Record B opens.
Optionally On Data Change, if the linking field can be changed by the user.
Optionally Pre-Validation as a safeguard if the populated fields are mandatory.
So the important point is: the enricher does not automatically know the previous workflow record. It needs a persisted key on Record B that tells it which Record A to read from.
To automatically populate fields in Record B from Record A within a workflow, the recommended approach is to use an enricher on Record B.
The enricher should typically be triggered when the Record B form opens (or on step enter) so that users can immediately see the values populated in the form.
A key prerequisite is that Record A must already be created and saved before Record B is opened. If Record A has not yet been persisted, the enricher will not be able to retrieve its values reliably.
The typical flow is:
User creates Record A.
Record A is saved/submitted when the first task/step is completed.
User opens Record B.
An enricher runs on Record B (Form Open / Step Enter trigger).
The enricher retrieves the required values from Record A (using the relationship or linking field between the two records) and populates the corresponding fields in Record B.
If these values are mandatory, an additional Pre-Validation trigger can also be configured as a safeguard to ensure the fields are populated before Record B is submitted.
Please note that the exact SemQL expression depends on how Record A and Record B are related in the data model.
Thanks, Haashim
C
Christa Helgeson
said
3 months ago
Thank you. My issue is the Enricher. Records A and B are not related (until Record B is created) so I am not sure how to populate the data. Their connection is the workflow, Record A data in any workflow will be used to create Record B.
What is the linking field in this case? Is there a Workflow ID and if so, I am not sure how to write the Enricher.
Thanks,
Christa
H
Haashim Jhungeer
said
3 months ago
Answer
Hi Christa,
Can you confirm both are on the same entity or are they separate entities?
For the enricher, the key is that Record B needs an input value that allows the enricher to find the correct Record A.
For example, if Record B has a field like RecordAID, RequestID, or CaseID, the enricher on Record B can use that value as an input and then populate the output fields from Record A.
Conceptually, the enricher would be configured like this:
Input:
Record B linking field, for example RecordB.RequestID
So in the SemQL enricher, each target field on Record B would use a SemQL expression that retrieves the corresponding value from Record A, filtered by the shared key.
For example, the expression for a Record B field might be similar to:
RecordA.FieldToCopy
with the enricher filter/lookup condition restricting Record A to:
RecordA.RequestID = RequestID
The exact syntax will depend on the entity names, aliases, and the relationship or shared key available in your model.
If there is no shared field yet, I would first add one, such as RequestID or SourceRecordAID, and populate it during the workflow before opening Record B. Once Record B has that value, the enricher can use it to retrieve the matching Record A and copy the required values.
Then in the stepper/application, configure the Record B form step enricher to run:
On Form Open, so the user sees the values immediately when Record B opens.
Optionally On Data Change, if the linking field can be changed by the user.
Optionally Pre-Validation as a safeguard if the populated fields are mandatory.
So the important point is: the enricher does not automatically know the previous workflow record. It needs a persisted key on Record B that tells it which Record A to read from.
Christa Helgeson
I have a workflow creating 2 records (Record A and B). I create record A and then want the second record to have a couple of its fields auto-populated from the values in eh first record. I can not sure how to do this.
Hi Christa,
Can you confirm both are on the same entity or are they separate entities?
For the enricher, the key is that Record B needs an input value that allows the enricher to find the correct Record A.
For example, if Record B has a field like
RecordAID,RequestID, orCaseID, the enricher on Record B can use that value as an input and then populate the output fields from Record A.Conceptually, the enricher would be configured like this:
Input:
RecordB.RequestIDLookup/filter condition:
RecordA.RequestID = RecordB.RequestIDOutputs:
RecordB.Field1 = RecordA.Field1 RecordB.Field2 = RecordA.Field2 RecordB.Field3 = RecordA.Field3So in the SemQL enricher, each target field on Record B would use a SemQL expression that retrieves the corresponding value from Record A, filtered by the shared key.
For example, the expression for a Record B field might be similar to:
RecordA.FieldToCopywith the enricher filter/lookup condition restricting Record A to:
RecordA.RequestID = RequestIDThe exact syntax will depend on the entity names, aliases, and the relationship or shared key available in your model.
If there is no shared field yet, I would first add one, such as
RequestIDorSourceRecordAID, and populate it during the workflow before opening Record B. Once Record B has that value, the enricher can use it to retrieve the matching Record A and copy the required values.Then in the stepper/application, configure the Record B form step enricher to run:
So the important point is: the enricher does not automatically know the previous workflow record. It needs a persisted key on Record B that tells it which Record A to read from.
Thanks,
Haashim
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstHaashim Jhungeer
Hi Christa,
To automatically populate fields in Record B from Record A within a workflow, the recommended approach is to use an enricher on Record B.
The enricher should typically be triggered when the Record B form opens (or on step enter) so that users can immediately see the values populated in the form.
A key prerequisite is that Record A must already be created and saved before Record B is opened. If Record A has not yet been persisted, the enricher will not be able to retrieve its values reliably.
The typical flow is:
User creates Record A.
Record A is saved/submitted when the first task/step is completed.
User opens Record B.
An enricher runs on Record B (Form Open / Step Enter trigger).
The enricher retrieves the required values from Record A (using the relationship or linking field between the two records) and populates the corresponding fields in Record B.
If these values are mandatory, an additional Pre-Validation trigger can also be configured as a safeguard to ensure the fields are populated before Record B is submitted.
Please note that the exact SemQL expression depends on how Record A and Record B are related in the data model.
Thanks,
Haashim
Christa Helgeson
Thank you. My issue is the Enricher. Records A and B are not related (until Record B is created) so I am not sure how to populate the data. Their connection is the workflow, Record A data in any workflow will be used to create Record B.
What is the linking field in this case? Is there a Workflow ID and if so, I am not sure how to write the Enricher.
Thanks,
Christa
Haashim Jhungeer
Hi Christa,
Can you confirm both are on the same entity or are they separate entities?
For the enricher, the key is that Record B needs an input value that allows the enricher to find the correct Record A.
For example, if Record B has a field like
RecordAID,RequestID, orCaseID, the enricher on Record B can use that value as an input and then populate the output fields from Record A.Conceptually, the enricher would be configured like this:
Input:
RecordB.RequestIDLookup/filter condition:
RecordA.RequestID = RecordB.RequestIDOutputs:
RecordB.Field1 = RecordA.Field1 RecordB.Field2 = RecordA.Field2 RecordB.Field3 = RecordA.Field3So in the SemQL enricher, each target field on Record B would use a SemQL expression that retrieves the corresponding value from Record A, filtered by the shared key.
For example, the expression for a Record B field might be similar to:
RecordA.FieldToCopywith the enricher filter/lookup condition restricting Record A to:
RecordA.RequestID = RequestIDThe exact syntax will depend on the entity names, aliases, and the relationship or shared key available in your model.
If there is no shared field yet, I would first add one, such as
RequestIDorSourceRecordAID, and populate it during the workflow before opening Record B. Once Record B has that value, the enricher can use it to retrieve the matching Record A and copy the required values.Then in the stepper/application, configure the Record B form step enricher to run:
So the important point is: the enricher does not automatically know the previous workflow record. It needs a persisted key on Record B that tells it which Record A to read from.
Thanks,
Haashim
Christa Helgeson
They are separate Entities.
Thank you - this helps a lot!
-
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 346 topics