Can anyone tell me how to cast a java.lang.String to com.dms.scripting.wrappers.PartWrapper. I need my script to make selections in a multi-select workspace connect pick list with data from a single line text field. Can this be done?
Solved! Go to Solution.
Solved by jared.sund. Go to Solution.
Brian,
If I understand you correctly then yes.
You are looking to use data from a single line text field to make selection entries in multi-select linked picklist?
A multi-select picklist is an array field, so you need to put your single line text into an array then use that array to update the multi-select picklist.
Key is that your single line text must match exactly available entries in the linked picklist.
Hope that helps.
Bob D
Brian,
Can you try the following?
for (var reqTests in item.REQUIRED_TESTS)
{
item.REQUIRED_TESTS[reqTests].MARKET_ASSIGNED_TO.add(item.MARKET_SEGMENT);
}
multi-select lists contain 3 functions: add(), remove(), and contains(). So you should be able to simply add the new item without building out an additional array. The functions are also intellegent, such that you don't have to check for duplicates with adding items, or check for existance when removing items.