Trying to Modify a Field Value on Design Note

I’ve created an agent based on this example: http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/6bcba983ef6e40d885256d5f000259fc?OpenDocument&Highlight=0,n%3Ftesnotecollection,replaceitemvalue

The purpose of the agent is to find a specific FORM design element in a database, and then modify the default value of a field on the form so that when that form is used, the field displays a new value by default.

(There is method to my madness - but I won’t bore you with the details as to why I am wanting to do this)

In any case, the agent executes and ‘appears’ to set the new field value correctly. To confirm this, I created a second agent that simply uses “GetItemValue” to retrieve the current field value and display it for me in a Messagebox in the Notes UI. I can also see this value if I look at the design properties of the FORM in Designer.

Now for the part that has me confused…

Although this value appears to exist, if I display the form in Notes (i.e., create a new document based on this form) - the field that should have this new value is EMPTY.

Am I misunderstanding what is happening when this field value is being set? Is there a difference between the “Value” I am setting and that which corresponds to a field’s contents?

I’m hoping someone out there can shed some light on this.

Cheers and Happy New Year!!

Subject: RE: Trying to Modify a Field Value on Design Note

i’m not sure what you’re trying to do:), but:

you can’t simple add or change new fields to a form. the form does contain “placeholders” for fields (with type unknown), but information (like default value) is stored in $Body (richttext field).

only native way to go is using either c-api or dxl (not sure), but i guess it’s a lot of pain…

I think Ben’s Midas (http://www.geniisoft.com/) is able to manipulate design elements - it’s an easy approach, since you can use lscript classes to do so…

Markus Seitz

markus.seitz@icodex.com

Subject: RE: Trying to Modify a Field Value on Design Note

Markus - thanks for the clarification on this. I had eventually come to the conclusion that I could modify a field a form field quite so easily so had taken a different route in development.

Regards.