Setting radio field value from workflow action

4 views
Skip to first unread message

Mark Orciuch

unread,
Apr 30, 2021, 6:17:09 PM (12 days ago) Apr 30
to dotCMS User Group
Hello,

I have a radio field with the following values:

None|None
Approved||Approved
Denied|Denied

I am trying to set the value of the field in Velocity Script Actionlet as follows followed by Save content sub-action:
$content.setProperty("decision.selectValue", "Approved")
or
$content.setProperty("decision", "Approved")

This does not work and the field value remains unchanged. Any help with resolving this will be much appreciated. Many thanks in advance.

jonathan...@dotcms.com

unread,
May 1, 2021, 5:12:01 PM (11 days ago) May 1
to dotCMS User Group
Hi Mark

You have to use the velocity var name for the property on the content type
and finally, you have to include a Save Actionlet after the Velocity Script Actionlet

Mark Orciuch

unread,
May 2, 2021, 12:36:57 PM (10 days ago) May 2
to dotCMS User Group
Hi Jonathan,

This is exactly what I'm doing. I changed the field type to select and it works fine when using "$content.setProperty("decision", "Approved")".
Reply all
Reply to author
Forward
0 new messages