# Groovy Script in output field operation in 6.2

**URL:** https://community.ofelia.com/t/groovy-script-in-output-field-operation-in-6-2/4316
**Category:** Q&A
**Created:** [27 March 2014 18:49 UTC](https://community.ofelia.com/t/groovy-script-in-output-field-operation-in-6-2/4316 "2014-03-27T18:49:10Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![nsaintaubert](https://avatars.discourse-cdn.com/v4/letter/n/df788c/32.png) [@nsaintaubert](https://community.ofelia.com/u/nsaintaubert)
#### Post date: [27 March 2014 18:49 UTC](https://community.ofelia.com/t/groovy-script-in-output-field-operation-in-6-2/4316/1 "2014-03-27T18:49:10Z")

</div>

Hi,

I have been migrating from 6.0 to 6.2.

In 6.0,

in a field output operation i have a process (object) variable modified via a setter function:

p\_solicitud.setSociedad(field\_sociedad);  
 return "";

It devolves a empty string as output operation. It does work (p\_solicitud is actualized).

In 6.2.5, this does not work, the p\_solicitud object isn t actualized.

&nbsp;What do i miss in the migration ?

Best Regards

---

<div class="post-metadata">

### Author: ![Pierre-yves\_Monnet](https://avatars.discourse-cdn.com/v4/letter/p/8edcca/32.png) [@Pierre-yves\_Monnet](https://community.ofelia.com/u/Pierre-yves_Monnet)
#### Post date: [1 April 2014 13:30 UTC](https://community.ofelia.com/t/groovy-script-in-output-field-operation-in-6-2/4316/2 "2014-04-01T13:30:49Z")

</div>

hello,

all script executed in a Groovy script CAN’T UPDATE any information. It was a security issue in 6.0, solve in 6.2  
You have to design now your application taking into account that the groovy script only return information, and never set any thing.  
In your output operation, you shoud do in your groovy :

return field\_sociedad

and then in the form, output operation, match this value to the variable p\_solicitud.  
looking to your code, it’s seem p\_solicitud is an Java object, where you want to call the method setSociedad(). So, give p\_solicitud as the variable, and click on the link “take value of”. A pop up windows will prompt you. Select “java method” : all the method is then show, select your method “setSociedad”

---

<div class="post-metadata">

### Author: ![rafael.vianna](https://avatars.discourse-cdn.com/v4/letter/r/8e7dd6/32.png) [@rafael.vianna](https://community.ofelia.com/u/rafael.vianna)
#### Post date: [27 March 2014 20:48 UTC](https://community.ofelia.com/t/groovy-script-in-output-field-operation-in-6-2/4316/3 "2014-03-27T20:48:54Z")

</div>

Hi nsaintaubert,

Have you tried just erasing your code and re-typing that?

I'm asking this (sounds like) stupid question because sometimes migration tools left some crap int the code. Saw it happens a few times.

Best regards,

---

<div class="post-metadata">

### Author: ![nsaintaubert](https://avatars.discourse-cdn.com/v4/letter/n/df788c/32.png) [@nsaintaubert](https://community.ofelia.com/u/nsaintaubert)
#### Post date: [28 March 2014 11:21 UTC](https://community.ofelia.com/t/groovy-script-in-output-field-operation-in-6-2/4316/4 "2014-03-28T11:21:56Z")

</div>

Hi Rafael,

thanks for your answer, but unfortunatly re-typing the code doesnt work.

Any other idea?
