top of page
OmniStudioFactBg.png
  • Writer's picturePuja Kumari

Passing Data From Parent to Child FlexCard

Updated: Mar 9, 2023


We can pass the data from parent to child Flexcard in two ways:

  1. Using Data Node

  2. Using Attributes


Using Data Node: To use the parent FlexCard’s data source in the child FlexCard, perform the following tasks:

  • Confirm that the fields you want to populate in the child FlexCard are available in the parent FlexCard's data source.






  • After adding the child FlexCard inside the parent FlexCard with the data source, click on the Data Node field and select a data set to pass to the child FlexCard. For example: {record}


  • Through the data node, we can also trim the JSON node and send the data to the child card using {record.ParentFlexcardNodePassed}. For example: {record.DiagnosisDescription}

  • Again from the child card, we can pass the data to the next child card as shown in the image below. In this way, we can pass the data from parent to child on multiple levels.


  • In the child card, we can directly access the parent node. For example: {DiagnosisDescription}

NOTE: The child FlexCard data source is ignored. The parent data source populates the values on the child FlexCard.

Using Attributes:

To pass the data from the parent FlexCard to a child FlexCard using Attributes perform the following tasks:

  • Parent FlexCard will have the data source as below:


  • Once we add the child FlexCard into the parent FlexCard, click on the link + Add New in the Attributes section in the element properties and enter the attribute name and value to be passed. For example: view = {isView}


  • To access the data in the child FlexCard, we have to use {Parent.AttributeName} For example: {Parent.view}




Limitations:

We cannot pass an array of records to the child FlexCard using Attributes.

Node

Description

{records}

Send All Data

​{records[#]}

Send all the data of a specific record. {records[0]} = first record. {records[1]} = second record. And so on.

{record}

Send just the current record's data, such as when Repeat Records is disabled in the Setup panel so that only one record is returned.

{record.FieldName}

Send a record object. For example, if {record.Product} is an object or array with additional data, select it. But, if you want to send a data field, use the Attributes property.

{record.attributes}

Send all Attributes for the current record.



References:



9,958 views1 comment

Recent Posts

See All
OmniStudioFactFooterBg.png
logo.png

OmniStudiofacts helps us to build a Vlocity/OmniStudio Tech Community which focuses on sharing technical skills and experience across the globe.

© 2023 by OmniStudioFacts.

bottom of page