Zoho Deluge: Push Multi-Select Picklist containing Commas from CRM to Creator

A very quick article on how to push a multi-select picklist from CRM to Creator.

We're trying to create a record in Creator off a button on the CRM Potential/Deal record. The CRM module has a multi-select picklist which will use commas to delimit but one of the options has a comma in its value.
// What I have in CRM:
{"My_MultiPicklist":["Option1","Options 2, 3"]}

// What Creator understands: FAILS
{"My_MultiPicklist":["["Option1","Options 2, 3"]"]}
With workaround .toString()
// What Creator understands: FAILS
{"My_MultiPicklist":["Option1","Options 2"," 3"]}

So the way to push this value over to Creator is by converting the list to a string... notably comma delimited:
// Reading CRM:
l_MyMultiPicklist = List:String();
l_MyMultiPicklist.add("Options 2, 3");

// Push to Creator:
m_CrmFields = Map();
m_CrmFields.put("My_MultiPicklist": l_MyMultiPicklist.toString(","));

// Yields ERROR: Failure, Invalid column value \"Options 2, 3\" specified
// i.e. Cannot match picklist option in Creator (Options 2 is split from 3)

Solution: In the Creator picklist/dropdown options, change any comma to , then in your CRM code to create the record in Creator:
l_MyMultiPicklist = List();
for each r_PicklistOption in r_DealDetails.get("My_MultiPicklist")
	v_PicklistOption = r_PicklistOption.trim().replaceAll(",", ",",true);

// Yields: SUCCESS: Note the "," will display as a comma in both Creator and CRM.

Related Articles

Joes Revolver Map


Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Donate to Joel Lipman via PayPal

Donate to Joel Lipman with Bitcoin - Valid till 8 May 2022 3QnhmaBX7LQSRsC9hh6Je9rGQKEGNQNfPb
© 2021 Joel Lipman .com. All Rights Reserved.