- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2024 08:27 AM
Hi,
I need help on how to create a catalog client script to convert a list variable containing values from a table to a string and will be used as part of a single line text variable.
Details:
I have a list variable calling from core_country.list which displays the values from 'name' column.
users could select multiple values.
The requirement is to copy the selected values (countries) to a single line text field, separated by commas.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2024 09:53 AM - edited 04-05-2024 09:54 AM
@alberttagle Please follow the below steps to populate the values to the string field.
1. OnChange client script for list collector
2. Create and call the script include in client script,
3. Finally the result of cascading the values to string field.
Note: Kindly ignore the "Alerts" which I have used for testing it.
Please mark this as helpful and accept it as a solution if this resolves your query.
Thanks,
Sujatha V.M.
Sujatha V.M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2024 09:53 AM - edited 04-05-2024 09:54 AM
@alberttagle Please follow the below steps to populate the values to the string field.
1. OnChange client script for list collector
2. Create and call the script include in client script,
3. Finally the result of cascading the values to string field.
Note: Kindly ignore the "Alerts" which I have used for testing it.
Please mark this as helpful and accept it as a solution if this resolves your query.
Thanks,
Sujatha V.M.
Sujatha V.M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2024 10:52 AM
Hi, Sujatha.
Thanks for this, I need to add some conditions and other variables in conjunction with the above. I tried to do the below but it's giving me an error.
Can you pls advise how do I add this to the script include?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2024 11:29 AM
Remove the lines 14 and 15 inside the function response and move it above line 4.
Please mark this as helpful and accept it as a solution if this resolves your query.
Thanks,
Sujatha V.M.
Sujatha V.M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2024 12:06 PM - edited 04-05-2024 12:37 PM
I can't get it to work, I removed my condition and I tried using just your scripts as they were to see if they work and only changed the variable names.