cancel
Showing results for 
Search instead for 
Did you mean: 

Adobe form - PCR - field dynamically populated is not being stored

Former Member
0 Kudos

Hi experts,

We're working with PCR and developed an Adobe Form for this. The form has some editable fields and some others which are not editable but automatically populated with some scripts in the FORM:READY event of each of these fields.

The issue we are facing is that, if the user doesn't enter any data in the editable fields and press the Send button, it seems to be that the form "doesn't realizes" that some data has changed anyway (the automatically populated fields data), and this data is not stored. So, when the next approver opens the form, he sees those fields empty.

In the case that the user writes anything on the editable fields, then the form works properly: the automatically populated fields data is correctly stored and the next approver can see it on each field.

Does anyone had this problem before or have any idea on how to handle it???

Many thanks in advance,

Dani

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Dani,

Why don't you have a direct data binding to the fields in which data has to be populated automatically rather than doing it through scripts in the Form:Ready event?

If your this is the only acceptable scenario, then try the data populating scripts in the INITIALIZE event of the subform.

Thanks & Regards,

Sanoosh

Answers (2)

Answers (2)

RalfRuth
Employee
Employee
0 Kudos

Hi Dani,

Try this: Add

event.target.dirty = true;

to the form:ready event.

Ralf

Former Member
0 Kudos

Hi Ralph,

Thanks for your help! I tried to add the script you mentioned but it didn't work neither.

Finally, they solved the issue by adding some operations to our Z Back-End Service in the Process, each operation linked to a date field.

Then, on each operation method, the corresponding date field is populated to sy-datum.

And finally, in the Adobe Form field, the following JavaScript was written in the initialize event, in order to trigger the corresponding operation:


if ( xfa.record.FORM_SCENARIO_STAGE.DATA.FIELD.value == "SCL_LINMGR" ){
	xfa.record.CONTROL_PARAM.ISR_EVENT.value = "USER_EVENT_CHECK";
	ContainerFoundation_JS.SendMessageToContainer(event.target, "submit", "", "", "", "");
}else{
	this.rawValue = this.rawValue;
}

Thanks to all of you for all your help!

Dani

chintan_virani
Active Contributor
0 Kudos

Looks a configuration issue to me. Please recheck it in SPRO.

Former Member
0 Kudos

Hi Sanoosh and Chintan,

Thanks to both of you for your quick responses!

@Sanoosh:

I have data bindings in these fields, but the fact is that what i need to store in these fields are the dates in which the form is submitted in each step. So, I cannot calculate it previously in a back end service and send these fields with the data filled, because I don't know when each approver will sumbit the form.

I've tried your suggestion of placing the script in the INITIALIZE event (and also in many other events) but didn't succeed

Thank you anyway!

@Chintan:

I don't know what exactly I should look in SPRO... Could you please give me more detail?

Tanks a lot!

Dani

Former Member
0 Kudos

Hi Sanoosh and Chintan,

Thanks to both of you for your quick responses!

@Sanoosh:

I have data bindings in these fields, but the fact is that what i need to store in these fields are the dates in which the form is submitted in each step. So, I cannot calculate it previously in a back end service and send these fields with the data filled, because I don't know when each approver will sumbit the form.

I've tried your suggestion of placing the script in the INITIALIZE event (and also in many other events) but didn't succeed

Thank you anyway!

@Chintan:

I don't know what exactly I should look in SPRO... Could you please give me more detail?

Tanks a lot!

Dani