# How to sync and map a component value to Select List (cascading) field

**URL:** <https://community.exalate.com/t/how-to-sync-and-map-a-component-value-to-select-list-cascading-field/4472>\
**Category:** General Questions\
**Tags:** exalate, usecase, migrated\_question\
**Created:** [November 4, 2024, 7:00am UTC](https://community.exalate.com/t/how-to-sync-and-map-a-component-value-to-select-list-cascading-field/4472 "2024-11-04T07:00:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 7:00am UTC](https://community.exalate.com/t/how-to-sync-and-map-a-component-value-to-select-list-cascading-field/4472/1 "2024-11-04T07:00:06Z")

</div>

_Originally asked by Helen Li on 26 November 2020 [(original question)](https://oldcommunity.exalate.com/questions/20122378)_

* * *

Dear sir,

I want to know how to sync the customer’s components and map them to my Select List (cascading) field “FunctionGroup”.

I search the doc, no such examples, could you please help me? Thanks in advance.

| Map fields | |
| --- | --- |
| Customer JIRA instance | My JIRA Instance |
| Component/s | FunctionGroup Parent field |
| HW | Hardware |
| Cluster | Cluster |
| Infra | Infra |
| BSP | BSP |
| Android-HAL | IVI |
| Audio | Audio |
| MCU | VIP |
| SRS | SYS |
| aaaa | Other |
| bbbb | |
| cccc | |
| dddd | |
| …. | |

* * *

---

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 7:00am UTC](https://community.exalate.com/t/how-to-sync-and-map-a-component-value-to-select-list-cascading-field/4472/2 "2024-11-04T07:00:07Z")

</div>

_Answer by Francis Martens (Exalate) on 27 November 2020_

Cascading fields are documented in [Syncing cascading select custom fields](https://docs.idalko.com/exalate/x/bwSOAQ)

**Incoming Sync - Target Jira - Untested**

```auto

// get the first component out of the components list sent over from the customer jira
def remoteComponentName = replica.components?.first().name

// component map allows to map the name of the component to the local value
def componentMapping = [
    // "remote component name" : "target parent"
    "HW" : "Hardware",
    "Cluster" : "Cluster",
    "Android-HAL" : "IVI",
]

// Find the mapped value, default to 'Hardware'
def targetValue = componentMapping[remoteComponentName] ?: "Hardware"

def parent = nodeHelper.getOption(issue, "FunctionGroup", targetValue)
issue.customFields."FunctionGroup".value = nodeHelper.getCascadingSelect(parent,"")

```

Let me know if this helps

* * *

#### Comments:

> **Helen Li commented on 30 November 2020**
>
> > Greate. Thanks so much.

---

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 6, 2024, 7:00am UTC](https://community.exalate.com/t/how-to-sync-and-map-a-component-value-to-select-list-cascading-field/4472/3 "2024-11-06T07:00:35Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
