ComputewithForm but different form

I would like to know if you can have a document computewithform but use a different form. Here is the problem: Form A is a project document with lookups to Form C (Company Info). Some of the fields in Form A will only work correctly when being edited and require user input. I would like to have just the lookups on Form A updated nightly from Form C. Can I create an agent to update Form A based on the fields in Form AA (form with only lookup fields)? I can do this manually in a view using Form Formula and Refresh Selected Docs.

Any suggestions would be greatly appreciated.

Subject: ComputewithForm but different form

Have you tried something like this…

doc.form = “cwfform”

( ← might need a doc.save in here)

doc.computewithform(true, false)

doc.form = “originalform”

doc.save

Subject: RE: ComputewithForm but different form

I did try that previously but it caused an infinate loop. I am going to retry it now, but have the agent run from a view that has a selection formula comparing the last modified date with the current date. That way the docs will fall out of the view once they have been updated.

Subject: RE: ComputewithForm but different form

You will probably have to do a ws.viewrefresh after the final save so the document does fall out of the view. Then only use view.getfirstdocument or view.getlastdocument. But this will be slow. A better solution might be to use a document collection to process the selected documents rather than a view.