Expand my Community achievements bar.

SOLVED

Bi-directionally sync multi-select dropdown/picklist field values

Avatar

Level 10

Hi Fusion Community,

 

We have field called 'Service Area' in our Salesforce Org.  It is a (single select) picklist field, but is changing to a multi select picklist field.  This field currently syncs data bi-directionally (SFDC --> WF and WF --> SFDC) to a related Service Area field on a program custom form in Workfront.

 

It's looking like I need to change my Workfront field from a dropdown field to a text field to house what's coming from Salesforce if more than one value is being passed (e.g. Strategy, Implementation, Assessment).  However, making the Workfront Service Area field a text field leaves us open to data quality issues if someone updates these values in Worfkront, and inputs an incorrect value, and the system then needs to sync data back to Salesforce.

 

Is there anything in Fusion I can do whereby I can keep both Service Area fields in each system as multi select picklists and still pass data bi-directionally (e.g. parse incoming data into an array and map each value to the existing values predefined in each systems' field)?

 

Thanks!
Nick

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hello Nick,

 

Sorry, I think I accidentally posted the wrong expression...

This is my setup of the module:

 

lgaertner_0-1712594616271.png

 

I'll keep my fingers crossed that it works for you.

 

Regards

Lars

View solution in original post

9 Replies

Avatar

Community Advisor

Nick

 

I'm not sure why you need to change the WF field to a text field? You can have a dropdown be multiselect in Workfront, or you could use a checkbox field as well.

Avatar

Level 10

Hey Chris - 

The data coming in from Salesforce is one bug clump of many values separated by semicolons:

NickVa1_0-1712413421912.png

 

When Fusion goes to map this data to the multi select dropdown field in Workfront (Service Area), it looks at the massive clump of values coming from Salesforce as one value and tries to find the related value in my Workfront Service Area field.  

 

I need it to parse out all of the semicolon separate values and then go and find and select its sister value in my Workfront Service Area field.  All the same values exist in the Service Area field in both systems.

Avatar

Level 10

Hello Nick,

 

You could use the Match pattern module from the App Text Parser.

 

Using the pattern (?values.[^;"]+|("[^"]*")+) and checking Global match will provide you with each value separated by a semicolon. 

In the next step you should use an Array aggregator and in your final Update Record module, you just need to map your array by value

 

{{map(171.array; "value")}}

 

 

Regards

Lars

Avatar

Community Advisor

If you pass the string thru a split(;{your field};;), then it should give you an array, then you should be able to map it directly. Note, put the semicolon you want to use for the split in before anything else, or fusion will think it's part of the code and it won't work. (There shouldn't be the grey box around it) 

Avatar

Level 10

Thanks, Chris and Lars.

I've tried both without success so far.  

 

Lars, this is what I got when using Text Parse Match Pattern:

NickVa1_0-1712594033546.png

 

This is how I set it up:

NickVa1_1-1712594083403.png

 

 

Chris, here's what I'm getting when I try your method:

NickVa1_2-1712594128226.png

 

 

This is how I set it up:

NickVa1_3-1712594143844.png

 

Might I have misinterpreted some of the direction?
Thanks!

Avatar

Correct answer by
Level 10

Hello Nick,

 

Sorry, I think I accidentally posted the wrong expression...

This is my setup of the module:

 

lgaertner_0-1712594616271.png

 

I'll keep my fingers crossed that it works for you.

 

Regards

Lars

Avatar

Community Advisor

Nick, glad you got it working!

 

For future readers, I mistyped the formula, there was an extra semicolon in the beginning. It should have looked like this.

ChrisStephens_0-1712604601642.png