Problem with replaceitemvalue

Hi,

Am having a problem getting replaceitemvalue to work.

I have a java agent that seems to work well. It creates documents and saves them to a view(through a viewentrycollection). I use the method replaceitemvalue(input, "TEST INPUT) to replace the input field, when the document is created. I then save the document using doc.save(true, true).

When the document is saved, I can see that an entry has been created in the view. The view has a column named ‘input’ that I am using to pull the input field from the underlying form.

But the input field is blank!!!

I don’t understand why, when the documents are being created and the input field is being populated by the java agent.

Please help.

Many thanks,

Marise

Subject: Problem with replaceitemvalue

This issue has been solved. I was not aware that I had to set the Form field i.e. doc.replaceitemvalue(“Form”, “formname”) and specify the form I wish to use.

Subject: An input called input

Personally I wouldn’t use ‘input’ as the name of a field on a form that I was going to display in a browser where all fields are inputs…

From what you say ReplaceItemValue is doing exactly what it says in the help

The view has a column named ‘input’ that I am using to pull the input field from the underlying form.

And how are you doing this?

Subject: RE: An input called input

Hi Gerry,

I agree - I will change the field name. Yes I know it’s exactly as in the help, but I don’t understand why I can’t see the data in the document.

To answer your question: I have a view, view1 that has a View Selection formula (Select (Form=“form1”)), input is a field on form1. I create a column in view1, give it a title of ‘input’ and assign the field ‘input’ which shows up in the list of available fields to this column. So, ideally I would imagine I should be able to see the data in all the input fields which are being populated by the java agent using replaceitemvalue. But this is not the case.

Any ideas? Thanks.

Subject: RE: An input called input

If you have verified that your “input” field does have a value, also check that the field is also set to “SUMMARY” (under Field Flags). Only these fields can have their data displayed in views.

If your ‘input’ field is NOT set this way, you can set the field to SUMMARY by setting it through the setSummary method in the Item class.

hope that helps