I have a checkbox that is populated via a script (if a picklist says one of two values it writes the checkbox to true otherwise it makes it false). This checkbox is then derived into another workspace. I can derive the checkbox if I don't have the script determine the value in the workspace it is derived from. However, if I do use the script to fill it in, the script errors and returns:
java.lang.String cannot be cast to java.lang.Boolean
I'm not sure why I am getting this error since I am able to use "item.FIELD_ID = true" and "item.FIELD_ID = false" with no issues if I am not deriving the field.
Have you gotten a resolution to this? I'd be interested to see what your script looks like. We use scripting quite a bit to see if certain records have specific values. If so, we have check-boxes fill via the script.
Using a single selection linking picklist, I cannot reproduce your issue. If I run my on-demand script, there is no issue with setting the checkbox value to true via a script. Please share script code and linking picklist definition for review.
Regards,
Hello,
Using a single selection linking picklist, I cannot reproduce your issue. If I run my on-demand script, there is no issue with setting the checkbox value to true via a script. Please share script code and linking picklist definition for review.
Regards,
I finally was able to duplicate the issue after using a derived checkbox field. Is this your configuration?
Thank you,
Katelyn,
Since you are deriving the checkbox, you have access to the pivot. Why don't you try getting the value directly through the pivot / picklist in your script? In other words, you could do item.LINK_PL.CHECKBOX = item.PIVOT.SOURCE.
Thank you,